mozilla / pdf.js

PDF Reader in JavaScript
https://mozilla.github.io/pdf.js/
Apache License 2.0
48.12k stars 9.94k forks source link

PDF doesn't display anything, complains about my pdf viewer #1773

Closed samth closed 3 years ago

samth commented 12 years ago

This PDF http://www.northeastern.edu/hrm/pdfs/resources/benefits/MBTA-pretax-form-July2012.pdf produces the following error message as the contents of the pdf:

Please wait... 

If this message is not eventually replaced by the proper contents of the document, your PDF 
viewer may not be able to display this type of document. 

You can upgrade to the latest version of Adobe Reader for Windows®, Mac, or Linux® by 
visiting  http://www.adobe.com/products/acrobat/readstep2.html. 

For more assistance with Adobe Reader visit  http://www.adobe.com/support/products/
acrreader.html.

Neither Evince nor OS X Preview works either.

jdm commented 12 years ago

Interesting messages from console:

[23:01:22.126] TypeError: currentPage is undefined @ resource://pdf.js/web/viewer.js:266 [23:01:23.268] Warning: TODO: Marked content @ http://www.northeastern.edu/hrm/pdfs/resources/benefits/MBTA-pretax-form-July2012.pdf:563

mehlis commented 12 years ago

i think this type of document has some input fields - pdf works great in adobe reader

abevoelker commented 11 years ago

From my experience that message means that the file is not an old-fashioned AcroForms PDF, but actually an XFA form created by Adobe's LiveCycle Designer. Most PDF renderers outside of Acrobat can't render these XFA forms. To get pdf.js to render this type of form, XFA standard support would have to be implemented.

jxp commented 11 years ago

I have just had the same problem occur. It would be nice if pdf.js could at least show a printable version of the form.

This is mentioned in the wiki but there doesn't seem to be any recent updates. https://wiki.mozilla.org/PDF.js#Big_project:_XFA_or_AcroForms

samth commented 10 years ago

Unfortunately, this PDF is no longer available and there's no new version.

This document http://www.cic.gc.ca/english/pdf/kits/forms/IMM5257E.PDF seems to be another example.

DuncanGEMcMillan commented 9 years ago

Solved!! I updated my Adobe Reader to the latest and greatest version using Chrome and getting the same message. I used Internet Explorer instead of Chrome and it opened up right away.

Andsbf commented 8 years ago

Apparently Adobe found a way to screw the nice standard "PDF". :(

dbrisinda commented 7 years ago

After upgrading to latest, which presumably would install the necessary plugins, these horrid XFA pdfs still don't load in Safari. My heartfelt wishes for a fast and painful death to Adobe.

SegersIan commented 7 years ago

The reason is simple. You need to launch this in the original Acrobat Adobe Reader, not 'in-browser'. 'In-browser' pdf reading is often a plugin or is 3th party rendering and does not support interactive elements. So the simple fix is, download locally the pdf and open it with the actual Acrobat Adobe Reader and not in browser or with another reader than the Adobe's one.

emilianbold commented 4 years ago

Sadly these XFA form PDFs can only be opened and printed from Adobe Reader.

My workaround is to use this printer driver on macOS https://github.com/emilianbold/PDFwriter and get Adobe to print to it. This produces a normal PDF that pdf.js / Preview can open.

timvandermeij commented 4 years ago

I have found a copy of the original document at https://web.archive.org/web/20121105185256if_/http://www.northeastern.edu/hrm/pdfs/resources/benefits/MBTA-pretax-form-July2012.pdf.

marco-c commented 3 years ago

The forms appear to be working well now. @calixteman do you want to add them to reftests?