pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richter, Michael" <m.rich...@tu-berlin.de>
Subject Re: PDFBox 2.0.12 creates invalid PDF/A
Date Fri, 11 Jan 2019 13:16:22 GMT
Interesting. Using your XML code works here too. So I need to use another XML Tranformer. Actually
it should be Saxon here but I didn't verify this. I'll have a look into this. Thanks.


Am Freitag, den 11.01.2019, 12:46 +0100 schrieb Tilman Hausherr:

I just ran CreatePDF.java from the example project with only one line

changed ("id.setPart(2);") and then successfully validated it on


and with VeraPDF.

The XML is:

<?xpacket begin="" id="W5M0MpCehiHzreSzNTczkc9d"?><x:xmpmeta


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

     <rdf:Description xmlns:dc="http://purl.org/dc/elements/1.1/"




           <rdf:li xml:lang="x-default">target/test-output/PDFA.pdf</rdf:li>




     <rdf:Description xmlns:pdfaid="http://www.aiim.org/pdfa/ns/id/"






</x:xmpmeta><?xpacket end="w"?>

I see  one difference in the title line. See this:



Am 11.01.2019 um 12:22 schrieb Richter, Michael:


I'm trying to create PDF/A files using PDFBox 2.0.12. My code is based on the example code
from the PDFBox repo. It creates the PDF file and I can verify XMP data is in it containing
my parameters. But tools like veraPDF and pdfPilot say it's invalid (no PDF/A info, no metadata).

So I converted the file using pdfPilot. I extracted the xpacket XML part from the resulting
PDF file. And I added this data directly without using PDFBox API. And the resulting PDF is
valid to both apps.

So I think the way PDFBox writes XMP data to PDF files, it gets invalid. Can someone confirm
that or is there something wrong in the way I do it?

I also wrote a question on stackoverflow with further infos on this:




Michael Richter

Abt. Online-Dienste und IT-Entwicklung

Technische Universität Berlin


Fasanenstraße 88

10623 Berlin



To unsubscribe, e-mail: users-unsubscribe@pdfbox.apache.org<mailto:users-unsubscribe@pdfbox.apache.org>

For additional commands, e-mail: users-help@pdfbox.apache.org<mailto:users-help@pdfbox.apache.org>

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message