com.groupdocs.viewer.options

Class PngViewOptions



  • public class PngViewOptions
    extends ViewOptions

    Provides options for rendering documents into PNG format.

    • Constructor Detail

      • PngViewOptions

        public PngViewOptions()

        Initializes new instance of PngViewOptions class.


        This constructor initializes new instance of PngViewOptions with "p_{0}.png" as file path format for the output files. The output files will be placed into current working directory of the application.
      • PngViewOptions

        public PngViewOptions(PageStreamFactory pageStreamFactory)

        Initializes new instance of PngViewOptions class.

        Parameters:
        pageStreamFactory - The factory which implements methods for creating and releasing output page stream.
        Throws:
        IllegalArgumentException - Thrown when pageStreamFactory is null.
      • PngViewOptions

        public PngViewOptions(String filePathFormat)

        Initializes new instance of PngViewOptions class.

        Parameters:
        filePathFormat - The file path format e.g. 'page_{0}.png'.
        Throws:
        IllegalArgumentException - Thrown when filePathFormat is null or empty.
    • Method Detail

      • getHeight

        public final int getHeight()

        The height of an output image in pixels.

      • getWidth

        public final int getWidth()

        The width of the output image in pixels.

      • isExtractText

        public final boolean isExtractText()

        Enables text extraction.


        This option might be useful when you want to add selectable text layer over the image.
      • setExtractText

        public final void setExtractText(boolean value)

        Enables text extraction.


        This option might be useful when you want to add selectable text layer over the image.
      • setHeight

        public final void setHeight(int value)

        The height of an output image in pixels.

      • setWidth

        public final void setWidth(int value)

        The width of the output image in pixels.