Reputation: 322
I try to create a PDF/A file out of many PDF/A-Files in the folder pdf-files
.
gs -dPDFA=2 -dBATCH -dNOPAUSE -q -sProcessColorModel=DeviceRGB -sDEVICE=pdfwrite -dPDFACompatibilityPolicy=1 -sOutputFile=Unsigned_Joined_Document.pdf ./pdf-files/*
But when I execute this, it gives me this error message and creates a PDF1.7 File.
GPL Ghostscript 9.50: UTF16BE text string detected in DOCINFO cannot be represented in XMP for PDF/A1, discarding DOCINFO
GPL Ghostscript 9.50: Setting Overprint Mode to 1
not permitted in PDF/A-2, overprint mode not set
I tried various questions on stack overflow but to no avail.
Upvotes: 1
Views: 975
Reputation: 31141
The documentation on creating a PDF/A file is here
Notice in the example command line the inclusion of 'PDFA_def.ps', that's a file which you need to customise, and has PostScript code which does a few steps which are required to create a valid PDF/A.
There's a 'template' version of that file in ghostpdl/lib/PDFA_def.ps, you must customise that appropriately, in particular you must set the /ICCProfile (and you need to make sure it's the right profile; Gray, RGB or CMYK to match the ColorConversionStrategy).
However, failing to include that that should not prevent pdfwrite producing a PDF/A file, it just won't (in general) be 100% valid.
Upvotes: 2