com.groupdocs.viewer.converter.options

Class WordsOptions



  • public class WordsOptions
    extends Object

    Options for Words documents conversion.

    • Field Detail

      • SHOW_TRACKED_CHANGES_DEFAULT

        public static final boolean SHOW_TRACKED_CHANGES_DEFAULT
        Constant SHOW_TRACKED_CHANGES_DEFAULT=false
        See Also:
        Constant Field Values
    • Constructor Detail

      • WordsOptions

        public WordsOptions()

        Initializes a new instance of the WordsOptions class.

    • Method Detail

      • getEncoding

        public Charset getEncoding()

        The document encoding.


          The following example demonstrates how to set Encoding when rendering Text documents.
          
        ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler();
          HtmlOptions options = new HtmlOptions();
          options.getWordsOptions().setEncoding(Charset.forName("utf-8"));
          String guid = "utf8encoded.docx";
          List<PageHtml> pages = htmlHandler.getPages(guid, options);
          

        Returns:
        a Charset object.
      • getShowTrackedChanges

        public boolean getShowTrackedChanges()

        Indicates whether tracked changes should be rendered or not. Default value is false

        Returns:
        a boolean.
      • setEncoding

        public void setEncoding(Charset value)

        The document encoding.

        Parameters:
        value - a Charset object.
      • setShowTrackedChanges

        public void setShowTrackedChanges(boolean value)

        Indicates whether Tracked Changes (Revisions) should be rendered or not. Default value is false


          The following example demonstrates how to render Microsoft Word
          or OpenOffice Text document with Tracked Changes (Revisions).
          
        ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler();
          HtmlOptions options = new HtmlOptions();
          options.getWordsOptions().setShowTrackedChanges(true);
          String guid = "document.docx";
          List<PageHtml> pages = htmlHandler.getPages(guid, options);
          

        Parameters:
        value - a boolean.