# Webviewer UI with PDFJSexpress integration

**URL:** <https://pdfjs.community/t/webviewer-ui-with-pdfjsexpress-integration/3072>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [January 12, 2024, 9:37pm UTC](https://pdfjs.community/t/webviewer-ui-with-pdfjsexpress-integration/3072 "2024-01-12T21:37:13Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![hthiru](https://avatars.discourse-cdn.com/v4/letter/h/f4b2a3/32.png) [@hthiru](https://pdfjs.community/u/hthiru)\
**Post date:** [January 12, 2024, 9:37pm UTC](https://pdfjs.community/t/webviewer-ui-with-pdfjsexpress-integration/3072/1 "2024-01-12T21:37:13Z")

</div>

**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

> **[Advanced Customization with PDF.js Express Viewer | Documentation](https://pdfjs.express/documentation/ui-customization/advanced-customization)**

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

---

<div class="post-metadata">

**Author:** ![kkim](https://avatars.discourse-cdn.com/v4/letter/k/3ab097/32.png) [@kkim](https://pdfjs.community/u/kkim)\
**Post date:** [January 15, 2024, 6:36pm UTC](https://pdfjs.community/t/webviewer-ui-with-pdfjsexpress-integration/3072/3 "2024-01-15T18:36:55Z")

</div>

Hi there,

Thank you for contacting pdf.js express forums,

Are you using the 8.7 branch of the WebViewer UI?

> **[GitHub - PDFTron/webviewer-ui at 8.7](https://github.com/PDFTron/webviewer-ui/tree/8.7)**
>
> 8.7

Best regards,  
Kevin Kim

---

<div class="post-metadata">

**Author:** ![ozyair85](https://avatars.discourse-cdn.com/v4/letter/o/ecb155/32.png) [@ozyair85](https://pdfjs.community/u/ozyair85)\
**Post date:** [January 20, 2024, 10:15am UTC](https://pdfjs.community/t/webviewer-ui-with-pdfjsexpress-integration/3072/4 "2024-01-20T10:15:07Z")

</div>

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](http://192.168.1.25:3000))  
> webpack built ui d12e1f25e7dbcf98600e in 35933ms

Can you please help me figure it out?

Thank you

---

<div class="post-metadata">

**Author:** ![ozyair85](https://avatars.discourse-cdn.com/v4/letter/o/ecb155/32.png) [@ozyair85](https://pdfjs.community/u/ozyair85)\
**Post date:** [January 20, 2024, 11:04am UTC](https://pdfjs.community/t/webviewer-ui-with-pdfjsexpress-integration/3072/5 "2024-01-20T11:04:11Z")

</div>

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)](https://github.com/pdfjs-express/pdfjs-express-custom-ui-sample/tree/main), but seems like just loading the file `<script src="/core/webviewer-core.min.js"></script>` results in errors in the browser’s devtools:

```javascript
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](https://docs.apryse.com/documentation/web/guides/core/), 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!

---

<div class="post-metadata">

**Author:** ![kkim](https://avatars.discourse-cdn.com/v4/letter/k/3ab097/32.png) [@kkim](https://pdfjs.community/u/kkim)\
**Post date:** [January 22, 2024, 5:14pm UTC](https://pdfjs.community/t/webviewer-ui-with-pdfjsexpress-integration/3072/6 "2024-01-22T17:14:40Z")

</div>

Hi there,

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

> **[Core Engine for JavaScript PDF Viewer | PDF.js Express SDK](https://pdfjs.express/documentation/ui-customization/core#creating-your-own-ui-using-webviewer-core)**

Best regards,  
Kevin Kim

---

<div class="post-metadata">

**Author:** ![ozyair85](https://avatars.discourse-cdn.com/v4/letter/o/ecb155/32.png) [@ozyair85](https://pdfjs.community/u/ozyair85)\
**Post date:** [January 23, 2024, 2:31am UTC](https://pdfjs.community/t/webviewer-ui-with-pdfjsexpress-integration/3072/7 "2024-01-23T02:31:57Z")

</div>

Thank you so much for your help 🙏

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!

---

<div class="post-metadata">

**Author:** ![kkim](https://avatars.discourse-cdn.com/v4/letter/k/3ab097/32.png) [@kkim](https://pdfjs.community/u/kkim)\
**Post date:** [January 23, 2024, 4:39pm UTC](https://pdfjs.community/t/webviewer-ui-with-pdfjsexpress-integration/3072/8 "2024-01-23T16:39:19Z")

</div>

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](https://pdfjs.express/documentation/ui-customization/core#creating-your-own-ui-using-webviewer-core) for reference.

As a note, you can contact the Apryse Sales team here: [Contact Sales | Apryse](https://apryse.com/form/contact-sales) and they can work with you to provide a custom package even if you do not need all their functionalities.

Best regards,  
Kevin Kim
