Uploaded image for project: 'PDFBox'
  1. PDFBox
  2. PDFBOX-1872

PDMetadata.exportXMPMetadata fails when Metadata has encrypted stream

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.8.3
    • Fix Version/s: 1.8.7, 2.0.0
    • Component/s: JempBox, PDModel
    • Labels:
      None
    • Environment:
      Not sure it matters, but Solaris (SunOS 5.10), java 1.6.0_19,

      Description

      When the Metadata is encoded with the Crypt filter, exportMetadata() fails to parse the XML. My guess is that PDDocumentCatalog.getMetadata() gives PDMetadata the raw stream, instead of the filtered one. Then PDMetadata.exportXMPMetadata() calls XMPMetadata.load(), which cannot parse the encrypted stream.
      While I cannot post the document (proprietary), the outline shown by PDFDebugger goes like this:
      Root:Dictionary(Catalog)
      + AcroForm:Dictionary

      • Metadata:Stream(Metadata:XML)
      • Filter:Array
        o [0] Crypt
        o Length:6302
        o Subtype:XML
        o Type:Metadata

        Attachments

          Activity

            People

            • Assignee:
              lehmi Andreas Lehmkühler
              Reporter:
              brzrkr Pat Hickey
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: