Webviewer UI with PDFJSexpress integration

Which product are you using?
PDF.js Express Viewer

PDF.js Express Version
8

Detailed description of issue
Trying to install the webviewer UI using

returning error
hot update failed for module “./src/components/App/App.js”. Last file processed: “./src/constants/signatureModes.js”.

Expected behaviour
Display the PDF to annotate

Does your issue happen with every document, or just one?
test document

Hi there,

Thank you for contacting pdf.js express forums,

Are you using the 8.7 branch of the WebViewer UI?

Best regards,
Kevin Kim

Hi There
I’m trying to run this repo locally and having problems as well.

I switched to the 8.7 repo and seem to be able to run build and start without any problems but nothing ever loads up in the browser, it just keeps spinning indicating it’s loading but it’s just hanging forever…

The messages on the console are:

PS C:\markup\ui2> npm start

webviewer-ui@8.7.0 start
npx babel-node ./dev-server.js

Listening at localhost:3000 (http://192.168.1.25:3000)
webpack built ui d12e1f25e7dbcf98600e in 35933ms

Can you please help me figure it out?

Thank you

I was trying to run the simple example code from this repo: pdfjs-express/pdfjs-express-custom-ui-sample: A repo showing how to build a custom UI using PDF.js Express workers (github.com), but seems like just loading the file <script src="/core/webviewer-core.min.js"></script> results in errors in the browser’s devtools:

Uncaught TypeError: Cannot redefine property: w
    at Function.defineProperties (<anonymous>)
    at va.a (webviewer-core.min.js:2241:175)
    at va.a (webviewer-core.min.js:2223:376)
    at Module.<anonymous> (webviewer-core.min.js:2408:207)
    at r (webviewer-core.min.js:48:348)
    at Object.<anonymous> (webviewer-core.min.js:2407:409)
    at r (webviewer-core.min.js:48:348)
    at webviewer-core.min.js:52:502
    at webviewer-core.min.js:53:7
    at webviewer-core.min.js:2678:283

I was able to run the Apryse example from here: Core Engine for JavaScript PDF Viewer | Apryse Documentation, using their webviewer-core.min.js file and core folder and everything works fine.

Can I just continue with their file and still authenticate with PDFjs Express? Without trying to use anything that isn’t part of PDFjs Express not to break anything.

If not, how can I make it work with PDFjs Express files…?

Thanks!

Hi there,

You can use the 8.7 version of the Apryse UI and it should work as expected:

Best regards,
Kevin Kim

Thank you so much for your help :pray:

I was able to run the core viewer using the core folder from the @pdftron/webviewer package with Version 8 too now.

So my question now is:

Will I be able to register with you (pdfjs) while still using the Apryse version of the core folder? I don’t need any of the extra features Apryse offer right now, I plan on purchasing your license from you. I just want to be sure I’ll be able to customize the UI.

Thanks again for your help!

Hi there,

While the UI and Core files technically do not work with each other, the Core folder from @pdftron/webviewer is built completely differently compared to @pdftron/pdfjs-express and will not work with the pdf.js express license.

We do not officially support mixing pdftron/webviewer with pdf.js-express packages so it is not guaranteed to work. However the WebViewer-UI folder is available in our guide for reference.

As a note, you can contact the Apryse Sales team here: Contact Sales | Apryse and they can work with you to provide a custom package even if you do not need all their functionalities.

Best regards,
Kevin Kim