com.groupdocs.viewer.converter.options

Class RenderOptions

    • Method Detail

      • getPageNumber

        public int getPageNumber()

        The page number. Will be ignored if PageNumbersToRender parameter specified.

      • setPageNumber

        public void setPageNumber(int value)

        The page number. Will be ignored if PageNumbersToRender parameter specified.


         The following example demonstrates how to get document
         HTML representation, starting from the page number two.
         
         ViewerConfig config = new ViewerConfig();
         ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
         HtmlOptions options = new HtmlOptions();
         options.setPageNumber(2);
         String guid = "C:\\storage\\document.doc";
         java.util.List pages = htmlHandler.GetPages(guid, options);
         

      • getCountPagesToConvert

        @Deprecated
        public int getCountPagesToConvert()
        Deprecated. 

        The count pages to convert. Will be ignored if PageNumbersToConvert parameter specified. Please use getCountPagesToRender().

      • setCountPagesToConvert

        @Deprecated
        public void setCountPagesToConvert(int value)
        Deprecated. 

        The count pages to convert. Will be ignored if PageNumbersToConvert parameter specified. Please use setCountPagesToRender().

      • getPageNumbersToConvert

        @Deprecated
        public List<Integer> getPageNumbersToConvert()
        Deprecated. 

        Gets or sets the array with page numbers to convert. Please use getPageNumbersToRender().

      • getPageNumbersToConvertInternal

        public com.aspose.ms.System.Collections.Generic.List<Integer> getPageNumbersToConvertInternal()
      • setPageNumbersToConvert

        @Deprecated
        public void setPageNumbersToConvert(List<Integer> value)
        Deprecated. 

        Gets or sets the array with page numbers to convert. Please use setPageNumbersToRender().

      • getCountPagesToRender

        public int getCountPagesToRender()

        The count pages to render. Will be ignored if PageNumbersToRender parameter specified.

      • setCountPagesToRender

        public void setCountPagesToRender(int value)

        The count pages to render. Will be ignored if PageNumbersToRender parameter specified.


         The following example demonstrates how to render three consecutive pages
         of the document html representation, starting from the page number two.
         
         ViewerConfig config = new ViewerConfig();
         ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
         HtmlOptions options = new HtmlOptions();
         options.setPageNumber(2);
         options.setCountPagesToRender(3);
         String guid = "C:\\storage\\document.doc";
         java.util.List pages = htmlHandler.GetPages(guid, options);
         

      • getPageNumbersToRender

        public List<Integer> getPageNumbersToRender()

        The of page numbers to render.

      • setPageNumbersToRender

        public void setPageNumbersToRender(List<Integer> value)

        The of page numbers to render.

      • getPassword

        public String getPassword()

        The document password.

      • setPassword

        public void setPassword(String value)

        The document password.


         The following example demonstrates how to specify the document password
         when rendering html representation of the document.
         
         ViewerConfig config = new ViewerConfig();
         ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
         HtmlOptions options = new HtmlOptions();
         options.setPassword("mypass");
         String guid = "C:\\storage\\protected.pdf";
         java.util.List pages = htmlHandler.GetPages(guid, options);
         

      • getTransformations

        public int getTransformations()

        The desired document transformations.

      • setTransformations

        public void setTransformations(Transformation... value)

        The desired document transformations.

      • setTransformations

        public void setTransformations(int value)
      • getWatermark

        public Watermark getWatermark()

        The page watermark.

      • setWatermark

        public void setWatermark(Watermark value)

        The page watermark.


         The following example demonstrates how to add watermark.
         
         ViewerConfig config = new ViewerConfig();
         ViewerImageHandler imageHandler = new ViewerImageHandler(config);
         String guid = "C:\\storage\\document.doc";
         Watermark watermark = new Watermark("This is a watermark text");
         ImageOptions options = new ImageOptions();
         options.setWatermark(watermark);
         java.util.List pages = imageHandler.GetPages(guid, options);
         

      • getCellsOptions

        public CellsOptions getCellsOptions()

        Cells rendering options.

      • setCellsOptions

        public void setCellsOptions(CellsOptions value)

        Cells document rendering options.


         The following example demonstrates how to set options for rendering spreadsheet document.
         
         ViewerConfig config = new ViewerConfig();
         ViewerImageHandler imageHandler = new ViewerImageHandler(config);
         String guid = "C:\\storage\\document.xls";
         ImageOptions options = new ImageOptions();
         options.CellsOptions.setOnePagePerSheet(true);
         options.CellsOptions.setShowGridLines(true);
         options.CellsOptions.setShowHiddenSheets(true);
         java.util.List pages = imageHandler.GetPages(guid, options);
         

      • getDiagramOptions

        public DiagramOptions getDiagramOptions()

        Diagram document rendering options.

      • setDiagramOptions

        public void setDiagramOptions(DiagramOptions value)

        Diagram document rendering options.


          The following example demonstrates how to set options for rendering Diagram document.
          
          ViewerConfig config = new ViewerConfig();
          config.setStoragePath("C:\\storage\\");
          ViewerImageHandler imageHandler = new ViewerImageHandler(config);
          String guid = "document-two-hidden-pages.vsd";
          ImageOptions options = new ImageOptions();
          options.DiagramOptions.setShowHiddenPages(true);
          java.util.List pages = imageHandler.GetPages(guid, options);
          

      • getWordsOptions

        public WordsOptions getWordsOptions()

        Words document rendering options.

      • setWordsOptions

        public void setWordsOptions(WordsOptions value)

        Words document rendering options.

      • getEmailOptions

        public EmailOptions getEmailOptions()

        Email document rendering options.

      • setEmailOptions

        public void setEmailOptions(EmailOptions value)

        Email document rendering options.

      • getPdfOptions

        public PdfOptions getPdfOptions()

        PDF document rendering options.

      • setPdfOptions

        public void setPdfOptions(PdfOptions value)

        PDF document rendering options.


          The following example demonstrates how to set options for rendering Pdf document.
          
          ViewerConfig config = new ViewerConfig();
          config.setStoragePath("C:\\storage\\");
          ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler(config);
          String guid = "document.pdf";
          HtmlOptions options = new HtmlOptions();
          options.PdfOptions.setPreventGlyphsGrouping(true);
          java.util.List pages = htmlHandler.GetPages(guid, options);