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

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

Closed
samth opened this issue May 29, 2012 · 12 comments · Fixed by #13616
Closed

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

samth opened this issue May 29, 2012 · 12 comments · Fixed by #13616
Assignees

Comments

@samth
Copy link

samth commented May 29, 2012

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
Copy link
Contributor

jdm commented May 31, 2012

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
Copy link
Contributor

mehlis commented Jul 8, 2012

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

@abevoelker
Copy link

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
Copy link

jxp commented Jun 20, 2013

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
Copy link
Author

samth commented Jun 16, 2014

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
Copy link

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
Copy link

Andsbf commented May 19, 2016

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

@dbrisinda
Copy link

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
Copy link

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
Copy link

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
Copy link
Contributor

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
Copy link
Contributor

marco-c commented Jun 11, 2021

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

marco-c added a commit to marco-c/pdf.js that referenced this issue Jun 23, 2021
@marco-c marco-c linked a pull request Jun 23, 2021 that will close this issue
marco-c added a commit to marco-c/pdf.js that referenced this issue Jun 23, 2021
marco-c added a commit to marco-c/pdf.js that referenced this issue Jun 23, 2021
marco-c added a commit to marco-c/pdf.js that referenced this issue Jun 23, 2021
marco-c added a commit to marco-c/pdf.js that referenced this issue Jun 29, 2021
calixteman added a commit that referenced this issue Jun 29, 2021
conghoang added a commit to conghoang/pdf.js that referenced this issue Jul 15, 2021
* commit '62808cb3c232ade45cc19495d68a70410daf1682': (168 commits)
  Fix the remaining ESLint `operator-assignment` errors
  Enable the ESLint `operator-assignment` rule
  Remove the `version` field from the `package.json` file
  XFA - Don't use system font when a font is not embeded but there is a substitution   - always use a font coming from pdf.js when there is one: this way we don't use a system font which could looks wrong.
  [api-minor] Support accessing both the original and modified PDF fingerprint
  Don't attempt to structure clone unsupported types with workers disabled
  Replace `instanceof Object` with `typeof` checks
  XFA - Don't fill when the fill element is not visible (bug 1718735)
  XFA - Remove empty pages   - it aims to fix mozilla#13583;   - fix the switch to breakBefore target;   - force the layout of an unsplittable element on an empty page;   - don't fail when there is horizontal overflow (except in lr-tb);   - handle correctly overflow in the same content area (bug 1717805, bug 1717668);   - fix a typo in radial gradient first argument.
  Add PDFs from mozilla#1773 to the reftests
  XFA - Support non-embedded fonts without a Widths entry   - some pdf use some fonts which are not embedded or they don't have any width array or don't have any css info (e.g. for standard fonts or Arial).   - so add widths arrays for Liberation fonts in order to compute the ones for other fonts in using scale factors array.
  XFA - Choice list has no selected value by default
  XFA - Implement aspect property on image element   - it aims to fix issue mozilla#13634;   - move some img-related functions in test/drivers.js in order to have images in xfa reftests.
  XFA - Fix width of a container with lr-tb layout (bug 1718037)
  XFA - Remove quotes of font name in xhtml
  Add non-PRODUCTION/TESTING overflow `assert`s to various string helper-functions (issue 6759)
  XFA - Replace deprecated break element (bug 1718053)   - the break element has been deprecated in XFA 2.4 but some old documents can use it, so replace it with one (or more) of its possible substitutions:     - breakBefore;     - breakAfter;     - overflow.
  Add a `OnProgressParameters` typedef to reduce (some) duplication in `src/display/api.js`
  Use the `RefProxy` typedef in more JSDoc comments in `src/display/api.js`
  Update l10n files
  ...

# Conflicts:
#	src/display/canvas.js
bh213 pushed a commit to bh213/pdf.js that referenced this issue Jun 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.