Class GFCosDocument

All Implemented Interfaces:
Object, CosDocument, CosObject

public class GFCosDocument extends GFCosObject implements CosDocument
Author:
Timur Kamalov
  • Field Details

  • Constructor Details

    • GFCosDocument

      public GFCosDocument(COSDocument cosDocument)
      Constructor using greenfield COSDocument
      Parameters:
      cosDocument - greenfield COSDocument
  • Method Details

    • getnrIndirects

      public Long getnrIndirects()
      Number of indirect objects in the document
      Specified by:
      getnrIndirects in interface CosDocument
    • getheaderVersion

      public Double getheaderVersion()
      Description copied from interface: CosDocument
      version of the document
      Specified by:
      getheaderVersion in interface CosDocument
      Returns:
      version of pdf document
    • getheaderOffset

      public Long getheaderOffset()
      Description copied from interface: CosDocument
      offset of the PDF document header
      Specified by:
      getheaderOffset in interface CosDocument
    • getheader

      public String getheader()
      Description copied from interface: CosDocument
      the content of the PDF header
      Specified by:
      getheader in interface CosDocument
    • getheaderByte1

      public Long getheaderByte1()
      Description copied from interface: CosDocument
      first four bytes in the comment that follows the PDF header
      Specified by:
      getheaderByte1 in interface CosDocument
    • getheaderByte2

      public Long getheaderByte2()
      Specified by:
      getheaderByte2 in interface CosDocument
    • getheaderByte3

      public Long getheaderByte3()
      Specified by:
      getheaderByte3 in interface CosDocument
    • getheaderByte4

      public Long getheaderByte4()
      Specified by:
      getheaderByte4 in interface CosDocument
    • getisOptionalContentPresent

      public Boolean getisOptionalContentPresent()
      true if catalog contain OCProperties key
      Specified by:
      getisOptionalContentPresent in interface CosDocument
    • getpostEOFDataSize

      public Long getpostEOFDataSize()
      EOF must complies PDF/A standard
      Specified by:
      getpostEOFDataSize in interface CosDocument
    • getfirstPageID

      public String getfirstPageID()
      Description copied from interface: CosDocument
      id of the first page trailer, if the document is linearized. Null, if the document is not linearized
      Specified by:
      getfirstPageID in interface CosDocument
      Returns:
      ID of first page trailer
    • getlastID

      public String getlastID()
      Description copied from interface: CosDocument
      id of the last trailer in the document
      Specified by:
      getlastID in interface CosDocument
      Returns:
      ID of last document trailer
    • getfirstPageIDValue

      public String getfirstPageIDValue()
      Description copied from interface: CosDocument
      string representation of id of the first page trailer, if the document is linearized. Null, if the document is not linearized
      Specified by:
      getfirstPageIDValue in interface CosDocument
    • getlastIDValue

      public String getlastIDValue()
      Description copied from interface: CosDocument
      string representation of id of the last trailer in the document
      Specified by:
      getlastIDValue in interface CosDocument
    • getisLinearized

      public Boolean getisLinearized()
      Description copied from interface: CosDocument
      true if the document is linearized
      Specified by:
      getisLinearized in interface CosDocument
      Returns:
      true if the current document is linearized
    • getdoesInfoMatchXMP

      public Boolean getdoesInfoMatchXMP()
      Description copied from interface: CosDocument
      true if Info dictionary is present and synchronized with the document metadata
      Specified by:
      getdoesInfoMatchXMP in interface CosDocument
      Returns:
      true if XMP content matches Info dictionary content
    • getMarked

      public Boolean getMarked()
      Description copied from interface: CosDocument
      the value of the /Marked entry in the MarkInfo dictionary (false, if this entry is missing)
      Specified by:
      getMarked in interface CosDocument
    • getDisplayDocTitle

      public Boolean getDisplayDocTitle()
      Description copied from interface: CosDocument
      value of the /DisplayDocTitle key in the ViewerPreferences dictionary
      Specified by:
      getDisplayDocTitle in interface CosDocument
    • getcontainsPieceInfo

      public Boolean getcontainsPieceInfo()
      Description copied from interface: CosDocument
      true if the document catalog dictionary contains PieceInfo entry
      Specified by:
      getcontainsPieceInfo in interface CosDocument
    • getMarkInfo

      public String getMarkInfo()
      Description copied from interface: CosDocument
      string representation of the MarkInfo dictionary
      Specified by:
      getMarkInfo in interface CosDocument
    • getViewerPreferences

      public String getViewerPreferences()
      Description copied from interface: CosDocument
      string representation of the ViewerPreferences dictionary
      Specified by:
      getViewerPreferences in interface CosDocument
    • getcontainsInfo

      public Boolean getcontainsInfo()
      Description copied from interface: CosDocument
      true if the trailer dictionary contains Info key
      Specified by:
      getcontainsInfo in interface CosDocument
    • getSuspects

      public Boolean getSuspects()
      Description copied from interface: CosDocument
      value of the /Suspects entry in the MarkInfo dictionary
      Specified by:
      getSuspects in interface CosDocument
    • getRequirements

      public String getRequirements()
      Description copied from interface: CosDocument
      - null, if the /Requirements key is not present in the document Catalog
      Specified by:
      getRequirements in interface CosDocument
    • getNeedsRendering

      public Boolean getNeedsRendering()
      Description copied from interface: CosDocument
      NeedsRendering entry in the document's Catalog (false by default)
      Specified by:
      getNeedsRendering in interface CosDocument
      Returns:
      true if NeedsRendering entry in catalog contains true value.
    • getcontainsEmbeddedFiles

      public Boolean getcontainsEmbeddedFiles()
      Description copied from interface: CosDocument
      true, if the document contains the EmbeddedFiles entry in the names dictionary
      Specified by:
      getcontainsEmbeddedFiles in interface CosDocument
    • getLinkedObjects

      public List<? extends Object> getLinkedObjects(String link)
      Specified by:
      getLinkedObjects in interface Object
      Overrides:
      getLinkedObjects in class GenericModelObject
      Parameters:
      link - - the name of a link
      Returns:
      List of objects with the given link