-
-
Notifications
You must be signed in to change notification settings - Fork 480
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
Impossible to retrieve the attachments from a PDF in version 1.4 #953
Comments
VERSION is nothing to do with attachments (only related to PDF/A numbering) tested with a file that says 1.4 compatible (no error) as the file was written in the past by GhostScript thus you need to look closer as to why your source PDF file fails but version is rare as a cause. you need to supply the PDF file for analysis or TRACE WHY it fails at a given point.
|
Hello! pdfcpu maintainer here! The PDF spec clearly defines the pagemode "UseAttachments" since PDF v1.6. Since your file's version is 1.4 this is is a spec violation and has to be reported. This is not related to attachment support per se. |
I am confused /UseAttachments is a viewer control it does not have to have an attachment here is 1.1 from PDFA discussion with /UseAttachments view https://github.com/pdf-association/pdf-issues/files/11260962/out.pdf Whilst not trawling back to 1.1 |
That is correct - ISO 19005 (PDF/A) does not prohibit private data (including key values of documented keys) so long as they do not impact page rendering visual appearance. In this case, it is just a viewer UI recommendation. You can consider it "private" since it wasn't formally documented until much more recently - as per resolved PDF Errata 275 which is where the mentioned attachment is from - resolution wording. See also our recent publication "Understanding Private Data in PDF/A" for more info. |
This issue is not about the catalog entry ViewerPreferences. It's about catalog entry PageMode: The validation for this very file fails because it sets PageMode to UseAttachments and this is prohibited by the spec until v1.6: If this sounds like a contradiction then maybe it needs to be addressed in PDF Errata 275 |
That may be what the spec said, but Adobe implemented the otherwise undocumented setting in its products since it was introduced - and so had other vendors to match behaviour. Thus there are extant files in the wild with this value from that era. All PDF 2.0 has done is acknowledge this fact and make the defacto spec official. View it as an editorial oversight dating back many years :-) |
The latest commit relaxes validation of pageMode UseAttachments. |
pdfcpu
does not allow extracting attachments from a PDF in version 1.4.CLI Error:
Lib issue:
I upgraded the PDF version to 1.7 with
Ghostscript
, and then it worked. So the issue was indeed due to the PDF version.Library version: v0.8.1
CLI version: v0.8.1 dev
OS: MacOS
It would be great not to have this constraint anymore 🙏
The text was updated successfully, but these errors were encountered: