com.aspose.pdf.devices

Class GraphicsDevice



  • public final class GraphicsDevice
    extends ImageDevice

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

    • Constructor Detail

      • GraphicsDevice

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

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

        Parameters:
        origin - Top Left image coordinate
        paperWidth - Width that the image is auto-sized to
        paperHeight - Height that the image is auto-sized to
        marginBounds - Rectangle object
        scaleFactor - Scale factor of the output image.
        resolution - Resolution for the result image file, see Resolution class.
        rotateDegrees - degrees
        autoSize - boolean value
        verticalAlignment - VerticalAlignment element
        horizontalAlignment - horizontalAlignment element
        isXpsPrinting - boolean value
        See Also:
        VerticalAlignment, HorizontalAlignment
    • Method Detail

      • process

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

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

        Parameters:
        page - The page to process.
        output - This stream contains the results of processing.
      • process

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

        renders page on the graphics

        Overrides:
        process in class PageDevice
        Parameters:
        page - Page object
        gr - internal object
      • processInternal

        public void processInternal(Page page,
                                    com.aspose.ms.System.IO.Stream output)
        internal method
        Specified by:
        processInternal in class PageDevice
        Parameters:
        page - Page object
        output - internal object