mozilla / pdf.js

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

PDF document says that should be opened in Adobe Reader or higher #4282

Open JasnaPaka opened 10 years ago

JasnaPaka commented 10 years ago

When I try to open PDF document from server Justice.cz I see PDF document with info that I should use Adobe Reader 9 or higher. Maybe because AcroForm/XFA support is missing?

PDF document: http://www.jasnapaka.com/bugs/aaa.pdf OS: Windows 7 64 bit, HWA enabled pdf.js: Firefox 30.0a1 (2014-02-11), PDF.js: 0.8.990

Screenshots Firefox: http://www.jasnapaka.com/bugs/aaa-firefox.png Adobe Reader: http://www.jasnapaka.com/bugs/aaa-adobe-reader.png

Web Console "Warning: AcroForm/XFA is not supported" viewer.js:3193 "Warning: unimplemented annotation type: Widget signature" pdf.worker.js:190 "Warning: unimplemented annotation type: Widget" pdf.worker.js:190 "Warning: unimplemented annotation type: Widget signature" pdf.worker.js:190 "Warning: unimplemented annotation type: Widget"

ghost commented 10 years ago

This document is a PDF Portfolio with a regular PDF file attached (it is this attachment that is shown on your Adobe Reader screenshot). The layout part is a Flash (SWF) component which is not supported by any other viewer than Adobe Reader (desktop versions only). The "Get Adobe Reader Now!" page is what is expected to be displayed in any other viewer.

An idea to better the user experience could be to behave like Adobe Reader mobile: ignore the navigator and display a list of attachments. I'm not sure how/if PDF.js supports attachments though.

timvandermeij commented 10 years ago

@dferer First of all, thanks for looking into the annotation-related issues! The annotation layer could indeed use some improvements seeing the number of GitHub issues.

At this moment, attachments are not supported, but we have #2751 that requests that. Your solution to this problem sounds good to me: 'Get Adobe Reader' only confuses users and since it's a collection of attachments, just showing a list of them would suffice in my opinion (with an option to open each attachment).

fbender commented 8 years ago

4329 implemented attachment support. When I visit the mentioned PDF link, the viewer suggests that the PDF contains forms (I'm not sure if this is correct here). The document displays as before, however when I open the sidebar and switch to attachments (see #6644 for making this more obvious), I see the attached PDF (though when clicking, it prompts me to download the file instead of trying to open it, see #6643).

Is it possible to implement some heuristics that instead of showing the "download Acrobat" message the attachments are shown?

heianqishizhisuiyuan commented 5 years ago

How do I set it up to display a PDF the first time it loads, instead of displaying the downloaded Adobe Reader because the user doesn't want to click the attachment again

heianqishizhisuiyuan commented 5 years ago

What's the reason it doesn't display PDF, instead displaying this for users to download Adobe Reader?Is the generated PDF version too high or is there some compatibility issues?And I found that if I downloaded the PDF with pdf.js and then opened the PDF with pdf.js, it would display as normal, rather than displaying the page that allowed the user to download Adobe Reader.

Extarys commented 3 years ago

Immigration Canada (IRCC) XFA form, also as attachment below for testing purposes. A friend of mine needed the form and they do not offer it on any other format apparently. I was investigating this for him.

IRCC form as attachment: imm5708e.pdf

I think I was able to fill a PDF form recently and I was surprised it worked. Maybe I imagined it or the file format was different :confused: . Still, awesome job folks, you rock.

Side note: I thought XFA was discontinued or something. Is the Gov of Canada the only one still using those? (and faxes too) :laughing:

EDIT: Sorry, XFA was disabled in the settings, I saw that in the console trying to open the pdf. For completeness sake, this is how the form is currently rendered: image

marco-c commented 3 years ago

There are a few things in the queue which will hopefully land soon and should improve the rendering of XFA forms.

marco-c commented 3 years ago

@calixteman this is still occurring in latest Nightly.

Snuffleupagus commented 3 years ago

I'm not sure if 4-form-xfa is an entirely appropriate label here, since the document uses the "Collections" feature, see https://www.adobe.com/content/dam/acom/en/devnet/pdf/pdfs/PDF32000_2008.pdf#G11.2076363