Quantcast
Channel: Adobe Community: Message List - XMP SDK
Viewing all articles
Browse latest Browse all 801

XMP SDK error: duplicate property or field node 'pdf:Producer'

$
0
0

Since my original post was moved to an unrelated/wrong forum here again in the correct forum:

 

When reading a PDF programmatically with the XMP SDK (version 5.1.3) I get the following exception:

 

Caused by: com.adobe.xmp.XMPException: Duplicate property or field node 'pdf:Producer'     at com.adobe.xmp.impl.XMP
Node.assertChildNotExisting(Unknown Source)     at com.adobe.xmp.impl.XMPNode.addChild(Unknown Source)     at com.adobe.xmp.impl.ParseRDF.addChildNode(Unknown Source)     at com.adobe.xmp.impl.ParseRDF.rdf_LiteralPropertyElement(Unknown Source)     at com.adobe.xmp.impl.ParseRDF.rdf_PropertyElement(Unknown Source)     at com.adobe.xmp.impl.ParseRDF.rdf_PropertyElementList(Unknown Source)     at com.adobe.xmp.impl.ParseRDF.rdf_NodeElement(Unknown Source)     at com.adobe.xmp.impl.ParseRDF.rdf_NodeElementList(Unknown Source)     at com.adobe.xmp.impl.ParseRDF.rdf_RDF(Unknown Source)     at com.adobe.xmp.impl.ParseRDF.parse(Unknown Source)     at com.adobe.xmp.impl.XMPMetaParser.parse(Unknown Source)     at com.adobe.xmp.XMPMetaFactory.parseFromBuffer(Unknown Source)     at com.adobe.xmp.XMPMetaFactory.parseFromBuffer(Unknown Source) 

When opening the PDF with an text editor there is indeed a redundant entry:

<x:xmpmeta x:xmptk="Adobe XMP Core 5.1.0-jc003" xmlns:x="adobe:ns:meta/">

  <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">

    <rdf:Description dc:format="application/pdf" pdf:Producer="Some producer" pdfaid:conformance="B" pdfaid:part="1" rdf:about="" ...>

...

<pdf:Producer>Some producer</pdf:Producer>

</rdf:Description>

</rdf:RDF>

 

I have found PDFs which contain one or the other but not both. So where is the error?

 

1. Both producer are valid - its a bug in XMP library

2. One producer is ok (the tag or the attribute version) but not two

3. The "xml attribute" producer is correct the other is not

4. The "xml tag" producer is correct the other is not


Viewing all articles
Browse latest Browse all 801

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>