# Using the library on local

**URL:** <https://pdfjs.community/t/using-the-library-on-local/3197>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [March 22, 2024, 8:29am UTC](https://pdfjs.community/t/using-the-library-on-local/3197 "2024-03-22T08:29:46Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![r.barsacchi](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@r.barsacchi](https://pdfjs.community/u/r.barsacchi)\
**Post date:** [March 22, 2024, 8:29am UTC](https://pdfjs.community/t/using-the-library-on-local/3197/1 "2024-03-22T08:29:46Z")

</div>

Hello, I’m using PDF.js Express Viewer UI version 8.7.0, Core version 8.7.4, webviewer.min.js 8.7.4.

I’m using it as a local file because I don’t have a webserver on the device and I created a free license key, but I always see the PDF.js Express logo on PDFs. It happens on every document.

This is the code of how I initialize the library:

```javascript
WebViewer({
    path: 'lib', // path to the PDF.js Express'lib' folder on your server
    licenseKey: 'XXXX',
    initialDoc : pdfUrl,
    disabledElements : [
        'viewControlsButton',
        'viewControlsOverlay',
        'panToolButton',
        'fitButton',
        'selectToolButton',
        'toolsButton',
        'searchButton',
        'leftPanelButton',
        'freeHandToolGroupButton',
        'highlightToolButton',
        'highlightToolButton2',
        'highlightToolButton3',
        'highlightToolButton4',
        'underlineToolButton',
        'squigglyToolButton',
        'strikeoutToolButton',
        'textToolGroupButton',
        'shapeToolGroupButton',
        'rectangleToolButton',
        'ellipseToolButton',
        'lineToolButton',
        'arrowToolButton',
        'polylineToolButton',
        'polygonToolButton',
        'cloudToolButton',
        'eraserToolButton',
        'signatureToolGroupButton',
        'freeTextToolButton',
        'stickyToolButton',
        'miscToolGroupButton',
        'calloutToolButton',
        'stampToolGroupButton',
        'rubberStampToolGroupButton',
        'fileAttachmentToolGroupButton',
        'cropToolButton',
        'toolsButton',
        'searchButton',
        'menuButton',
    ]
}

```

I would like to remove the PDF.js Express logo on the documents.  
Can anyone help me? Thank you!

---

<div class="post-metadata">

**Author:** ![darian.chen](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@darian.chen](https://pdfjs.community/u/darian.chen)\
**Post date:** [March 22, 2024, 6:22pm UTC](https://pdfjs.community/t/using-the-library-on-local/3197/3 "2024-03-22T18:22:09Z")

</div>

Hi there,

Are you viewing your project on localhost? The watermark will still display on localhost even with a license key.

Best Regards,  
Darian

---

<div class="post-metadata">

**Author:** ![r.barsacchi](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@r.barsacchi](https://pdfjs.community/u/r.barsacchi)\
**Post date:** [March 23, 2024, 8:40am UTC](https://pdfjs.community/t/using-the-library-on-local/3197/5 "2024-03-23T08:40:39Z")

</div>

Hi Darian,  
thank you very much for your help!

Yes, the watermark remains visible to me always in localhost. However, I wonder if it’s possible to remove it in this case.  
Perhaps I haven’t understood correctly, but when I create a new license key, it says this:

> Please enter the root domain you wish to use this license on (your key works on a root domain name and any of its subdomains, as well as localhost)

Doesn’t this mean that the license key is also valid for localhost and therefore the watermark should not be displayed? Is it possible to remove it? My project works in localhost, and I cannot change this.

Thank you very much!

Best Regards,  
Ruggero

---

<div class="post-metadata">

**Author:** ![darian.chen](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@darian.chen](https://pdfjs.community/u/darian.chen)\
**Post date:** [March 25, 2024, 2:15pm UTC](https://pdfjs.community/t/using-the-library-on-local/3197/6 "2024-03-25T14:15:57Z")

</div>

Hi there,

The license key will work on localhost, but it will always show a watermark.

Please see the following answers below:

> **[Development | Documentation](https://pdfjs.express/documentation/utils/development#with-a-license-key)**

> [@I have free license key (pdf express viewer), but still showing watermark](https://pdfjs.community/t/i-have-free-license-key-pdf-express-viewer-but-still-showing-watermark/1601/3):
>
> Hello, I’m Ron, an automated tech support bot robot While you wait for one of our customer support representatives to get back to you, please check out some of these documentation pages: Guides: [Integrating PDF.js Express Viewer with NPM](https://pdfjs.express/documentation/get-started-viewer/npm)[Integrating PDF.js Express Viewer into an existing Angular project - Prerequisites](https://pdfjs.express/documentation/get-started-viewer/angular/exist-project#prerequisites)[PDF.js Express Viewer Overview - What is PDF.js Express Viewer?](https://pdfjs.express/documentation/get-started-viewer#what-is-pdf.js-express-viewer?) APIs: [Core - preloadPDFWorker(pdfBackendType, workerHandlers)](https://pdfjs.express/api/Core.html#.preloadPDFWorker__anchor)[PDF.js Express Utilities](https://pdfjs.express/api/utils/index.html#__anchor)[Core.AnnotationManager -…](https://pdfjs.express/api/Core.AnnotationManager.html#importAnnotationCommand__anchor)

Are you having any issues with removing the watermark on your domain?

Best Regards,  
Darian

---

<div class="post-metadata">

**Author:** ![r.barsacchi](https://avatars.discourse-cdn.com/v4/letter/r/3ab097/32.png) [@r.barsacchi](https://pdfjs.community/u/r.barsacchi)\
**Post date:** [March 25, 2024, 2:37pm UTC](https://pdfjs.community/t/using-the-library-on-local/3197/7 "2024-03-25T14:37:43Z")

</div>

Hi Darian,  
our problem is that we need to make the library work on devices that have proprietary OS that only allow us to load the web page from a local file (which is equivalent to a localhost but is not a traditional web server that we have access to).

I have no choice, but I need to remove the watermark. How can I do this in this case? We only need to display the document without any further operations.

Thank you very much for your support!  
Best Regards,  
Ruggero

---

<div class="post-metadata">

**Author:** ![darian.chen](https://avatars.discourse-cdn.com/v4/letter/d/3d9bf3/32.png) [@darian.chen](https://pdfjs.community/u/darian.chen)\
**Post date:** [March 26, 2024, 5:31pm UTC](https://pdfjs.community/t/using-the-library-on-local/3197/8 "2024-03-26T17:31:19Z")

</div>

Hi there,

Unfortunately, we cannot remove the watermark from localhost even if it is just to display the document.  
Here is a Stack Overflow post that might help with this. It talks about running a web server with a name other than localhost: [asp.net - How to configure web server to run with another name instead of 'localhost' - Stack Overflow](https://stackoverflow.com/questions/19249560/how-to-configure-web-server-to-run-with-another-name-instead-of-localhost)

Best Regards,  
Darian
