com.groupdocs.viewer.converter.options

Class PdfOptions



  • public class PdfOptions
    extends Object

    Provides options for rendering documents as PDF.

    • Constructor Detail

      • PdfOptions

        public PdfOptions()

        Initializes a new instance of the PdfOptions class.

    • Method Detail

      • getEnablePreciseRendering

        public boolean getEnablePreciseRendering()

        Indicates whether the PDF document is rendered in a precise mode or not. The default value is false.

        The following example demonstrates how to enable precise rendering.
        ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler();
          HtmlOptions options = new HtmlOptions();
          options.getPdfOptions().setEnablePreciseRendering(true);
          String guid = "document.pdf";
          List<PageHtml> pages = htmlHandler.getPages(guid, options);
          


        The precise rendering mode allows to keep maximum precision during positioning of glyphs on the page. When this option is enabled, it will degrade performance, but in certain cases will improve render result.
        Returns:
        a boolean.
      • getImageQuality

        public int getImageQuality()
      • getRenderLayersSeparately

        public boolean getRenderLayersSeparately()

        Specifies whether PDF document layers have to be separated when rendering into HTML. The default value is false.

        The following example demonstrates how to enable layers separate rendering. When rendering layered PDF documents into HTML, by default all layers are rendered as one. Enable layers separate rendering in order to group each PDF layer into separate elements, so that layers can be manipulated using Javascript.
        Returns:
        a boolean.
      • getUseOriginalContentOrdering

        public boolean getUseOriginalContentOrdering()

        Specifies content ordering mode when rendering into HTML. The default value is false.

        The following example demonstrates how to enable original content ordering. When original content ordering is enabled, text and graphics are rendered into HTML according to z-order in original PDF document. This mode is preferable for rendering PDF documents with multi-layered layout. When original content ordering is not enabled text and graphics are rendered into HTML as a single layer.
        Returns:
        a boolean.
      • setEnablePreciseRendering

        public void setEnablePreciseRendering(boolean value)

        Indicates whether the PDF document is rendered in a precise mode or not. The default value is false.

        The following example demonstrates how to enable precise rendering. The precise rendering mode allows to keep maximum precision during positioning of glyphs on the page. When this option is enabled, it will degrade performance, but in certain cases will improve render result.
        Parameters:
        value - a boolean.
      • setImageQuality

        public void setImageQuality(int value)
      • setRenderLayersSeparately

        public void setRenderLayersSeparately(boolean value)

        Specifies whether PDF document layers have to be separated when rendering into HTML. The default value is false.

        The following example demonstrates how to enable layers separate rendering. When rendering layered PDF documents into HTML, by default all layers are rendered as one. Enable layers separate rendering in order to group each PDF layer into separate elements, so that layers can be manipulated using Javascript.
        Parameters:
        value - a boolean.
      • setUseOriginalContentOrdering

        public void setUseOriginalContentOrdering(boolean value)

        Specifies content ordering mode when rendering into HTML. The default value is false.

        The following example demonstrates how to enable original content ordering. When original content ordering is enabled, text and graphics are rendered into HTML according to z-order in original PDF document. This mode is preferable for rendering PDF documents with multi-layered layout. When original content ordering is not enabled text and graphics are rendered into HTML as a single layer.
        Parameters:
        value - a boolean.