com.groupdocs.viewer.options

Class PdfOptions



  • public class PdfOptions
    extends Object

    Provides options for rendering PDF documents.

    • Constructor Detail

      • PdfOptions

        public PdfOptions()

        Initializes new instance of PdfOptions class.

    • Method Detail

      • getImageQuality

        public final ImageQuality getImageQuality()

        Specifies output image quality for image resources when rendering into HTML. The default value is Low.

        Returns:
        Specifies output image quality for image resources when rendering into HTML.
      • isDisableCharsGrouping

        public final boolean isDisableCharsGrouping()
        If attribute RenderTextAsImage set to true, the text from the source becomes an image in HTML. May be useful to make text unselectable or HTML text is not rendered properly.

        When this option is set to true, the text is rendered as an image in the output HTML. Enable this option to make text unselectable or to fix characters rendering and make HTML look like PDF. The default value is false. This option is supported when rendering into HTML.

        /**

        Disables chars grouping to keep maximum precision during chars positioning when rendering the page.

      • isEnableFontHinting

        public final boolean isEnableFontHinting()

        Enables font hinting. The font hinting adjusts the display of an outline font. Supported only for TTF fonts when these fonts are used in source document.


        This option is supported when rendering into PNG or JPG formats.
      • isEnableLayeredRendering

        public final boolean isEnableLayeredRendering()

        Enables rendering of text and graphics according to z-order in original PDF document when rendering into HTML.


        By default text and graphics are rendered into HTML as a single layer.
      • isRenderOriginalPageSize

        public boolean isRenderOriginalPageSize()
        When this option enabled the output pages will have the same size in pixels as page size in a source PDF document. By default GroupDocs.Viewer calculates output image page size for better rendering quality.
        Returns:
        This option is supported when rendering into PNG or JPG formats.
      • isRenderTextAsImage

        public boolean isRenderTextAsImage()
        If attribute RenderTextAsImage set to true, the text from the source becomes an image in HTML. May be useful to make text unselectable or HTML text is not rendered properly.

        When this option is set to true, the text is rendered as an image in the output HTML. Enable this option to make text unselectable or to fix characters rendering and make HTML look like PDF. The default value is false. This option is supported when rendering into HTML.

      • setDisableCharsGrouping

        public final void setDisableCharsGrouping(boolean value)

        Disables chars grouping to keep maximum precision during chars positioning when rendering the page.

      • setEnableFontHinting

        public final void setEnableFontHinting(boolean value)

        Enables font hinting. The font hinting adjusts the display of an outline font. Supported only for TTF fonts when these fonts are used in source document.


        This option is supported when rendering into PNG or JPG formats.
      • setEnableLayeredRendering

        public final void setEnableLayeredRendering(boolean value)

        Enables rendering of text and graphics according to z-order in original PDF document when rendering into HTML.


        By default text and graphics are rendered into HTML as a single layer.
      • setImageQuality

        public final void setImageQuality(ImageQuality value)

        Specifies output image quality for image resources when rendering into HTML. The default value is Low.

        Parameters:
        value - Specifies output image quality for image resources when rendering into HTML.
      • setRenderOriginalPageSize

        public void setRenderOriginalPageSize(boolean mRenderOriginalPageSize)
        When this option enabled the output pages will have the same size in pixels as page size in a source PDF document. By default GroupDocs.Viewer calculates output image page size for better rendering quality.
        Parameters:
        mRenderOriginalPageSize - This option is supported when rendering into PNG or JPG formats.
      • setRenderTextAsImage

        public void setRenderTextAsImage(boolean renderTextAsImage)
        If attribute RenderTextAsImage set to true, the text from the source becomes an image in HTML. May be useful to make text unselectable or HTML text is not rendered properly.

        When this option is set to true, the text is rendered as an image in the output HTML. Enable this option to make text unselectable or to fix characters rendering and make HTML look like PDF. The default value is false. This option is supported when rendering into HTML.