I have upgraded to 2.0.7 today and it works fine with this release.
Thanks! Esteban ________________________________ De: Andreas Lehmkuehler <andr...@lehmi.de> Enviado: lunes, 24 de julio de 2017 05:00 p.m. Para: users@pdfbox.apache.org Asunto: Re: Invalid XMP generated by CreatePDFA? Hi, Am 21.07.2017 um 22:46 schrieb Esteban R: > Hello. I get an exception while parsing XMPMetadata (details below) created > by CreatePDFA (https://pdfbox.apache.org/1.8/cookbook/pdfacreation.html) Apache PDFBox | Create a Valid PDF/A Document<https://pdfbox.apache.org/1.8/cookbook/pdfacreation.html> pdfbox.apache.org PDF/A Creation. The Apache PDFBox API can be used to create a PDF/A file. PDF/A is a PDF file with some constraints to ensure its long time conservation. > > > I have noticed that adding "xml:" before "lang" in the following line of the > "<dc:title>" solves the issue: > > <rdf:li lang="x-default">out.pdf</rdf:li> > > (Fixed line: <rdf:li xml:lang="x-default">out.pdf</rdf:li> ) > > Is this an error in the metadata? > > > Additional details: > > This is the complete XMP created by CreatePDFA (line 6 is the problem): > > <x:xmpmeta xmlns:x="adobe:ns:meta/"> > <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> www.w3.org<http://www.w3.org/1999/02/22-rdf-syntax-ns#> www.w3.org @prefix rdf: . @prefix rdfs: . @prefix owl: . @prefix dc: . a owl:Ontology ; dc:title "The RDF Concepts Vocabulary (RDF)" ; dc:description "This is the RDF Schema for ... > <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/" > rdf:about=""> > <dc:title> > <rdf:Alt> > <rdf:li lang="x-default">out.pdf</rdf:li> > </rdf:Alt> > </dc:title> > </rdf:Description> > <rdf:Description xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/" > rdf:about=""> > <pdfaid:part>1</pdfaid:part> > <pdfaid:conformance>B</pdfaid:conformance> > </rdf:Description> > </rdf:RDF> > </x:xmpmeta> > <?xpacket end="w"?> > > > I tried to parse the XMP metadata with Adobe's XMP parser > (http://www.adobe.com/devnet/xmp.html) and I get the following exception: Adobe - XMP Developer Center | Adobe Developer Connection<http://www.adobe.com/devnet/xmp.html> www.adobe.com Adobe's Extensible Metadata Platform (XMP) is a labeling technology that allows you to embed data about a file, known as metadata, into the file itself. More ... > > com.adobe.internal.xmp.XMPException: Nested content not allowed with > rdf:resource or property attributes. > > The code for parsing is basically: > XMPMetaFactory.parse(new FileInputStream(args[0])); > (I save the XMP metadata to a file with PDFDebugger) > > I'm using pdfbox 2.0.5. I can provide more details (and step by step > instructions to reproduce) if needed. I can't reproduce the described effect using the current trunk and 2.0.7. Maybe you should update to the newest version. > > Esteban Ruiz > Andreas --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org For additional commands, e-mail: users-h...@pdfbox.apache.org