Firefox issues with PDFtron WebViewer intialization

Skip to first unread message

Xavier Hocquet

Apr 5, 2021, 2:55:17 PM4/5/21
to PDFTron WebViewer
Hi there,

We are using the WebViewer successfully in Chrome to do some text searching on PDF documents, however the same code fails on Firefox. This is the setup code (using Webpacker for assets) -

      .then(() => PDFNet.addResourceSearchPath('/packs/webviewer'))
      .then(() => {

In Firefox, we get the following error in console -

Unknown action from worker: pdfNetAddResourceSearchPath PDFworker.js:1:13232
Error: Unknown action from worker: pdfNetAddResourceSearchPath

As far as I'm aware, the WebViewer is supported across major browsers. Anything we might be doing wrong?

Xavier Hocquet

Sardor Isakov

Apr 7, 2021, 5:06:43 PM4/7/21
to PDFTron WebViewer
You are using WebViewer in full mode and without WebViewer UI? Have you loaded PDFNet.js file?

Sardor Isakov
Software Developer
PDFTron Systems, Inc.

Xavier Hocquet

Apr 7, 2021, 7:43:31 PM4/7/21
to PDFTron WebViewer
I'm not the main developer on this side of things so apologies if anything sounds confusing coming from me.

It looks like we are loading both in order to use CoreControls to use some of the searching functionality. We are using the WebViewer UI to display documents. We have the following included in the page -

<script src="/packs/webviewer/core/CoreControls.js"></script>
<script src="/packs/webviewer/core/pdf/PDFNet.js"></script>

And just to reiterate, the same method calls work successfully in Chrome.


WebViewer Support

Apr 8, 2021, 7:33:19 PM4/8/21
Hello PDFTron,

Are there any network errors (404 error) in the developer tool?

 Best Regards,
Sardor Isakov
Software Developer
PDFTron Systems, Inc.
CONFIDENTIALITY NOTICE: This message (and any attachment to it) is intended only for the use of the individual or entity to which it is addressed in the header, and may contain information that is privileged, confidential and exempt from disclosure under applicable law. Any reproduction, distribution, modification or use of the contents of this message (and any attachment to it) by any individual or entity other than the intended recipient is prohibited. If you have received this communication in error, please notify us immediately and delete the original. 
, PDFTron WebViewer Forum <> wrote:
You received this message because you are subscribed to the Google Groups "PDFTron WebViewer" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To view this discussion on the web visit
Reply all
Reply to author
0 new messages