Class PDFInfo


  • public class PDFInfo
    extends Object
    The class will parse the info embedded in a PDF, and return them either globally (toHashMap() or toString()) or via individual getters.

    The PDF is parsed only at first call to run(). Values are cached during first call.

    About page sizes, see PDF page boxes for details. Here, we get the info from the first page only. The dimensions are in points. Divide by 72 to get it in inches.

    Since:
    8.10
    • Constructor Detail

      • PDFInfo

        public PDFInfo​(Blob inBlob)
        Constructor with a Blob.
        Parameters:
        inBlob - Input blob.
      • PDFInfo

        public PDFInfo​(Blob inBlob,
                       String inPassword)
        Constructor for Blob + encrypted PDF.
        Parameters:
        inBlob - Input blob.
        inPassword - If the PDF is encrypted.
      • PDFInfo

        public PDFInfo​(DocumentModel inDoc)
        Constructor with a DocumentModel. Uses the default file:content xpath to get the blob from the document.
        Parameters:
        inDoc - Input DocumentModel.
      • PDFInfo

        public PDFInfo​(DocumentModel inDoc,
                       String inXPath,
                       String inPassword)
        Constructor for DocumentModel + encrypted PDF

        If inXPath is null or "", it is set to the default file:content value.

        Parameters:
        inDoc - Input DocumentModel.
        inXPath - Input XPath.
        inPassword - If the PDF is encrypted.