Closed samth closed 3 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
i think this type of document has some input fields - pdf works great in adobe reader
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.
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
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.
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.
Apparently Adobe found a way to screw the nice standard "PDF". :(
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.
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.
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.
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.
The forms appear to be working well now. @calixteman do you want to add them to reftests?
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:
Neither Evince nor OS X Preview works either.