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

Incorrect accordance between attributes and properties

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 2.0.0
    • 2.0.0
    • Writing, XmpBox
    • None

    Description

      when i write code as follows:

      PDDocument document = PDDocument.load(DOCUMENT_FILE);
      DomXmpParser parser = new DomXmpParser();
      XMPMetadata metadata = parser.parse(document.getDocumentCatalog().getMetadata().getStream().getUnfilteredStream());
      metadata.removeSchema(metadata.getPDFIdentificationSchema());
      File out = new File(OUTPUT_PATH);
      OutputStream res = new FileOutputStream(out);
      new XmpSerializer().serialize(metadata, res, true);
      

      I get xml with following tags hierarchy:

      <rdf:Description xmlns:xmp="http://ns.adobe.com/xap/1.0/" CreateDate="2015-03-10T17:19:21+01:00" CreatorTool="veraPDF Test Builder" ModifyDate="2015-03-10T17:19:21+01:00" rdf:about="">
            <xmp:CreateDate>2015-03-10T17:19:21+01:00</xmp:CreateDate>
            <xmp:CreatorTool>veraPDF Test Builder</xmp:CreatorTool>
            <xmp:ModifyDate>2015-03-10T17:19:21+01:00</xmp:ModifyDate>
      </rdf:Description>
      

      It`s happens when some properties used in attributes. If this properties in source file used in tags then no problems.

      Attachments

        1. restest.xml
          1 kB
          Evgeniy Muravitskiy
        2. InfoXMP.pdf
          9 kB
          Evgeniy Muravitskiy

        Activity

          People

            Unassigned Unassigned
            evgeniy.muravitskiy Evgeniy Muravitskiy
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: