GraphicsDevice

Inheritance: java.lang.Object, com.aspose.pdf.devices.Device, com.aspose.pdf.devices.PageDevice, com.aspose.pdf.devices.ImageDevice

public final class GraphicsDevice extends ImageDevice

Represents image device that helps to render pdf document pages into graphics.

Constructors

ConstructorDescription
GraphicsDevice(Point origin, int paperWidth, int paperHeight, System.Drawing.Rectangle marginBounds, float scaleFactor, Resolution resolution, int rotateDegrees, boolean autoSize, VerticalAlignment verticalAlignment, HorizontalAlignment horizontalAlignment, boolean isXpsPrinting)Initializes a new instance of the GraphicsDevice class with provided image dimensions and resolution.

Methods

MethodDescription
process(Page page, System.IO.Stream output)Perfoms some operation on the given page, e.g.
process(Page page, System.Drawing.Graphics gr)renders page on the graphics
processInternal(Page page, System.IO.Stream output)internal method

GraphicsDevice(Point origin, int paperWidth, int paperHeight, System.Drawing.Rectangle marginBounds, float scaleFactor, Resolution resolution, int rotateDegrees, boolean autoSize, VerticalAlignment verticalAlignment, HorizontalAlignment horizontalAlignment, boolean isXpsPrinting)

public GraphicsDevice(Point origin, int paperWidth, int paperHeight, System.Drawing.Rectangle marginBounds, float scaleFactor, Resolution resolution, int rotateDegrees, boolean autoSize, VerticalAlignment verticalAlignment, HorizontalAlignment horizontalAlignment, boolean isXpsPrinting)

Initializes a new instance of the GraphicsDevice class with provided image dimensions and resolution.

Parameters:

ParameterTypeDescription
originPointTop Left image coordinate
paperWidthintWidth that the image is auto-sized to
paperHeightintHeight that the image is auto-sized to
marginBoundscom.aspose.ms.System.Drawing.RectangleRectangle object
scaleFactorfloatScale factor of the output image.
resolutionResolutionResolution for the result image file, see Resolution class.
rotateDegreesintdegrees
autoSizebooleanboolean value
verticalAlignmentVerticalAlignmentVerticalAlignment element
horizontalAlignmentHorizontalAlignmenthorizontalAlignment element
isXpsPrintingbooleanboolean value

process(Page page, System.IO.Stream output)

public void process(Page page, System.IO.Stream output)

Perfoms some operation on the given page, e.g. converts page into graphic image.

Parameters:

ParameterTypeDescription
pagePageThe page to process.
outputcom.aspose.ms.System.IO.StreamThis stream contains the results of processing.

process(Page page, System.Drawing.Graphics gr)

public void process(Page page, System.Drawing.Graphics gr)

renders page on the graphics

Parameters:

ParameterTypeDescription
pagePagePage object
grcom.aspose.ms.System.Drawing.Graphicsinternal object

processInternal(Page page, System.IO.Stream output)

public void processInternal(Page page, System.IO.Stream output)

internal method

Parameters:

ParameterTypeDescription
pagePagePage object
outputcom.aspose.ms.System.IO.Streaminternal object