question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Setting Overprint Mode to 1 not permitted in PDF/A-2, reverting to normal PDF output

See original GitHub issue

In 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:closed
  • Created 7 years ago
  • Comments:7

github_iconTop GitHub Comments

1reaction
jbarlow83commented, Apr 21, 2021

@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.

1reaction
jbarlow83commented, Nov 9, 2016

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.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Setting Overprint Mode to 1 not permitted in PDF/A-2, reverting ...
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 ......
Read more >
ghostscript only create PDF1.7 not PDF/A - Stack Overflow
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 ......
Read more >
[gs-devel] How to set overprint mode - Ghostscript
The eps or Postscript files need to contain the commands for enabling overprinting or overprint mode (setoverprint or setoverprintmode).
Read more >
PDF - Digital meets Culture
The profile stream that is the value of the DestOutputProfile is output ... Overprint mode (OPM) isl not one (1) and ICCBased CMYK...
Read more >
3-Heights® Document Converter - PDF Tools
3-Heights® Document Converter, December 1, 2022 | 1/159 ... Document conversion settings tab . ... The supported output formats are. PDF.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found