com.groupdocs.viewer.domain.options

Class PdfFileOptions



  • public class PdfFileOptions
    extends Object

    Provides options for rendering document into PDF format.

    • Constructor Detail

      • PdfFileOptions

        public PdfFileOptions()

        Initializes a new instance of the PdfFileOptions class.

      • PdfFileOptions

        public PdfFileOptions(int transformations)

        Initializes a new instance of the PdfFileOptions class.

        Parameters:
        transformations - The desired transformations. Possible options are in Transformation.
      • PdfFileOptions

        public PdfFileOptions(int transformations,
                      Watermark watermark)

        Initializes a new instance of the PdfFileOptions class.

        Parameters:
        transformations - The desired transformations. Possible options are in Transformation.
        watermark - The watermark
      • PdfFileOptions

        public PdfFileOptions(String password)

        Initializes a new instance of the PdfFileOptions class.

        Parameters:
        password - The file password.
      • PdfFileOptions

        public PdfFileOptions(String password,
                      int transformations)

        Initializes a new instance of the PdfFileOptions class.

        Parameters:
        password - The file password.
        transformations - The desired transformations. Possible options are in Transformation.
      • PdfFileOptions

        public PdfFileOptions(String password,
                      int transformations,
                      Watermark watermark)

        Initializes a new instance of the PdfFileOptions class.

        Parameters:
        password - The file password.
        transformations - The desired transformations. Possible options are in Transformation.
        watermark - The watermark
      • PdfFileOptions

        public PdfFileOptions(String password,
                      Watermark watermark)

        Initializes a new instance of the PdfFileOptions class.

        Parameters:
        password - The file password.
        watermark - The watermark.
      • PdfFileOptions

        public PdfFileOptions(Watermark watermark)

        Initializes a new instance of the PdfFileOptions class.

        Parameters:
        watermark - The watermark.
    • Method Detail

      • getArchiveOptions

        public ArchiveOptions getArchiveOptions()

        Gets or sets the Archive file rendering options.

        Parameters:
        value - The Archive file options.
      • getCadOptions

        public CadOptions getCadOptions()

        The CAD documents rendering options.

        Returns:
        The CAD options.
      • getCellsOptions

        public CellsOptions getCellsOptions()

        The Spreadsheet documents rendering options.

        Returns:
        The Spreadsheet options.
      • getEmailOptions

        public EmailOptions getEmailOptions()

        The Email documents rendering options.

        Returns:
        The Email options.
      • getOutlookOptions

        public OutlookOptions getOutlookOptions()

        Gets or sets the Outlook Data File document rendering options.

        Returns:
        Gets or sets the Outlook Data File options.
      • getPassword

        public String getPassword()

        The password.

        Returns:
        the password
      • getPdfFileSecurity

        public PdfFileSecurity getPdfFileSecurity()

        Enables to specify owner password, user password and PDF file permissions.

      • getPdfOptions

        public PdfOptions getPdfOptions()

        The PDF documents rendering options.

        Returns:
        The PDF options.
      • getProjectOptions

        public ProjectOptions getProjectOptions()

        The Project documents rendering options.

        Returns:
        The Project options.
      • getRenderComments

        public boolean getRenderComments()

        Indicates whether comments should be rendered. Default value is false

        Returns:
        Whether comments should be rendered.
      • getSlidesOptions

        public SlidesOptions getSlidesOptions()

        The Presentation documents rendering options.

        Returns:
        The Presentation options.
      • getTransformations

        public int getTransformations()

        Gets desired transformations, the default value is Transformation.None. Possible options are in Transformation.

        Returns:
        the transformations
      • getWatermark

        public Watermark getWatermark()

        The watermark.

        Returns:
        the watermark
      • getWordsOptions

        public WordsOptions getWordsOptions()

        The Text documents rendering options.

        Returns:
        The Text options.
      • setArchiveOptions

        public void setArchiveOptions(ArchiveOptions value)

        Gets or sets the Archive file rendering options.

        Parameters:
        value - The Archive file options.
      • setCadOptions

        public void setCadOptions(CadOptions value)

        The CAD documents rendering options.

        Parameters:
        value - The CAD options.
      • setCellsOptions

        public void setCellsOptions(CellsOptions value)

        Sets cells options.

        Parameters:
        value - the value
      • setDefaultFontName

        public void setDefaultFontName(String value)

        The name of the default font.

        Note:
        Default font name may be specified in following cases:
        • You want to generally specify the default font to fall back on, if particular font in the document cannot be found during rendering.
        • Your document uses fonts, that contain non-English characters and you want to make sure any missing font is replaced with one that has the same character set available.
        Parameters:
        value - The name of the default font.
      • setEmailOptions

        public void setEmailOptions(EmailOptions value)

        The Email documents rendering options.

        Parameters:
        value - The Email options.
      • setJpegQuality

        public void setJpegQuality(int value)

        The quality of the JPEG images contained in resulting PDF document. Valid values are between 1 and 100. Default value is 90.

        Note:
        This property affects the size of resulting PDF document and the quality of JPEG images contained in it.
        Parameters:
        value - The quality.
      • setOutlookOptions

        public void setOutlookOptions(OutlookOptions value)

        Gets or sets the Outlook Data File document rendering options.

        Parameters:
        value - Gets or sets the Outlook Data File options.
      • setPassword

        public void setPassword(String value)

        The password.

        Parameters:
        value - the value
      • setPdfFileSecurity

        public void setPdfFileSecurity(PdfFileSecurity value)

        Enables to specify owner password, user password and PDF file permissions.

        Parameters:
        value - The PDF file security options.
      • setPdfOptions

        public void setPdfOptions(PdfOptions value)

        The PDF documents rendering options.

        Parameters:
        value - The PDF options.
      • setProjectOptions

        public void setProjectOptions(ProjectOptions value)

        The Project documents rendering options.

        Parameters:
        value - The Project options.
      • setRenderComments

        public void setRenderComments(boolean value)

        Indicates whether comments should be rendered. Default value is false

        Parameters:
        value - Whether comments should be rendered.
      • setShowHiddenPages

        public void setShowHiddenPages(boolean value)

        Indicates whether hidden pages, sheets or slides should be rendered. The default value is false.

        Example:
        The following example demonstrates how to enable rendering of the hidden sheets from MS Excel documents.

         ViewerHtmlHandler htmlHandler = new ViewerHtmlHandler();
         PdfFileOptions options = new PdfFileOptions();
         options.setShowHiddenPages(true);
        
         String guid = "document.xlsx";
         FileContainer pdfFile = htmlHandler.getPdfFile(guid, options);
         

        Parameters:
        value - Whether hidden pages, sheets or slides should be rendered.
      • setSlidesOptions

        public void setSlidesOptions(SlidesOptions value)

        The Presentation documents rendering options.

        Parameters:
        value - The Presentation options.
      • setTransformations

        public void setTransformations(int value)

        Gets desired transformations, the default value is Transformation.None. Possible options are in Transformation.

        Parameters:
        value - The transformations
      • setWatermark

        public void setWatermark(Watermark value)

        The watermark.

        Parameters:
        value - the value
      • setWordsOptions

        public void setWordsOptions(WordsOptions value)

        The Text documents rendering options.

        Parameters:
        value - The Text options.