Class PdfCollection

java.lang.Object
com.itextpdf.kernel.pdf.PdfObjectWrapper<PdfDictionary>
com.itextpdf.kernel.pdf.collection.PdfCollection

public class PdfCollection extends PdfObjectWrapper<PdfDictionary>
  • Field Details

  • Constructor Details

    • PdfCollection

      public PdfCollection (PdfDictionary pdfObject)
    • PdfCollection

      public PdfCollection()
      Constructs a PDF Collection.
  • Method Details

    • setSchema

      public PdfCollection setSchema (PdfCollectionSchema schema)
      Sets the Collection schema dictionary.
      Parameters:
      schema - an overview of the collection fields
      Returns:
      this instance to support fluent interface
    • getSchema

      public PdfCollectionSchema getSchema()
      Gets the Collection schema dictionary.
      Returns:
      the Collection schema dictionary
    • setInitialDocument

      public PdfCollection setInitialDocument (String documentName)
      Identifies the document that will be initially presented in the user interface.
      Parameters:
      documentName - a string that identifies an entry in the EmbeddedFiles name tree
      Returns:
      this instance to support fluent interface
    • getInitialDocument

      public PdfString getInitialDocument()
      Retrieves the document that will be initially presented in the user interface.
      Returns:
      a pdf string that identifies an entry in the EmbeddedFiles name tree
    • setView

      public PdfCollection setView (int viewType)
      Sets the initial view.
      Parameters:
      viewType - is a type of view
      Returns:
      this instance to support fluent interface
    • isViewDetails

      public boolean isViewDetails()
      Check if view is in details mode.
      Returns:
      true if view is in details mode and false otherwise
    • isViewTile

      public boolean isViewTile()
      Check if view is in tile mode.
      Returns:
      true if view is in tile mode and false otherwise
    • isViewHidden

      public boolean isViewHidden()
      Check if view is hidden.
      Returns:
      true if view is hidden and false otherwise
    • setSort

      public PdfCollection setSort (PdfCollectionSort sort)
      Sets the Collection sort dictionary.
      Parameters:
      sort - is the Collection sort dictionary
      Returns:
      this instance to support fluent interface
    • getSort

      public PdfCollectionSort getSort()
      Getter for the Collection sort dictionary.
      Returns:
      the Collection sort
    • 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.