Setting Overprint Mode to 1 not permitted in PDF/A-2, reverting to normal PDF output
See original GitHub issueIn Fedora24, per default ghostscript 9.20 ist installed via the repository.
If I install ocrmypdf 4.3.1 here and invoke the command
ocrmypdf Kopie2.pdf Kopie2.pdf
I get the error message:
GPL Ghostscript 9.20: Setting Overprint Mode to 1 not permitted in PDF/A-2, reverting to normal PDF output Traceback (most recent call last): File “/usr/bin/ocrmypdf”, line 11, in <module> sys.exit(run_pipeline()) File “/usr/lib/python3.5/site-packages/ocrmypdf/main.py”, line 1520, in run_pipeline pdfa_info = file_claims_pdfa(options.output_file) File “/usr/lib/python3.5/site-packages/ocrmypdf/pdfa.py”, line 146, in file_claims_pdfa part_conformance = pdfa_dict[‘part’] + pdfa_dict[‘conformance’] KeyError: ‘part’
After downgrading to ghostscript 9.16, the error disappears. Kopie2.pdf
Issue Analytics
- State:
- Created 7 years ago
- Comments:7
Top GitHub Comments
@EtienneFerrandi - please open a new issue with all of the requested details, and provide an example file if possible. Unlikely to be related to a 5 year old issue.
The exception happens because 4.3.1 doesn’t handle the failure path correctly, which I will fix.
Alternately, you can also use
-output-type pdf
to skip PDF/A conversion, if that is not important to you - see the documentation for why you might need/want it.The PDF you supplied already contains recognized OCR text, which as the message indicates, is indeed marked for overprinting, a PDF feature only relevant to printing documents with multiple ink layers. From my testing it appears that Ghostscript 9.19 (and probably <9.19) is responsible for incorrectly inserting this command, and then Ghostscript 9.20 refuses to work with it.
After I fix the exception handling bug you should be able to use Ghostscript 9.20 on files were not previously converted to PDF/A by an earlier Ghostscript.