Class PsDocument
Namespace: Aspose.Page.EPS
Assembly: Aspose.Page.dll (25.1.2)
This class encapsulates PS/EPS documents.
public sealed class PsDocument : Document
Inheritance
object ← Document ← PsDocument
Inherited Members
object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Constructors
PsDocument(string, PsSaveOptions)
Initializes empty Aspose.Page.EPS.PsDocument with initialized page.
public PsDocument(string outPsFilePath, PsSaveOptions options)
Parameters
outPsFilePath
string
The output PS/EPS file path.
options
PsSaveOptions
A set of parameters controlling saving of PostScript file.
PsDocument(Stream, PsSaveOptions)
Initializes empty Aspose.Page.EPS.PsDocument with initialized page.
public PsDocument(Stream outPsStream, PsSaveOptions options)
Parameters
outPsStream
Stream
Stream where to save PS/EPS file.
options
PsSaveOptions
A set of parameters controlling saving of PostScript file.
PsDocument(string, PsSaveOptions, bool)
Initializes empty Aspose.Page.EPS.PsDocument.
public PsDocument(string outPsFilePath, PsSaveOptions options, bool multipaged)
Parameters
outPsFilePath
string
The output PS/EPS file path.
options
PsSaveOptions
A set of parameters controlling saving of PostScript file.
multipaged
bool
If false page will not be initialized. In this case page initialization should be performed via explicit “openPage(width, height) call.
PsDocument(Stream, PsSaveOptions, bool)
Initializes empty Aspose.Page.EPS.PsDocument.
public PsDocument(Stream outPsStream, PsSaveOptions options, bool multipaged)
Parameters
outPsStream
Stream
Stream where to save PS/EPS file.
options
PsSaveOptions
A set of parameters controlling saving of PostScript file.
multipaged
bool
If false page will not be initialized. In this case page initialization should be performed via explicit “openPage(width, height) call.
PsDocument(string, PsSaveOptions, int)
Initializes empty Aspose.Page.EPS.PsDocument when the number of Postscript document pages is known in advance.
public PsDocument(string outPsFilePath, PsSaveOptions options, int numberOfPages)
Parameters
outPsFilePath
string
The output PS/EPS file path.
options
PsSaveOptions
A set of parameters controlling saving of PostScript file.
numberOfPages
int
The number of pages in the PostScript document.
PsDocument(Stream, PsSaveOptions, int)
Initializes empty Aspose.Page.EPS.PsDocument when the number of Postscript document pages is known in advance.
public PsDocument(Stream outPsStream, PsSaveOptions options, int numberOfPages)
Parameters
outPsStream
Stream
Stream where to save PS/EPS file.
options
PsSaveOptions
A set of parameters controlling saving of PostScript file.
numberOfPages
int
The number of pages in the PostScript document.
PsDocument(string)
Initializes Aspose.Page.EPS.PsDocument with an input PS/EPS file.
public PsDocument(string psFilePath)
Parameters
psFilePath
string
PS/EPS file path.
PsDocument(Stream)
Initializes Aspose.Page.EPS.PsDocument with a stream of PS/EPS file.
public PsDocument(Stream inPsStream)
Parameters
inPsStream
Stream
Input stream of PS/EPS file.
Properties
InputStream
Gets or sets an input stream of PS/EPS file.
public Stream InputStream { get; set; }
Property Value
NumberOfPages
Returns the number of pages in resulting PDF document.
public int NumberOfPages { get; }
Property Value
Methods
Clip(GraphicsPath)
Adds clip to current graphics state.
public void Clip(GraphicsPath s)
Parameters
The clipping path.
ClipAndNewPath(GraphicsPath)
Adds clip to current graphics state and than writes “newpath” operator. It is necessary to do to escape of confluence of this clipping path and some subsequent pathes such as glyphs outlined with “charpath” operator.
public void ClipAndNewPath(GraphicsPath s)
Parameters
The clipping path.
ClipRectangle(RectangleF)
Adds clipping rectangle to current graphics state.
public void ClipRectangle(RectangleF rect)
Parameters
rect
RectangleF
The clipping rectangle.
ClipText(string, Font, float, float)
Adds clip from an outline of given text in given font.
public void ClipText(string text, Font font, float x, float y)
Parameters
text
string
The text.
font
Font
The font.
x
float
An X coordinate of the text position.
y
float
An Y coordinate of the text position.
ClosePage()
Complete current page.
public void ClosePage()
CropEps(string, float[])
Crops given Aspose.Page.EPS.PsDocument as EPS file. It saves initial EPS file with updated existing %%BoundingBox or new one will be created.
public void CropEps(string outEpsFilePath, float[] cropBox)
Parameters
outEpsFilePath
string
The output EPS file path.
cropBox
float[]
The crop box (x0, y0, x, y).
CropEps(Stream, float[])
Crops given Aspose.Page.EPS.PsDocument as EPS file. It saves initial EPS file with updated existing %%BoundingBox or new one will be created.
public void CropEps(Stream epsStream, float[] cropBox)
Parameters
epsStream
Stream
Stream of output EPS file.
cropBox
float[]
The crop box (x0, y0, x, y).
Draw(GraphicsPath)
Draw an arbitrary path.
public void Draw(GraphicsPath shape)
Parameters
shape
GraphicsPath
The path to draw.
DrawArc(double, double, double, double, double, double)
Draws an arc.
public void DrawArc(double x, double y, double width, double height, double startAngle, double arcAngle)
Parameters
x
double
X coordinate of center of the arc.
y
double
Y coordinate of center of the arc.
width
double
A width of circumscribed rectangle.
height
double
A height of circumscribed rectangle.
startAngle
double
A start angle of the arc.
arcAngle
double
An angle of the arc.
DrawExplicitImageMask(Bitmap, Bitmap, Matrix)
Draw masked image.
public void DrawExplicitImageMask(Bitmap image24bpp, Bitmap alphaMask1bpp, Matrix transform)
Parameters
image24bpp
Bitmap
The image to draw. Must be in 24bpp RGB image format
alphaMask1bpp
Bitmap
The image mask. Must be in 1bpp image format.
transform
Matrix
The matrix to transform image.
DrawImage(Bitmap)
Draw image.
public void DrawImage(Bitmap image)
Parameters
image
Bitmap
The image to draw.
DrawImage(Bitmap, Matrix, Color)
Draw transformed image with background.
public void DrawImage(Bitmap image, Matrix transform, Color bkg)
Parameters
image
Bitmap
The image to draw.
transform
Matrix
The matrix to transform image.
bkg
Color
Background for image.
DrawLine(double, double, double, double)
Draws a line segment.
public void DrawLine(double x1, double y1, double x2, double y2)
Parameters
x1
double
X coordinate of the beginning of segment.
y1
double
Y coordinate of the beginning of segment.
x2
double
X coordinate of the end of segment.
y2
double
Y coordinate of the end of segment.
DrawOval(double, double, double, double)
Draws an oval.
public void DrawOval(double x, double y, double width, double height)
Parameters
x
double
X coordinate of center of the oval.
y
double
Y coordinate of center of the oval.
width
double
A width of circumscribed rectangle.
height
double
A height of circumscribed rectangle.
DrawPolygon(int[], int[], int)
Draws a polygon.
public void DrawPolygon(int[] xPoints, int[] yPoints, int nPoints)
Parameters
xPoints
int[]
X coordinates of points.
yPoints
int[]
Y coordinate of points.
nPoints
int
The number of points.
DrawPolygon(double[], double[], int)
Draws a poligone.
public void DrawPolygon(double[] xPoints, double[] yPoints, int nPoints)
Parameters
xPoints
double[]
X coordinates of points.
yPoints
double[]
Y coordinate of points.
nPoints
int
The number of points.
DrawPolyline(int[], int[], int)
Draws a polyline.
public void DrawPolyline(int[] xPoints, int[] yPoints, int nPoints)
Parameters
xPoints
int[]
X coordinates of points.
yPoints
int[]
Y coordinate of points.
nPoints
int
The number of points.
DrawPolyline(double[], double[], int)
Draws a polyline.
public void DrawPolyline(double[] xPoints, double[] yPoints, int nPoints)
Parameters
xPoints
double[]
X coordinates of points.
yPoints
double[]
Y coordinate of points.
nPoints
int
The number of points.
DrawRect(double, double, double, double)
Draws a rectangle.
public void DrawRect(double x, double y, double width, double height)
Parameters
x
double
X coordinate of upper left corner of the rectangle.
y
double
Y coordinate of upper left corner of the rectangle.
width
double
A width of the rectangle.
height
double
A height of the rectangle.
DrawRoundRect(double, double, double, double, double, double)
Draws a round rectangle.
public void DrawRoundRect(double x, double y, double width, double height, double arcWidth, double arcHeight)
Parameters
x
double
X coordinate of upper left corner of the rectangle.
y
double
Y coordinate of upper left corner of the rectangle.
width
double
A width of the rectangle.
height
double
A height of the rectangle.
arcWidth
double
A width of circumscribed rectangle of the arc that rounds an angle of the rectangle.
arcHeight
double
A height of circumscribed rectangle of the arc that rounds an angle of the rectangle.
DrawTransparentImage(Bitmap, Matrix, int)
Draw transformed transparent image. If image doesn’t have Alpha channel it will be drawn as opaque image
public void DrawTransparentImage(Bitmap image, Matrix transform, int transparencyThreshold)
Parameters
image
Bitmap
The image to draw.
transform
Matrix
The matrix to transform image.
transparencyThreshold
int
A threshold that defines from which value of transparency pixel will be interpreted as fully transparent. All values below this threshold will be interpreted as fully opaque.
ExtractEpsBoundingBox()
Reads EPS file and extracts bounding box of EPS image from %%BoundingBox comment or bounds for default page size (0, 0, 595, 842) if it doesn’t exist.
public int[] ExtractEpsBoundingBox()
Returns
int[]
The bounding box of the EPS image.
ExtractEpsSize()
Reads EPS file and extracts a size of EPS image from %%BoundingBox comment or default page size (595, 842) if it doesn’t exist.
public Size ExtractEpsSize()
Returns
The size of the EPS image.
ExtractText(SaveOptions, int, int)
Extract text from PS file. The text can be extracted only if it is written with Type 42 (TrueType) font or Type 0 font with Type 42 fonts in its Vector Map.
public string ExtractText(SaveOptions options, int startPage = 0, int endPage = 0)
Parameters
options
SaveOptions
The save options.
startPage
int
The page from which to begin to extract text. This parameter is usefull for multi-paged documents.
endPage
int
The page till which to finish to extract text. This parameter is usefull for multi-paged documents.
Returns
The extracted text.
Fill(GraphicsPath)
Fill an arbitrary path.
public void Fill(GraphicsPath shape)
Parameters
shape
GraphicsPath
The path to fill.
FillAndStrokeText(string, Font, float, float, Brush, Pen)
Adds a text string by filling interrior of glyphs and drawing glyphs contours.
public void FillAndStrokeText(string text, Font font, float x, float y, Brush fillPaint, Pen stroke)
Parameters
text
string
The text to add.
font
Font
System font that will be used to draw text.
x
float
X coordinate for text origin.
y
float
Y coordinate for text origin.
fillPaint
Brush
The fill used for painting glyphs interior.
stroke
Pen
The stroke used for drawing glyphs contours.
FillAndStrokeText(string, float[], Font, float, float, Brush, Pen)
Adds a text string by filling interrior of glyphs and drawing glyphs contours.
public void FillAndStrokeText(string text, float[] advances, Font font, float x, float y, Brush fillPaint, Pen stroke)
Parameters
text
string
The text to add.
advances
float[]
An array of glyphs width. It’s length must comply with the number of glyphs in the string.
font
Font
System font that will be used to draw text.
x
float
X coordinate for text origin.
y
float
Y coordinate for text origin.
fillPaint
Brush
The fill used for painting glyphs interior.
stroke
Pen
The stroke used for drawing glyphs contours.
FillAndStrokeText(string, DrFont, float, float, Brush, Pen)
Adds a text string by filling interrior of glyphs and drawing glyphs contours.
public void FillAndStrokeText(string text, DrFont drFont, float x, float y, Brush fillPaint, Pen stroke)
Parameters
text
string
The text to add.
drFont
DrFont
Aspose.Foundation.Drawing.DrFont that will be used to draw text. It can be used with custom font that is located in custom folder.
x
float
X coordinate for text origin.
y
float
Y coordinate for text origin.
fillPaint
Brush
The fill used for painting glyphs interior.
stroke
Pen
The stroke used for drawing glyphs contours.
FillAndStrokeText(string, float[], DrFont, float, float, Brush, Pen)
Adds a text string by filling interrior of glyphs and drawing glyphs contours.
public void FillAndStrokeText(string text, float[] advances, DrFont drFont, float x, float y, Brush fillPaint, Pen stroke)
Parameters
text
string
The text to add.
advances
float[]
An array of glyphs width. It’s length must comply with the number of glyphs in the string.
drFont
DrFont
Aspose.Foundation.Drawing.DrFont that will be used to draw text. It can be used with custom font that is located in custom folder.
x
float
X coordinate for text origin.
y
float
Y coordinate for text origin.
fillPaint
Brush
The fill used for painting glyphs interior.
stroke
Pen
The stroke used for drawing glyphs contours.
FillArc(double, double, double, double, double, double)
Fills an arc.
public void FillArc(double x, double y, double width, double height, double startAngle, double arcAngle)
Parameters
x
double
X coordinate of center of the arc.
y
double
Y coordinate of center of the arc.
width
double
A width of circumscribed rectangle.
height
double
A height of circumscribed rectangle.
startAngle
double
A start angle of the arc.
arcAngle
double
An angle of the arc.
FillOval(double, double, double, double)
Fills an oval.
public void FillOval(double x, double y, double width, double height)
Parameters
x
double
X coordinate of center of the oval.
y
double
Y coordinate of center of the oval.
width
double
A width of circumscribed rectangle.
height
double
A height of circumscribed rectangle.
FillPolygon(int[], int[], int)
Fills a poligone.
public void FillPolygon(int[] xPoints, int[] yPoints, int nPoints)
Parameters
xPoints
int[]
X coordinates of points.
yPoints
int[]
Y coordinate of points.
nPoints
int
The number of points.
FillPolygon(double[], double[], int)
Fills a poligone.
public void FillPolygon(double[] xPoints, double[] yPoints, int nPoints)
Parameters
xPoints
double[]
X coordinates of points.
yPoints
double[]
Y coordinate of points.
nPoints
int
The number of points.
FillRect(double, double, double, double)
Fills a rectangle.
public void FillRect(double x, double y, double width, double height)
Parameters
x
double
X coordinate of upper left corner of the rectangle.
y
double
Y coordinate of upper left corner of the rectangle.
width
double
A width of the rectangle.
height
double
A height of the rectangle.
FillRoundRect(double, double, double, double, double, double)
Fills a round rectangle.
public void FillRoundRect(double x, double y, double width, double height, double arcWidth, double arcHeight)
Parameters
x
double
X coordinate of upper left corner of the rectangle.
y
double
Y coordinate of upper left corner of the rectangle.
width
double
A width of the rectangle.
height
double
A height of the rectangle.
arcWidth
double
A width of circumscribed rectangle of the arc that rounds an angle of the rectangle.
arcHeight
double
A height of circumscribed rectangle of the arc that rounds an angle of the rectangle.
FillText(string, Font, float, float)
Adds a text string by filling interrior of glyphs.
public void FillText(string text, Font font, float x, float y)
Parameters
text
string
The text to add.
font
Font
System font that will be used to draw text.
x
float
X coordinate for text origin.
y
float
Y coordinate for text origin.
FillText(string, float[], Font, float, float)
Adds a text string by filling interrior of glyphs.
public void FillText(string text, float[] advances, Font font, float x, float y)
Parameters
text
string
The text to add.
advances
float[]
An array of glyphs width. It’s length must comply with the number of glyphs in the string.
font
Font
The font that will be used to draw text.
x
float
X coordinate for text origin.
y
float
Y coordinate for text origin.
FillText(string, DrFont, float, float)
Adds a text string by filling interrior of glyphs.
public void FillText(string text, DrFont drFont, float x, float y)
Parameters
text
string
The text to add.
drFont
DrFont
Aspose.Foundation.Drawing.DrFont that will be used to draw text. It can be used with custom font that is located in custom folder.
x
float
X coordinate for text origin.
y
float
Y coordinate for text origin.
FillText(string, float[], DrFont, float, float)
Adds a text string by filling interrior of glyphs.
public void FillText(string text, float[] advances, DrFont drFont, float x, float y)
Parameters
text
string
The text to add.
advances
float[]
An array of glyphs width. It’s length must comply with the number of glyphs in the string.
drFont
DrFont
Aspose.Foundation.Drawing.DrFont that will be used to draw text. It can be used with custom font that is located in custom folder.
x
float
X coordinate for text origin.
y
float
Y coordinate for text origin.
FillText(string, Font, float, float, Brush)
Adds a text string by filling interrior of glyphs.
public void FillText(string text, Font font, float x, float y, Brush fill)
Parameters
text
string
The text to add.
font
Font
System font that will be used to draw text.
x
float
X coordinate for text origin.
y
float
Y coordinate for text origin.
fill
Brush
The fill used for painting glyphs.
FillText(string, float[], Font, float, float, Brush)
Adds a text string by filling interrior of glyphs.
public void FillText(string text, float[] advances, Font font, float x, float y, Brush fill)
Parameters
text
string
The text to add.
advances
float[]
An array of glyphs width. It’s length must comply with the number of glyphs in the string.
font
Font
System font that will be used to draw text.
x
float
X coordinate for text origin.
y
float
Y coordinate for text origin.
fill
Brush
The fill used for painting glyphs.
FillText(string, DrFont, float, float, Brush)
Adds a text string by filling interrior of glyphs.
public void FillText(string text, DrFont drFont, float x, float y, Brush fill)
Parameters
text
string
The text to add.
drFont
DrFont
Aspose.Foundation.Drawing.DrFont that will be used to draw text. It can be used with custom font that is located in custom folder.
x
float
X coordinate for text origin.
y
float
Y coordinate for text origin.
fill
Brush
The fill used for painting glyphs.
FillText(string, float[], DrFont, float, float, Brush)
Adds a text string by filling interrior of glyphs.
public void FillText(string text, float[] advances, DrFont drFont, float x, float y, Brush fill)
Parameters
text
string
The text to add.
advances
float[]
An array of glyphs width. It’s length must comply with the number of glyphs in the string.
drFont
DrFont
Aspose.Foundation.Drawing.DrFont that will be used to draw text. It can be used with custom font that is located in custom folder.
x
float
X coordinate for text origin.
y
float
Y coordinate for text origin.
fill
Brush
The fill used for painting glyphs.
GetPaint()
Gets paint of current graphics state.
public Brush GetPaint()
Returns
GetStroke()
Gets stroke of current graphics state.
public Pen GetStroke()
Returns
GetXmpMetadata()
Reads PS/EPS file and extracts XmpMetdata if it already exists or add new one if it doesn’t exist.
public XmpMetadata GetXmpMetadata()
Returns
Existing or new instance of XMP metadata.
MergeToPdf(string, string[], SaveOptions)
Merges PS/EPS files to a device.
public void MergeToPdf(string outPdfFilePath, string[] filesForMerge, SaveOptions options)
Parameters
outPdfFilePath
string
An output PDF file path.
filesForMerge
string[]
PS/EPS files for merging with this file to an output device.
options
SaveOptions
Contains flags that specify output of errors thrown during conversion.
MergeToPdf(Stream, string[], SaveOptions)
Merges PS/EPS files to a device.
public void MergeToPdf(Stream pdfStream, string[] filesForMerge, SaveOptions options)
Parameters
pdfStream
Stream
An output PDF stream.
filesForMerge
string[]
PS/EPS files for merging with this file to an output device.
options
SaveOptions
Contains flags that specify output of errors thrown during conversion.
OpenPage(float, float)
Creates new page and make it current one.
public void OpenPage(float width, float height)
Parameters
width
float
The width of new page.
height
float
The height of new page.
OpenPage(string)
Creates new page with document’s size and make it current one.
public void OpenPage(string pageName = null)
Parameters
pageName
string
The name of new page. If it is null the name o the page will be an order number of the page.
OutlineText(string, Font, float, float)
Adds a text string by drawing glyphs contours.
public void OutlineText(string text, Font font, float x, float y)
Parameters
text
string
The text to add.
font
Font
System font that will be used to draw text.
x
float
X coordinate for text origin.
y
float
Y coordinate for text origin.
OutlineText(string, float[], Font, float, float)
Adds a text string by drawing glyphs contours.
public void OutlineText(string text, float[] advances, Font font, float x, float y)
Parameters
text
string
The text to add.
advances
float[]
An array of glyphs width. It’s length must comply with the number of glyphs in the string.
font
Font
The font that will be used to draw text.
x
float
X coordinate for text origin.
y
float
Y coordinate for text origin.
OutlineText(string, DrFont, float, float)
Adds a text string by drawing glyphs contours.
public void OutlineText(string text, DrFont drFont, float x, float y)
Parameters
text
string
The text to add.
drFont
DrFont
Aspose.Foundation.Drawing.DrFont that will be used to draw text. It can be used with custom font that is located in custom folder.
x
float
X coordinate for text origin.
y
float
Y coordinate for text origin.
OutlineText(string, float[], DrFont, float, float)
Adds a text string by drawing glyphs contours.
public void OutlineText(string text, float[] advances, DrFont drFont, float x, float y)
Parameters
text
string
The text to add.
advances
float[]
An array of glyphs width. It’s length must comply with the number of glyphs in the string.
drFont
DrFont
Aspose.Foundation.Drawing.DrFont that will be used to draw text. It can be used with custom font that is located in custom folder.
x
float
X coordinate for text origin.
y
float
Y coordinate for text origin.
OutlineText(string, Font, float, float, Pen)
Adds a text string by drawing glyphs contours.
public void OutlineText(string text, Font font, float x, float y, Pen stroke)
Parameters
text
string
The text to add.
font
Font
System font that will be used to draw text.
x
float
X coordinate for text origin.
y
float
Y coordinate for text origin.
stroke
Pen
The stroke used for drawing glyphs outlines.
OutlineText(string, float[], Font, float, float, Pen)
Adds a text string by drawing glyphs contours.
public void OutlineText(string text, float[] advances, Font font, float x, float y, Pen stroke)
Parameters
text
string
The text to add.
advances
float[]
An array of glyphs width. It’s length must comply with the number of glyphs in the string.
font
Font
System font that will be used to draw text.
x
float
X coordinate for text origin.
y
float
Y coordinate for text origin.
stroke
Pen
The stroke used for drawing glyphs outlines.
OutlineText(string, DrFont, float, float, Pen)
Adds a text string by drawing glyphs contours.
public void OutlineText(string text, DrFont drFont, float x, float y, Pen stroke)
Parameters
text
string
The text to add.
drFont
DrFont
Aspose.Foundation.Drawing.DrFont that will be used to draw text. It can be used with custom font that is located in custom folder.
x
float
X coordinate for text origin.
y
float
Y coordinate for text origin.
stroke
Pen
The stroke used for drawing glyphs outlines.
OutlineText(string, float[], DrFont, float, float, Pen)
Adds a text string by drawing glyphs contours.
public void OutlineText(string text, float[] advances, DrFont drFont, float x, float y, Pen stroke)
Parameters
text
string
The text to add.
advances
float[]
An array of glyphs width. It’s length must comply with the number of glyphs in the string.
drFont
DrFont
Aspose.Foundation.Drawing.DrFont that will be used to draw text. It can be used with custom font that is located in custom folder.
x
float
X coordinate for text origin.
y
float
Y coordinate for text origin.
stroke
Pen
The stroke used for drawing glyphs outlines.
ResizeEps(string, SizeF, Units)
Resizes given Aspose.Page.EPS.PsDocument as EPS file. This method is used only after extracting EPS size. It saves initial EPS file with updated existing %%BoundingBox or new one will be created. Page transformation matrix also will be set.
public void ResizeEps(string outEpsFilePath, SizeF newSizeInUnits, Units units)
Parameters
outEpsFilePath
string
The output EPS file path.
newSizeInUnits
SizeF
New size of EPS image in assigned units.
units
Units
The units of the new size. Can be points, inches, millimeters, centimeters and percents of initial size.
ResizeEps(Stream, SizeF, Units)
Resizes given Aspose.Page.EPS.PsDocument as EPS file. This method is used only after extracting EPS size. It saves initial EPS file with updated existing %%BoundingBox or new one will be created. Page transformation matrix also will be set.
public void ResizeEps(Stream epsStream, SizeF newSizeInUnits, Units units)
Parameters
epsStream
Stream
Stream of output EPS file.
newSizeInUnits
SizeF
New size of EPS image in assigned units.
units
Units
The units of the new size. Can be points, inches, millimeters, centimeters and percents of initial size.
Rotate(float)
Adds rotation counterclockwise about the origin to current graphics state (rotate current matrix).
public void Rotate(float angleRadians)
Parameters
angleRadians
float
The angle of rotation in radians.
Rotate(int)
Adds rotation counterclockwise about the origin to current graphics state (rotate current matrix).
public void Rotate(int angleDegrees)
Parameters
angleDegrees
int
The angle of rotation in degrees.
Save(Stream)
Saves given Aspose.Page.EPS.PsDocument as EPS file. This method is used only after updating XMP metadata. It saves initial EPS file with updated existing metadata or new one created while calling GetMetadata method. In the last case all necessary PostScript code and EPS comments are added.
public void Save(Stream epsStream)
Parameters
epsStream
Stream
Stream of output EPS file.
Save()
Saves given Aspose.Page.EPS.PsDocument as EPS file. This method is used only when PsDocument was created from scratch.
public void Save()
SaveAsImage(ImageSaveOptions)
Saves PS/EPS file to images bytes arrays.
public byte[][] SaveAsImage(ImageSaveOptions options)
Parameters
options
ImageSaveOptions
Contains necessary parameters for saving image and flags that specify output of errors thrown during conversion.
Returns
byte[][]
Images bytes. One byte array for one page.
SaveAsPdf(string, PdfSaveOptions)
Saves PS/EPS file to PDF file.
public void SaveAsPdf(string outPdfFilePath, PdfSaveOptions options)
Parameters
outPdfFilePath
string
An output PDF file path.
options
PdfSaveOptions
Contains flags that specify output of errors thrown during conversion.
SaveAsPdf(Stream, PdfSaveOptions)
Saves PS/EPS file to PDF stream.
public void SaveAsPdf(Stream pdfStream, PdfSaveOptions options)
Parameters
pdfStream
Stream
An output PDF stream.
options
PdfSaveOptions
Contains flags that specify output of errors thrown during conversion.
SaveImageAsEps(Stream, Stream, PsSaveOptions)
Saves PNG/JPEG/TIFF/BMP/GIF/EMF image from input stream to EPS output stream.
public static void SaveImageAsEps(Stream imageStream, Stream epsStream, PsSaveOptions options)
Parameters
imageStream
Stream
Image input stream.
epsStream
Stream
EPS output stream.
options
PsSaveOptions
Contains parameters that specify output of errors thrown during conversion.
SaveImageAsEps(string, string, PsSaveOptions)
Saves PNG/JPEG/TIFF/BMP/GIF/EMF image from file to EPS file.
public static void SaveImageAsEps(string imageFilePath, string epsFilePath, PsSaveOptions options)
Parameters
imageFilePath
string
The image file path.
epsFilePath
string
EPS file path.
options
PsSaveOptions
Contains parameters that specify output of errors thrown during conversion.
SaveImageAsEps(Bitmap, string, PsSaveOptions)
Saves Bitmap object to EPS file.
public static void SaveImageAsEps(Bitmap image, string epsFilePath, PsSaveOptions options)
Parameters
image
Bitmap
The image.
epsFilePath
string
EPS file path.
options
PsSaveOptions
Contains parameters that specify output of errors thrown during conversion.
SaveImageAsEps(Bitmap, Stream, PsSaveOptions)
Saves Bitmap object to EPS output stream.
public static void SaveImageAsEps(Bitmap image, Stream epsStream, PsSaveOptions options)
Parameters
image
Bitmap
The image.
epsStream
Stream
EPS output stream.
options
PsSaveOptions
Contains parameters that specify output of errors thrown during conversion.
Scale(float, float)
Adds scale to current graphics state (scale current matrix).
public void Scale(float xScale, float yScale)
Parameters
xScale
float
The scale in X axis.
yScale
float
The translation in Y axis.
SetPageDevice(Dictionary<string, object=”">)
Sets page device parameters (see operator “setpagedevice” PostScript spesification). Among these can be page size and color etc.
public void SetPageDevice(Dictionary<string, object=""> pageParams)
Parameters
pageParams
Dictionary<string, object>
Parameters of the page. In this dictionary can be page size and color etc
SetPageSize(float, float)
Sets page size. To create pages with different sizes in one document use Aspose.Page.EPS.PsDocument.SetPageDevice(System.Collections.Generic.Dictionary{System.String,System.Object}) method just after this method.
public void SetPageSize(float width, float height)
Parameters
width
float
The width of page in resulting PostScript file.
height
float
The height of page in resulting PostScript file.
SetPaint(Brush)
Sets paint in current graphics state.
public void SetPaint(Brush paint)
Parameters
paint
Brush
The paint. It can be any subclass of System.Drawing.Brush class existed in .NET platform.
SetStroke(Pen)
Sets stroke in current graphics state.
public void SetStroke(Pen stroke)
Parameters
stroke
Pen
The stroke.
SetTransform(Matrix)
Set current transformation to this one.
public void SetTransform(Matrix matrix)
Parameters
matrix
Matrix
The transformation.
Shear(float, float)
Adds shear transformation to current graphics state (shear current matrix).
public void Shear(float shx, float shy)
Parameters
shx
float
The shear in X axis.
shy
float
The shear in Y axis.
Transform(Matrix)
Adds transformation to current graphics state (concatenates this matrix with current one).
public void Transform(Matrix matrix)
Parameters
matrix
Matrix
The transformation.
Translate(float, float)
Adds translation to current graphics state (translates current matrix).
public void Translate(float x, float y)
Parameters
x
float
The translation in X direction.
y
float
The translation in Y direction.
WriteGraphicsRestore()
Writes restoring of the current graphics state (See PostScript specification on operator “grestore”).
public void WriteGraphicsRestore()
WriteGraphicsSave()
Writes saving of the current graphics state (See PostScript specification on operator “gsave”).
public void WriteGraphicsSave()
</string,></string,>