com.groupdocs.viewer.options

Class JpgViewOptions



  • public class JpgViewOptions
    extends ViewOptions

    Provides options for rendering documents into JPG format.

    • 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(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.

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

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