# WebViewer

**URL:** https://forum.mupdf.com/c/webviewer/7.md

[Latest](https://forum.mupdf.com/latest.md) · [Categories](https://forum.mupdf.com/categories.md) · [Tags](https://forum.mupdf.com/tags.md)

---

## [Discover MuPDF WebViewer!](https://forum.mupdf.com/t/discover-mupdf-webviewer/169)

<div class="topic-metadata">

**Author:** [@Jamie\_Lemon](https://forum.mupdf.com/u/Jamie_Lemon)\
**Replies:** 0\
**Last updated:** [September 23, 2025, 10:06pm UTC](https://forum.mupdf.com/t/discover-mupdf-webviewer/169 "2025-09-23T22:06:55Z")

</div>

This is the place to talk about all things MuPDF WebViewer - the easy to use, super flexible, AI ready PDF viewer.

---

## [i18n shows raw keys instead of English fallback when browser language is unsupported (e.g. German)](https://forum.mupdf.com/t/i18n-shows-raw-keys-instead-of-english-fallback-when-browser-language-is-unsupported-e-g-german/334)

<div class="topic-metadata">

**Author:** [@hannesdevelops](https://forum.mupdf.com/u/hannesdevelops)\
**Replies:** 2\
**Last updated:** [April 8, 2026, 11:48am UTC](https://forum.mupdf.com/t/i18n-shows-raw-keys-instead-of-english-fallback-when-browser-language-is-unsupported-e-g-german/334 "2026-04-08T11:48:59Z")

</div>

Environment mupdf-webviewer: 0.1.1 (latest via npm) Browser: Chrome 135, macOS System language: German (de) Browser language: German (de-DE) Problem When the browser/system language is set to a language not included …

---

## [Add Buttons on the right side of the Toolbar](https://forum.mupdf.com/t/add-buttons-on-the-right-side-of-the-toolbar/329)

<div class="topic-metadata">

**Author:** [@ciocan](https://forum.mupdf.com/u/ciocan)\
**Replies:** 2\
**Last updated:** [April 8, 2026, 11:48am UTC](https://forum.mupdf.com/t/add-buttons-on-the-right-side-of-the-toolbar/329 "2026-04-08T11:48:29Z")

</div>

Right now the buttons can be added only on the left side of the toolbar using \`position: ‘TOOLBAR.LEFT\_SECTION.FIRST’ it will be useful to be able to add them to the right side too.

---

## [How to disable unwanted link feature in PDF viewer](https://forum.mupdf.com/t/how-to-disable-unwanted-link-feature-in-pdf-viewer/270)

<div class="topic-metadata">

**Author:** [@Hemant](https://forum.mupdf.com/u/Hemant)\
**Replies:** 8\
**Last updated:** [March 2, 2026, 3:50pm UTC](https://forum.mupdf.com/t/how-to-disable-unwanted-link-feature-in-pdf-viewer/270 "2026-03-02T15:50:27Z")

</div>

I want to disable these link highlights, which addan outline to the link and open Add Link sidebar

---

## [AI Citation is here!](https://forum.mupdf.com/t/ai-citation-is-here/307)

<div class="topic-metadata">

**Author:** [@Jamie\_Lemon](https://forum.mupdf.com/u/Jamie_Lemon)\
**Replies:** 0\
**Last updated:** [February 24, 2026, 3:37pm UTC](https://forum.mupdf.com/t/ai-citation-is-here/307 "2026-02-24T15:37:09Z")

</div>

Happy to introduce an all new feature to help you locate the source of that LLM result - find out more here: AI - MuPDF WebViewer

---

## [Content Security Policy (CSP) issues](https://forum.mupdf.com/t/content-security-policy-csp-issues/225)

<div class="topic-metadata">

**Author:** [@IsaacWebber](https://forum.mupdf.com/u/IsaacWebber)\
**Replies:** 6\
**Last updated:** [February 9, 2026, 12:54pm UTC](https://forum.mupdf.com/t/content-security-policy-csp-issues/225 "2026-02-09T12:54:25Z")

</div>

Hi, we are currently integrating the mupdf web viewer into our application and we are encountering 2 Content Security Policy (CSP) issues. 1. It appears that your current minified build has a line where a function is cr…

---

## [Bug with text.getSelected](https://forum.mupdf.com/t/bug-with-text-getselected/219)

<div class="topic-metadata">

**Author:** [@39rc](https://forum.mupdf.com/u/39rc)\
**Replies:** 7\
**Last updated:** [January 12, 2026, 10:29pm UTC](https://forum.mupdf.com/t/bug-with-text-getselected/219 "2026-01-12T22:29:13Z")

</div>

I’m having an issue with the mupdf.text.getSelected function. With certain pdfs, if you select text over multiple paragraphs, then you get the following error: Uncaught (in promise) TypeError: can't access property "le…

---

## [How to move position of annotation text?](https://forum.mupdf.com/t/how-to-move-position-of-annotation-text/261)

<div class="topic-metadata">

**Author:** [@39rc](https://forum.mupdf.com/u/39rc)\
**Replies:** 3\
**Last updated:** [January 7, 2026, 5:09pm UTC](https://forum.mupdf.com/t/how-to-move-position-of-annotation-text/261 "2026-01-07T17:09:15Z")

</div>

I’m using the annotation API to add annotations of type TEXT\_FREE. Is there a way to move the annotation text? By default its above the top-right of the rect. I’ve tried changing these attributes: position verticies s…

---

## [Poor performance with the Redact panel open and many annotations/redactions](https://forum.mupdf.com/t/poor-performance-with-the-redact-panel-open-and-many-annotations-redactions/247)

<div class="topic-metadata">

**Author:** [@39rc](https://forum.mupdf.com/u/39rc)\
**Replies:** 1\
**Last updated:** [December 17, 2025, 5:04pm UTC](https://forum.mupdf.com/t/poor-performance-with-the-redact-panel-open-and-many-annotations-redactions/247 "2025-12-17T17:04:07Z")

</div>

Hi, I’m finding that when you have many redactions on a pdf with the redaction panel open the loading of the main pdf is very slow. I’ve linked a youtube video demoing this behaviour: https://youtu.be/7LIbY2YexrE Here…

---

## [Removing the 'Redact' button](https://forum.mupdf.com/t/removing-the-redact-button/205)

<div class="topic-metadata">

**Author:** [@39rc](https://forum.mupdf.com/u/39rc)\
**Replies:** 3\
**Last updated:** [December 8, 2025, 4:15pm UTC](https://forum.mupdf.com/t/removing-the-redact-button/205 "2025-12-08T16:15:57Z")

</div>

Is there a way remove the ‘Redact’ button without removing the toolbar itself? The reason why i’d like this is because I want to add a new button to the toolbar but get rid of the ‘Redact’ button. Thanks

---

## [Allowing the user to add custom elements to the PDF and retrieve the coordinates](https://forum.mupdf.com/t/allowing-the-user-to-add-custom-elements-to-the-pdf-and-retrieve-the-coordinates/218)

<div class="topic-metadata">

**Author:** [@PieterClaerhout](https://forum.mupdf.com/u/PieterClaerhout)\
**Replies:** 6\
**Last updated:** [December 5, 2025, 3:17pm UTC](https://forum.mupdf.com/t/allowing-the-user-to-add-custom-elements-to-the-pdf-and-retrieve-the-coordinates/218 "2025-12-05T15:17:44Z")

</div>

Imagine you want to use the PDF viewer to show PDF files on which a user can add custom elements (e.g. signatures on a document that needs to be signed). That would require specific functionality: Allowing to add a ne…

---

## [Local WebViewer, no expiry, no key](https://forum.mupdf.com/t/local-webviewer-no-expiry-no-key/208)

<div class="topic-metadata">

**Author:** [@Jamie\_Lemon](https://forum.mupdf.com/u/Jamie_Lemon)\
**Replies:** 0\
**Last updated:** [November 27, 2025, 2:40pm UTC](https://forum.mupdf.com/t/local-webviewer-no-expiry-no-key/208 "2025-11-27T14:40:50Z")

</div>

Please note, you can now try WebViewer locally without a key with release 0.11.0! No expiry, no trial key required until you deploy. See CHANGELOG - MuPDF WebViewer for more. :slightly\_smiling\_face:

---

## [Adding \`removeEventListener\`](https://forum.mupdf.com/t/adding-removeeventlistener/192)

<div class="topic-metadata">

**Author:** [@Ryan\_Kavanagh](https://forum.mupdf.com/u/Ryan_Kavanagh)\
**Replies:** 2\
**Last updated:** [November 27, 2025, 2:33pm UTC](https://forum.mupdf.com/t/adding-removeeventlistener/192 "2025-11-27T14:33:16Z")

</div>

Could we possibly have a removeEventListener function for the MuPDFWebVieweras we want to add event listeners to the webviewer but we also need to perform cleanup at times (without removing destroying the whole webviewer…

---

## [Support for running locally on a \*.test domain](https://forum.mupdf.com/t/support-for-running-locally-on-a-test-domain/199)

<div class="topic-metadata">

**Author:** [@PieterClaerhout](https://forum.mupdf.com/u/PieterClaerhout)\
**Replies:** 4\
**Last updated:** [November 27, 2025, 2:31pm UTC](https://forum.mupdf.com/t/support-for-running-locally-on-a-test-domain/199 "2025-11-27T14:31:36Z")

</div>

Hi, I’m testing the MuPDF WebViewer in a PHP Laravel application. I’m using Herd to run the site locally. What is typical about my setup is that the local domain it runs on is a \*.test domain. It seems that these domain…

---

## [Confusion around editing redactions](https://forum.mupdf.com/t/confusion-around-editing-redactions/202)

<div class="topic-metadata">

**Author:** [@39rc](https://forum.mupdf.com/u/39rc)\
**Replies:** 1\
**Last updated:** [November 19, 2025, 11:19pm UTC](https://forum.mupdf.com/t/confusion-around-editing-redactions/202 "2025-11-19T23:19:26Z")

</div>

Hi, I’m trying to use the redaction API in the webviewer but i’m having some confusion. In the docs, set’s api is defined as follows: set(config: { redactions: Redaction\[\] }). However, when I go to run this function …

---

## [Storing the API key](https://forum.mupdf.com/t/storing-the-api-key/185)

<div class="topic-metadata">

**Author:** [@39rc](https://forum.mupdf.com/u/39rc)\
**Replies:** 1\
**Last updated:** [October 28, 2025, 2:46pm UTC](https://forum.mupdf.com/t/storing-the-api-key/185 "2025-10-28T14:46:49Z")

</div>

Hi, In the docs the api key is stored as a string in the javascript files. Is this the official way to do it? I’m concerned that a user may read the js bundle and take the API key. Thanks

---

## [Why is copying library assets to public folder necessary?](https://forum.mupdf.com/t/why-is-copying-library-assets-to-public-folder-necessary/184)

<div class="topic-metadata">

**Author:** [@39rc](https://forum.mupdf.com/u/39rc)\
**Replies:** 1\
**Last updated:** [October 28, 2025, 2:32pm UTC](https://forum.mupdf.com/t/why-is-copying-library-assets-to-public-folder-necessary/184 "2025-10-28T14:32:14Z")

</div>

Hi, i’m currently going through the docs for the webviewer and I’m a little confused by this step: Why can’t the webviewer read from the js bundle instead of having to serve up the content publicly?

---

## [Error in annotation api](https://forum.mupdf.com/t/error-in-annotation-api/172)

<div class="topic-metadata">

**Author:** [@ciocan](https://forum.mupdf.com/u/ciocan)\
**Replies:** 7\
**Last updated:** [September 25, 2025, 4:07pm UTC](https://forum.mupdf.com/t/error-in-annotation-api/172 "2025-09-25T16:07:44Z")

</div>

I am encountering an error when attempting to add an annotation, specifically when following the example provided in the documentation: https://webviewer-docs.mupdf.com/annotations This issue occurs in versions 0.8.0 an…
