@bentopdf/pymupdf-wasm
v0.11.16
Published
PyMuPDF compiled to WebAssembly - Full PDF manipulation in the browser
Maintainers
Readme
@bentopdf/pymupdf-wasm
PyMuPDF compiled to WebAssembly for full PDF manipulation in the browser.
Notice
This package is a modified version of PyMuPDF, originally developed by Artifex Software, Inc.
It has been adapted for WebAssembly (WASM) and dynamic loading.
Attribution
PyMuPDF is copyright © Artifex Software, Inc. This package is distributed under the GNU Affero General Public License v3.0.
This project is not affiliated with or endorsed by Artifex Software, Inc.
Source Code Availability
This program is licensed under the GNU Affero General Public License v3.0. If you interact with this program over a network, you are entitled to receive the complete corresponding source code.
The source code for this package is available at: https://github.com/alam00000/bentopdf-pymupdf-wasm
This package includes the complete Corresponding Source (build scripts and configuration) in the build_scripts/ directory.
Build Instructions
To rebuild the WASM binary from source:
- Download the source code from the repository or this package.
- Navigate to the
build_scripts/directory. - Follow the instructions in
build_scripts/README.md(uses Docker).
License
This project is licensed under the AGPL-3.0-only license. See the License section below for details on included components.
Features
- Open PDF, XPS, EPUB, and images
- Convert any supported format to PDF
- Extract text, images, and tables
- Merge and Split PDF documents
- Page manipulation - rotate, crop, delete, reorder
- Annotations - highlights, notes, shapes
- Security - encrypt, decrypt, redact
- Forms - read and fill form fields
- PDF to DOCX conversion (via pdf2docx)
Installation
npm install @bentopdf/pymupdf-wasmQuick Start
import { PyMuPDF } from '@bentopdf/pymupdf-wasm';
const pymupdf = new PyMuPDF({
assetPath: '/assets/pymupdf/',
ghostscriptUrl: 'https://cdn.jsdelivr.net/npm/@bentopdf/[email protected]/' // Optional: for RGB conversion
});
await pymupdf.load();Credits & Copyrights
- PyMuPDF: © Artifex Software, Inc. (AGPL-3.0)
- Ghostscript: © Artifex Software, Inc. (AGPL-3.0)
- Pyodide: © Mozilla Foundation / Michael Droettboom (MPL-2.0)
- pdf2docx: © Artifex Software, Inc. (AGPL-3.0)
This package combines these components and is distributed under AGPL-3.0.
