This commit is contained in:
2026-10-22 16:06:51 +07:00
commit 25158e780f
2897 changed files with 569062 additions and 0 deletions
+46
View File
@@ -0,0 +1,46 @@
# MuPDF.js
Welcome to the official MuPDF.js library from [Artifex](https://artifex.com).
Use [MuPDF](https://mupdf.com) in your JavaScript and TypeScript projects!
This library is powered by WebAssembly and can be used in all the usual
JavaScript environments: Node, Bun, Firefox, Safari, Chrome, etc.
## License
MuPDF.js is available under Open Source
[AGPL](https://www.gnu.org/licenses/agpl-3.0.html) and commercial license
agreements.
> If you cannot meet the requirements of the AGPL, please contact
> [Artifex](https://artifex.com/contact/mupdf-js) regarding a
> commercial license.
## Installation
npm install mupdf
## Usage
The module is only available as an ESM module!
import mupdf from "mupdf"
var doc = mupdf.Document.openDocument("test.pdf")
console.log(doc.countPages())
Check out the example projects to help you get started:
- [github.com/ArtifexSoftware/mupdf/tree/master/platform/wasm/examples](https://github.com/ArtifexSoftware/mupdf/tree/master/platform/wasm/examples)
- [github.com/ArtifexSoftware/mupdf.js/tree/master/examples](https://github.com/ArtifexSoftware/mupdf.js/tree/master/examples)
## Documentation
- [MuPDF.js Reference](https://mupdf.readthedocs.io/en/latest/reference/javascript/)
- [Getting Started & Examples](https://mupdfjs.readthedocs.io/en/latest/)
## Contact
Join the Discord at [#mupdf.js](https://discord.gg/zpyAHM7XtF) to chat with the
developers directly.