com.groupdocs.viewer.options

Class PngViewOptions

    • 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(CreatePageStream createPageStream)
        Initializes new instance of PngViewOptions class.
        Parameters:
        createPageStream - The method that instantiates stream used to write output page data.
      • PngViewOptions

        public PngViewOptions(CreatePageStream createPageStream,
                              ReleasePageStream releasePageStream)
        Initializes new instance of PngViewOptions class.
        Parameters:
        createPageStream - The method that instantiates stream used to write output page data.
        releasePageStream - The method that releases stream created by method assigned to delegate that passed to createPageStream parameter.
      • 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.

      • getMaxHeight

        public int getMaxHeight()
        Max height of an output image in pixels.
        Specified by:
        getMaxHeight in interface IMaxSizeOptions
      • getMaxWidth

        public int getMaxWidth()
        Max width of an output image in pixels.
        Specified by:
        getMaxWidth in interface IMaxSizeOptions
      • 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.

      • setMaxHeight

        public void setMaxHeight(int maxHeight)
        Max height of an output image in pixels.
        Specified by:
        setMaxHeight in interface IMaxSizeOptions
      • setMaxWidth

        public void setMaxWidth(int maxWidth)
        Max width of an output image in pixels.
        Specified by:
        setMaxWidth in interface IMaxSizeOptions
      • setWidth

        public final void setWidth(int value)

        The width of the output image in pixels.