Closed Bug 974937 Opened 10 years ago Closed 11 months ago

inline pdf is not shown using firefox

Categories

(Firefox :: File Handling, defect)

30 Branch
x86
Windows 8.1
defect

Tracking

()

RESOLVED INCOMPLETE

People

(Reporter: vanaya, Unassigned)

References

Details

(Whiteboard: [pdfjs-c-integration])

User Agent: Mozilla/5.0 (Windows NT 6.3; Win64; x64; rv:30.0) Gecko/20100101 Firefox/30.0 (Beta/Release)
Build ID: 20140220030202

Steps to reproduce:

I browsed till a bank account and click on a link that opens a popup that shows a pdf embedded. The point is that the pop up is shown in blank. I have used developer tools to see that the browser makes a post request an gets in the response header a temporal file path with an identifier that is supposed to open the pdf, but firefox doesn't make the request with that url, in chrome I can see that it makes that http call. Nothing appears in the console. Everything is ok. I have tried to point firefox to open the doc to other pdf plugins but behaviour doesn't change. 

The url return in the post is:
rutaArchivoTemporal: "/es/ver/descargarFicheroTemporal?identificadorDescarga=G2598988227MD"


Actual results:

blank pop without the file


Expected results:

open the pdf or external pdf viewer inline (such as chrome or internet explorer actually do).
Component: Untriaged → PDF Viewer
Can you inspect the element and see how it embeds the pdf e.g. if it uses a <embed> or <iframe> tag?
Flags: needinfo?(vanaya)
Priority: -- → P3
Whiteboard: [pdfjs-c-integration]
I have inspected the html and this is what comes:
<div id="pdfVisor" class="pdfobj"></div>.

I don't know why but with opera, chrome or internet explorer it works. Even when I switch off firefox inline pdf, it doesn't work. It seems to be something with the post request that receives a temporal url and in other browsers a see a call with that temporal url (the attribute is called temporalfilepath (my translation from spanish)). Firefox doesn't do that post http request. I don't know if doesn't recognize something in the response.



(In reply to Brendan Dahl [:bdahl] from comment #1)
> Can you inspect the element and see how it embeds the pdf e.g. if it uses a
> <embed> or <iframe> tag?
Flags: needinfo?(vanaya)
Ok. browsing with chrome I see that within those div tags chrome retrieves:

<object data="/es/ver/descargarFicheroTemporal?identificadorDescarga=G2598988227MD#navpanes=0&amp;statusbar=0&amp;toolbar=1&amp;messages=0&amp;scale=100&amp;view=Fit" type="application/pdf" width="665" height="415"></object>

Greetings,

(In reply to Brendan Dahl [:bdahl] from comment #1)
> Can you inspect the element and see how it embeds the pdf e.g. if it uses a
> <embed> or <iframe> tag?
It is a problem with the PDFObject javascript library. Firefox is the only browser not processing it properly.


http://pdfobject.com/examples/simplest-styled.html


(In reply to Brendan Dahl [:bdahl] from comment #1)
> Can you inspect the element and see how it embeds the pdf e.g. if it uses a
> <embed> or <iframe> tag?

According to https://pdfobject.com/#browser-support and https://pdfobject.com/examples/detection.html
Tested on Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:97.0) Gecko/20100101 Firefox/97.0 (nightly)

"This browser supports inline PDFs"

so this bug can be closed as it is fixed...

This bug is fixed by:

2021-12-20T22:54:09.553000: DEBUG : Found commit message:
Bug 1720402 - Enable XFA support in the PDF viewer. r=pdfjs-reviewers,marco
Differential Revision: https://phabricator.services.mozilla.com/D119828

pushlog_url: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=57df65303546eb84095eafd957af4f5346fedf3c&tochange=f9224c70120b43bbde63ce5fb8dba167d024c810

Tested with a local HTML-file:
<HTML>
<BODY>
<object data="https://bug1739502.bmoattachments.org/attachment.cgi?id=9249303" type="application/pdf" width="665" height="415"></object>
</BODY>

(In reply to Kenan from comment #6)

This bug is fixed by:

2021-12-20T22:54:09.553000: DEBUG : Found commit message:
Bug 1720402 - Enable XFA support in the PDF viewer. r=pdfjs-reviewers,marco
Differential Revision: https://phabricator.services.mozilla.com/D119828

pushlog_url: https://hg.mozilla.org/integration/autoland/pushloghtml?fromchange=57df65303546eb84095eafd957af4f5346fedf3c&tochange=f9224c70120b43bbde63ce5fb8dba167d024c810

Tested with a local HTML-file:
<HTML>
<BODY>
<object data="https://bug1739502.bmoattachments.org/attachment.cgi?id=9249303" type="application/pdf" width="665" height="415"></object>
</BODY>

The fix you found is simply because the PDF you have in "data" is a XFA one, otherwise the fix would have been even older.
But I think this bug is about some other specific way to embed a PDF in a page, so not reproducible simply with the "object".

Works for me with the Build 2014-02-20 (as reported) with Win10 and a standard (non-XFA) pdf file.

Might be a duplicate of bug 1500404.

Severity: normal → --
Component: PDF Viewer → File Handling
Priority: P3 → --
See Also: → 1500404
See Also: → 1655525
See Also: 1500404

Without a way to reproduce this, we can't fix it.

Status: UNCONFIRMED → RESOLVED
Closed: 11 months ago
Resolution: --- → INCOMPLETE
You need to log in before you can comment on or make changes to this bug.