You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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:
Open the PDF inside the browser itself, and save it to disk
Directly download the PDF as generated by MyNetDiary
Use the browser's built-in 'Print as PDF' functionality
Use the 'Save Page As...' menu option (when asked for, I've selected a 'PDF' option)
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.
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: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:
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 whichpdfcpu
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
The text was updated successfully, but these errors were encountered: