pymupdf-node
PyMuPDF for Node JS
Getting Started
Install node modules
npm install
Building
Prepare builds with:
npm run prepare
This creates the JS from the TS (src) and puts results in the "dist" folder.
Running
To test locally ensure you can import files form the dist location, i.e.
import * as pymupdf from "{path}/dist/pymupdf.js"
Wheels should be loaded into the pymupdf module with:
await pymupdf.init("path_to_pymupdf_wheel", "path_to_pymupdf4llm_wheel")
See tests/basic-test.mjs
for an example.
Run this with:
node basic-test.mjs