Unable to render pdf in Firefox 60 and IE 11

399 views
Skip to first unread message

Rishikesh Pimpale

unread,
Jun 1, 2018, 2:23:38 PM6/1/18
to PDFTron WebViewer
I am trying to integrate fillable PDF forms in my application using PDFTron Webviewer V 3.2 and I was able to get it working in Chrome V 66 and 67.
However, the pdf is not rendered in Internet Explorer (V 11.0.9600.19002) and Firefox (V 60.0.1).

I see some errors for Firefox (pasted below) and no errors in IE (it just displays the bar for Initializing). I tried uploading and viewing the pdf on the samples showcase page and it does work in both browsers. Is there some configuration I might be missing?

NS_ERROR_FAILURE:
CoreControls.js:78
exports.utils.canvasFontMultiplier<
http://localhost:64762/Scripts/WebViewer/lib/html5/CoreControls.js:78:17
<anonymous>
http://localhost:64762/Scripts/WebViewer/lib/html5/CoreControls.js:77:424
<anonymous>
http://localhost:64762/Scripts/WebViewer/lib/html5/CoreControls.js:67:413
<anonymous>
http://localhost:64762/Scripts/WebViewer/lib/html5/CoreControls.js:1:2

ReferenceError: XODText is not defined[Learn More]
ReaderControl.js:8:7
<anonymous>
http://localhost:64762/Scripts/WebViewer/lib/html5/ReaderControl.js:8:7
<anonymous>
http://localhost:64762/Scripts/WebViewer/lib/html5/ReaderControl.js:3:2

Matt Parizeau

unread,
Jun 4, 2018, 2:19:36 PM6/4/18
to PDFTron WebViewer
The showcase is using PDFTron Server (https://www.pdftron.com/documentation/web/guides/server-container) which may take a difference approach to loading the file then just loading the PDF directly. It may be an issue with the particular file when loading it directly. Would you be able to send us a copy of the file, either attached here or emailed to sup...@pdftron.com?

Matt Parizeau
Software Developer
PDFTron Systems Inc.

Rishikesh Pimpale

unread,
Jun 5, 2018, 7:37:09 PM6/5/18
to PDFTron WebViewer
I had created a sample pdf form using Adobe Acrobat for fast web view to get rid of the warning for linearized pdf. But I don't think the issue is with the file since I tried out bunch of other pdfs as well, and all of which worked fine in Chrome.  
sample_fillable_doc_optimized.pdf
Capture 2018-06-05 at 17.30.35.jpg

Matt Parizeau

unread,
Jun 6, 2018, 4:15:29 PM6/6/18
to PDFTron WebViewer
Since we're having trouble reproducing it on our end would you be able to send us a sample project that is able to reproduce the issue?

Matt Parizeau
Software Developer
PDFTron Systems Inc.

Thorsten Hersam

unread,
Jun 27, 2018, 12:51:04 PM6/27/18
to PDFTron WebViewer
Dear PDFTron Team,

I am experiencing a similar problem with Firefox Quantum 60.0.2 (64-bit). The following errors are thrown in Firefox while it works like a charm in Chrome Version 67.0.3396.99 (Official Build) (64-bit)


I don't know about IE or Edge.
Please find a sample project in Angular 6 with which the errors are reproducible here. Download all attached files and unzip them while all of them are in the same directory. To make the project work please enter a valid license key in viewer.component.ts line 52.

Run yarn/npm install and then yarn/npm start to get the Web Server running on localhost:4200.
The word "Loading" will appear and after some debouncing time the PDFTron WebViewer will display a PDF File in Chrome. In Firefox the word "Loading" never goes away.

As a hint: I was unable to reproduce the error until I introduced our loading-hint component which is displayed until the WebViewer fires its "documentLoaded" event.

The filestructure in the sample project represents our project's file structure. In our project we have a Player for different medias e.g. PDF, Video, Audio, etc. The media.component.ts shows a loading spinner (in the sample project only the word "Loading") until the respective player for the provided file type has loaded (in the sample project this can only be PDF).

I am looking forward to your feedback.

Kind regards,

Thorsten

Matt Parizeau

unread,
Jun 28, 2018, 9:27:46 PM6/28/18
to PDFTron WebViewer
Hi Thorsten,

Thank you very much for providing the sample project! It looks like the problem is the way that the viewer's parent is being hidden. I think you're running into the Firefox issue described here https://www.pdftron.com/documentation/web/guides/basics/troubleshooting-document-loading#getcomputedstyle-is-null and what solved it for me in your project was to edit media.component.scss to have the hidden class use width: 0, height: 0 instead of display: none.

Matt Parizeau
Software Developer
PDFTron Systems Inc.

Thorsten Hersam

unread,
Jun 29, 2018, 12:52:48 PM6/29/18
to PDFTron WebViewer
Thank you, Matt!
Reply all
Reply to author
Forward
0 new messages