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

Feature request: add support for reading attachments #6

Open
etuini opened this issue Jul 20, 2017 · 2 comments
Open

Feature request: add support for reading attachments #6

etuini opened this issue Jul 20, 2017 · 2 comments

Comments

@etuini
Copy link

etuini commented Jul 20, 2017

This may be low on your priority list, but being able to read PDF attachments would be great. I deal with a lot of PDFs that have xml or excel attachments with the source data used to generate the PDF. There just aren't many tools for dealing with attachments - it seems most people use command line tools.

@sambitdash
Copy link
Owner

sambitdash commented Jul 20, 2017

PDF attachments are essentially annotations of file attachment type. Technically, the support exists in the current APIs. If you will read the PDF spec and access the CosObject relevant to the annotations you are looking for using Cos layer APIs you can technically get what you need with the current API. Let me see if I can provide you a code snippet for the same.

However, if you are looking for one method to access all file attachments, it may take some more time as I will have to implement for annotations in general in one go.

sambitdash referenced this issue Jul 25, 2017
This will not work for file attachments.
sambitdash referenced this issue Jul 25, 2017
1. CosObjects are exposed from PDDoc and PDPage
2. xref for overriden entries are ignored.
3. helper enahnced to extract FileAttachment annots.
@sambitdash
Copy link
Owner

The 2 checkins above can address the need while the APIs are enhanced to support annots properly.

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