Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fatal: dict=markInfoDict entry=Suspects: unsupported in version 1.5 #388

Closed
GwynethLlewelyn opened this issue Oct 22, 2021 · 1 comment
Closed
Assignees

Comments

@GwynethLlewelyn
Copy link

Hi there!

Firstly, thank you so much for this package β€” I love that so many people are engaged in developing complex tools in Go πŸ‘

I've encountered a PDF that, when attempting to do anything with it using pdfcpu, will emit the following error:

Fatal: dict=markInfoDict entry=Suspects: unsupported in version 1.5
This file could be PDF/A compliant but pdfcpu only supports versions <= PDF V1.7

This PDF was automatically generated as a report from the popular application MyNetDiary (web version on macOS Big Sur (version 11.6.1 (20G211)). I've tested generating the PDF both under Brave (Chromium-based) and Safari; they were identical, so I didn't test on more browsers. However, I did try several options o:

  1. Open the PDF inside the browser itself, and save it to disk
  2. Directly download the PDF as generated by MyNetDiary
  3. Use the browser's built-in 'Print as PDF' functionality
  4. Use the 'Save Page As...' menu option (when asked for, I've selected a 'PDF' option)
  5. Do a print of the page via the system dialogue, select the default printer (a HP OfficeJet Pro 7740), but then, instead of actually printing, I've used the 'Save as PDF' option. This is different than simply saving/downloading the file directly, since it goes through one internal PDF processor.

Options 1-4 produced exactly the same file (independently of the browser used) and pdfcpu gave the same error. Option 5, because it further processes the PDF, actually generated a valid PDF, with which pdfcpu had no problems!

No other application/command/tool I've tried had any issues with the original PDF. And I've tested with quite a lot of tools!

My belief is that, as the validation error suggests, this is actually a PDF 1.7 file that gets wrongly labelled as 1.5. Almost all other tools/processors basically ignore the version number and simply accepts the PDF 'as is'. pdfcpu, even in relaxed mode, is a bit stricter, and thus catches the version discrepancy and exits. Obviously, MyNetDiary is to blame: it's been around for quite a while, and it's more than likely that, at some point, their PDF generation tool/engine was upgraded from 1.5 to be 1.7-compliant, but the developers forgot to change the PDF version number... or something like that.

As per the suggestion in #136, I'm attaching the crash.log, slightly redacted to avoid exposing my Mac's internal filesystem structure; as for the original PDF, it's just a nutrition summary for a single day, which I consider to be reasonably 'harmless' regarding whatever personal information is in it, so I'm attaching at as well.

I hope that it's useful in some way...!

Happy hunting!

Cheers,

β€” Gwyn

@hhrutter hhrutter self-assigned this Oct 22, 2021
@hhrutter
Copy link
Collaborator

Thanks for reporting this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants