Class PdfViewerPreferences

    • Constructor Detail

      • PdfViewerPreferences

        public PdfViewerPreferences()
      • PdfViewerPreferences

        public PdfViewerPreferences​(PdfDictionary pdfObject)
    • Method Detail

      • setHideToolbar

        public PdfViewerPreferences setHideToolbar​(boolean hideToolbar)
        This method sets HideToolBar flag to true or false
        Parameters:
        hideToolbar - HideToolBar flag's boolean value
        Returns:
        current instance of PdfViewerPreferences
      • setHideMenubar

        public PdfViewerPreferences setHideMenubar​(boolean hideMenubar)
        This method sets HideMenuBar flag to true or false
        Parameters:
        hideMenubar - HideMenuBar flag's boolean value
        Returns:
        current instance of PdfViewerPreferences
      • setHideWindowUI

        public PdfViewerPreferences setHideWindowUI​(boolean hideWindowUI)
        This method sets HideWindowUI flag to true or false
        Parameters:
        hideWindowUI - HideWindowUI flag's boolean value
        Returns:
        current instance of PdfViewerPreferences
      • setFitWindow

        public PdfViewerPreferences setFitWindow​(boolean fitWindow)
        This method sets FitWindow flag to true or false
        Parameters:
        fitWindow - FitWindow flag's boolean value
        Returns:
        current instance of PdfViewerPreferences
      • setCenterWindow

        public PdfViewerPreferences setCenterWindow​(boolean centerWindow)
        This method sets CenterWindow flag to true or false
        Parameters:
        centerWindow - CenterWindow flag's boolean value
        Returns:
        current instance of PdfViewerPreferences
      • setDisplayDocTitle

        public PdfViewerPreferences setDisplayDocTitle​(boolean displayDocTitle)
        This method sets DisplayDocTitle flag to true or false
        Parameters:
        displayDocTitle - DisplayDocTitle flag's boolean value
        Returns:
        current instance of PdfViewerPreferences
      • setNonFullScreenPageMode

        public PdfViewerPreferences setNonFullScreenPageMode​(PdfViewerPreferences.PdfViewerPreferencesConstants nonFullScreenPageMode)
        This method sets NonFullScreenPageMode property. Allowed values are UseNone, UseOutlines, useThumbs, UseOC. This entry is meaningful only if the value of the PageMode entry in the Catalog dictionary is FullScreen
        Parameters:
        nonFullScreenPageMode - NonFullScreenPageMode property type value
        Returns:
        current instance of PdfViewerPreferences
      • setPickTrayByPDFSize

        public PdfViewerPreferences setPickTrayByPDFSize​(boolean pickTrayByPdfSize)
        This method sets PickTrayByPDFSize flag to true or false.
        Parameters:
        pickTrayByPdfSize - PickTrayByPDFSize flag's boolean value
        Returns:
        current instance of PdfViewerPreferences
      • setPrintPageRange

        public PdfViewerPreferences setPrintPageRange​(int[] printPageRange)
        This method sets the page numbers used to initialize the print dialog box when the file is printed.
        Parameters:
        printPageRange - the array of page numbers
        Returns:
        current instance of PdfViewerPreferences
      • setNumCopies

        public PdfViewerPreferences setNumCopies​(int numCopies)
        This method sets the number of copies that shall be printed when the print dialog is opened for this file.
        Parameters:
        numCopies - the number of copies to print when the print dialog is opened
        Returns:
        current instance of PdfViewerPreferences
      • setEnforce

        public PdfViewerPreferences setEnforce​(PdfArray enforce)
        PDF 2.0. Sets an array of names of Viewer preference settings that shall be enforced by PDF processors and that shall not be overridden by subsequent selections in the application user interface
        Parameters:
        enforce - array of names specifying settings to enforce in the PDF processors
        Returns:
        this PdfViewerPreferences instance
      • getEnforce

        public PdfArray getEnforce()
        PDF 2.0. Gets an array of names of Viewer preference settings that shall be enforced by PDF processors and that shall not be overridden by subsequent selections in the application user interface
        Returns:
        array of names specifying settings to enforce in the PDF processors
      • isWrappedObjectMustBeIndirect

        protected boolean isWrappedObjectMustBeIndirect()
        Description copied from class: PdfObjectWrapper
        Defines if the object behind this wrapper must be an indirect object in the resultant document.

        If this method returns true it doesn't necessarily mean that object must be in the indirect state at any moment, but rather defines that when the object will be written to the document it will be transformed into indirect object if it's not indirect yet.

        Return value of this method shouldn't depend on any logic, it should return always true or false.
        Specified by:
        isWrappedObjectMustBeIndirect in class PdfObjectWrapper<PdfDictionary>
        Returns:
        true if in the resultant document the object behind the wrapper must be indirect, otherwise false.