Class HtmlOptions

  • public class HtmlOptions
    extends RenderOptions

    Provides options for rendering documents as HTML.

    • Constructor Detail

      • HtmlOptions

        public HtmlOptions()

        Initializes a new instance of HtmlOptions object.

    • Method Detail

      • getEmbedResources

        public boolean getEmbedResources()
      • getEnableMinification

        public boolean getEnableMinification()
      • getEnableResponsiveRendering

        public boolean getEnableResponsiveRendering()
      • getExcludeFonts

        public boolean getExcludeFonts()
      • getExcludeFontsList

        public List<String> getExcludeFontsList()
      • getHtmlResourcePrefix

        public String getHtmlResourcePrefix()

        Specifies prefix for HTML resources.

         The following example demonstrates how to specify resource prefix.
        HtmlOptions htmlOptions = new HtmlOptions();

         The following example demonstrates how to specify resource prefix with replacement patterns.
        HtmlOptions htmlOptions = new HtmlOptions();

        Value: The HTML resource prefix.

        Resource prefix may be useful when resources for document are obtained via some REST API method. Supported replacement patterns: {page-number}, {resource-name}.

      • getIgnorePrefixInResources

        public boolean getIgnorePrefixInResources()
      • setEmbedResources

        public void setEmbedResources(boolean value)
      • setEnableMinification

        public void setEnableMinification(boolean value)
      • setEnableResponsiveRendering

        public void setEnableResponsiveRendering(boolean value)
      • setExcludeFonts

        public void setExcludeFonts(boolean value)
      • setExcludeFontsList

        public void setExcludeFontsList(List<String> value)
      • setHtmlResourcePrefix

        public void setHtmlResourcePrefix(String value)

        Indicates whether rendering will provide responsive web pages, that look well on different device types. Default value is false.

         The following example demonstrates how to enable responsive rendering.
        ViewerConfig config = new ViewerConfig();
         ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
         String guid = "C:\\storage\\document.doc";
         HtmlOptions options = new HtmlOptions();
         List<PageHtml> pages = htmlHandler.getPages(guid, options);

      • setIgnorePrefixInResources

        public void setIgnorePrefixInResources(boolean value)