Updated Frequently Asked Questions (markdown)

Jonas Jenwald 2021-06-19 12:09:12 +02:00
parent 21f4847ec4
commit 6e0b1a6dad

@ -2,6 +2,7 @@
* [Can I load a PDF from another server (cross domain request)?](#faq-xhr)
* [Which browsers are supported?](#faq-support)
* [Which browsers have extensions (and where can I find install procedures)?](#faq-extensions)
* [Reasons for the Error: `The API version "a.b.c" does not match the Worker version "x.y.z"`?](#version-mismatch)
* [I know JavaScript and want to contribute to the project. How do I start?](#faq-contrib)
* [Is it possible to add annotations to a PDF?](#faq-annotations)
* [What are the PDF.js keyboard shortcuts?](#faq-shortcuts)
@ -82,6 +83,16 @@ The Chromium extension is maintained by a PDF.js contributor. To install the Chr
The Firefox extension is not supported and marked as disabled for Firefox versions 35 and up. PDF.js is part of Firefox since version 19. The extension is mostly used by developers and for bringing a newer version of the PDF.js library to an older Firefox version. Users should uninstall the extension, revert the `pdfjs.disabled` configuration setting and set the `Options -> Applications` selection for PDF documents to the internal viewer to continue viewing PDF files with PDF.js in Firefox.
<a name="version-mismatch"></a>
## Reasons for the Error: `The API version "a.b.c" does not match the Worker version "x.y.z"`?
When using the PDF.js library, it's necessary to use the *exact* same versions of the `pdf.js` and `pdf.worker.js` files since otherwise things are not guaranteed to work correctly. In order to prevent bugs, the library will thus throw the aforementioned error if there's a version mismatch.
Possible reasons for this Error include (but may not be limited to):
- Updating to a new version of the PDF.js library, and the old `pdf.worker.js` file being cached in the browser. Usually clearing the browser cache, and then refreshing the page, should help in this case.
- Including the `pdf.js` file locally in your project, but loading the `pdf.worker.js` file from a [CDN](https://mozilla.github.io/pdf.js/getting_started/#including-via-a-cdn). In this case, please ensure that you are actually loading the *corresponding* version of the `pdf.worker.js` file from the CDN.
Finally, please note that the version number can always be found inside of the distributed files, such as e.g. `pdf.js` and `pdf.worker.js`; search for `pdfjsVersion` in order to find it.
<a name="faq-contrib"></a>
## I know JavaScript and want to contribute to the project. How do I start?
First, you need to prepare your [fork](https://help.github.com/articlenetworks/fork-a-repo) and setup the development environment. Don't forget to read the [[Contributing]] page. Second, make yourself familiar with the [PDF format and PDF.js internals](Additional-Learning-Resources). Third, if you don't already have a certain issue you want to fix, choose one from the [open issues labeled 5-good-beginner-bug](https://github.com/mozilla/pdf.js/issues?direction=desc&labels=5-good-beginner-bug&page=1&sort=created&state=open). Last, submit a [pull request](https://help.github.com/articles/using-pull-requests) for the review. _During any part of the process we recommend communicating with the PDF.js team in the [Matrix room](https://chat.mozilla.org/#/room/#pdfjs:mozilla.org) if you have questions or need to find a reviewer._