com.groupdocs.viewer.options

Class JpgViewOptions

    • Constructor Detail

      • JpgViewOptions

        public JpgViewOptions()

        Initializes new instance of JpgViewOptions class.


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

        public JpgViewOptions(CreatePageStream createPageStream)
        Initializes new instance of JpgViewOptions class.
        Parameters:
        createPageStream - The method that instantiates stream used to write output page data.
      • JpgViewOptions

        public JpgViewOptions(CreatePageStream createPageStream,
                      ReleasePageStream releasePageStream)
        Initializes new instance of JpgViewOptions 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.
      • JpgViewOptions

        public JpgViewOptions(PageStreamFactory pageStreamFactory)

        Initializes new instance of JpgViewOptions class.

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

        public JpgViewOptions(String filePathFormat)

        Initializes new instance of JpgViewOptions class.

        Parameters:
        filePathFormat - The file path format e.g. 'page_{0}.jpg'.
        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
      • getQuality

        public final byte getQuality()

        Quality of the output image; Valid values are between 1 and 100; Default value is 90.

      • 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
      • setQuality

        public final void setQuality(byte value)

        Quality of the output image; Valid values are between 1 and 100; Default value is 90.

      • setWidth

        public final void setWidth(int value)

        The width of the output image in pixels.