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

Embedded Files in PDF not working - kind of !? #6276

Closed
4F2E4A2E opened this issue Jul 28, 2015 · 2 comments
Closed

Embedded Files in PDF not working - kind of !? #6276

4F2E4A2E opened this issue Jul 28, 2015 · 2 comments

Comments

@4F2E4A2E
Copy link

Hello Guys!

Thank you for this great project and Community, as already discussed today in the IRC-Chat we are having a hard time reading Embedded Files from a PDF [6].

The topic is not an easy one but some guys [1] have already explained and done the ground work for a discussion about this.

Here is how it it can be reproduced:

Working Case:

Open up the PDF-JS Viewer [3] with the file [2] mentioned in the article [1], click the attachments tab and download the embedded file. Great it works!

No so working case:

Create an empty PDF and add an attachment to it [4] or use this test file [5], open up the PDF-JS Viewer [3] with one of the mentioned files and click on the attachments tab, it does not work.

Why?

We think that there are more ways how to embed files into a pdf since newer versions of pdf acrobat readers appeared and the other ways have most probably not been implemented yet. Therefore a file embedded with Acrobat Reader higher version - like 11, will be not found and not displayed by pdf.js at all.

1: http://openpreservation.org/blog/2013/01/09/what-do-we-mean-embedded-files-pdf/
2: http://opf-labs.org/format-corpus/pdfCabinetOfHorrors/fileAttachment.pdf
3: http://mozilla.github.io/pdf.js/web/viewer.html
4: http://help.adobe.com/en_US/acrobat/X/standard/using/WS58a04a822e3e50102bd615109794195ff-7e4e.w.html
5: https://onedrive.live.com/view.aspx?resid=A2E6EDB5D81A9B36!7890&ithint=file%2cpdf&app=WordPdf&authkey=!AKx_9e-1AJjlAEE
6: http://blogs.adobe.com/insidepdf/2010/11/pdf-file-attachments.html

@VladBlue
Copy link

We have uploaded the not working attachments here:

https://onedrive.live.com/view.aspx?resid=A2E6EDB5D81A9B36!7890&ithint=file%2cpdf&app=WordPdf&authkey=!AKx_9e-1AJjlAEE

Please let us know your thoughts!

@timvandermeij
Copy link
Contributor

The reason for this issue is that the attachments are added as FileAttachment annotations, which are not supported by PDF.js yet. Previously this was not clear, but with the refactored annotation code this is now visible in the console:

Warning: Unimplemented annotation type "FileAttachment", falling back to base annotation

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

4 participants