{"versions":{"0.1.0":{"name":"clawpdf","version":"0.1.0","description":"Zero-dependency PDFium WASM bindings for PDF text extraction and page rendering.","type":"module","sideEffects":false,"license":"MIT","repository":{"type":"git","url":"git+https://github.com/openclaw/clawpdf.git"},"bugs":{"url":"https://github.com/openclaw/clawpdf/issues"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"build":"tsc -p tsconfig.json && node scripts/copy-vendor.mjs","clean":"rm -rf dist","download:pdfium":"node scripts/download-pdfium.mjs","prepack":"pnpm build","test":"pnpm build && vitest run","typecheck":"tsc -p tsconfig.json --noEmit"},"devDependencies":{"@types/node":"24.10.2","typescript":"5.9.3","vitest":"4.0.14"},"engines":{"node":">=20"},"packageManager":"pnpm@11.2.2","gitHead":"968eb53718707a2f4c1a37f8e4c7915fe58fce19","_id":"clawpdf@0.1.0","homepage":"https://github.com/openclaw/clawpdf#readme","_nodeVersion":"26.0.0","_npmVersion":"11.12.1","dist":{"integrity":"sha512-HsR7n2e2cvJTS4WSvCE59Vt3hJbv6GP3A37DGqSypO0XKwfbD0ZytKjB/Kp4764ewMX9cCLBwxCLAjZiuMX7jw==","shasum":"c3b88606220951046191777e7cc86c40786058f9","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/clawpdf/-/clawpdf-0.1.0.tgz","fileCount":15,"unpackedSize":4213949,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQD4ERAFufXq9RW59okL8LL+B7rJ9VhYD2jwI3EJelXpOgIhAPmFeQg9gGnIFqBMtnkerH6fa46gr08N0B+t6rFWrA8c"}],"size":2064666},"_npmUser":{"name":"anonymous","email":"steipete@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"steipete@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/clawpdf_0.1.0_1779956865956_0.6658567044532839"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-05-28T08:27:46.197Z","publish_time":1779956866197,"_source_registry_name":"default","contributors":[]},"0.2.0":{"name":"clawpdf","version":"0.2.0","description":"Zero-dependency PDFium WASM bindings for PDF text extraction and page rendering.","type":"module","sideEffects":false,"license":"MIT","repository":{"type":"git","url":"git+https://github.com/openclaw/clawpdf.git"},"bugs":{"url":"https://github.com/openclaw/clawpdf/issues"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.js"},"./adapters":{"types":"./dist/adapters/index.d.ts","import":"./dist/adapters/index.js"}},"scripts":{"build":"tsc -p tsconfig.json && node scripts/copy-vendor.mjs","clean":"rm -rf dist site","docs:site":"node scripts/build-docs-site.mjs","download:pdfium":"node scripts/download-pdfium.mjs","prepack":"pnpm build","test":"pnpm build && vitest run","typecheck":"tsc -p tsconfig.json --noEmit"},"devDependencies":{"@types/node":"24.10.2","typescript":"5.9.3","vitest":"4.0.14"},"engines":{"node":">=20"},"packageManager":"pnpm@11.2.2","gitHead":"a824169e5d8831b8a38af16135701c1a28c99e88","_id":"clawpdf@0.2.0","homepage":"https://github.com/openclaw/clawpdf#readme","_nodeVersion":"25.9.0","_npmVersion":"11.14.1","dist":{"integrity":"sha512-Za4HD3CMRHNqOXOOyVJiQLnEuezRZR/oXiBzraTwL5XEQZuBwFxnyC1UzN4AjQWV2JrLN3ItbzfPRGE0gGOVwg==","shasum":"5d7c0c2c185f1ec1741e694909e96689d10b26cd","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/clawpdf/-/clawpdf-0.2.0.tgz","fileCount":43,"unpackedSize":4258937,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDnuOeWxczXlRclFNOc+s6EP6MqkHyvCC7Gh3X4ZKZaFgIgZzpZsqva0+fkeSraSzHQpi2s5xoSMBCGwZynZEJXHTM="}],"size":2087369},"_npmUser":{"name":"anonymous","email":"steipete@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"steipete@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/clawpdf_0.2.0_1779980667787_0.15600943918284393"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-05-28T15:04:27.981Z","publish_time":1779980667981,"_source_registry_name":"default","contributors":[]},"0.3.0":{"name":"clawpdf","version":"0.3.0","description":"Zero-dependency PDFium WASM bindings for PDF text extraction and page rendering.","type":"module","sideEffects":false,"license":"MIT","repository":{"type":"git","url":"git+https://github.com/openclaw/clawpdf.git"},"bugs":{"url":"https://github.com/openclaw/clawpdf/issues"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.js"},"./adapters":{"types":"./dist/adapters/index.d.ts","import":"./dist/adapters/index.js"}},"bin":{"clawpdf":"dist/cli.js"},"scripts":{"build":"tsc -p tsconfig.json && node scripts/copy-vendor.mjs","clean":"rm -rf dist site","docs:site":"node scripts/build-docs-site.mjs","download:pdfium":"node scripts/download-pdfium.mjs","prepack":"pnpm build","test":"pnpm build && vitest run","test:cli":"pnpm build && node scripts/test-cli-e2e.mjs","typecheck":"tsc -p tsconfig.json --noEmit"},"devDependencies":{"@types/node":"24.10.2","typescript":"5.9.3","vitest":"4.0.14"},"engines":{"node":">=20"},"packageManager":"pnpm@11.2.2","gitHead":"5f61b300ce225023b4f40b38c5add2d490dcb359","_id":"clawpdf@0.3.0","homepage":"https://github.com/openclaw/clawpdf#readme","_nodeVersion":"25.8.1","_npmVersion":"11.11.0","dist":{"integrity":"sha512-41+3AnKk9yek2sm+/9XvUlDTN8Wi+ag7fmxZuqw+ySn4lqaf/fCgLeamqPLiXY4gVbizKEHGoTG/JrIIFNE2rw==","shasum":"85edf09e0aa134bcfe1ded20d9e071e6270f4533","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/clawpdf/-/clawpdf-0.3.0.tgz","fileCount":49,"unpackedSize":4286152,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIGfUOd9lHhxLtKtk7gXKiJXHuNVP0P9mgcMMW4D44CTmAiAs4y+ozvjtAlQYwtEibmM+NIdClv5JX+ubdBblFmKUnA=="}],"size":2095880},"_npmUser":{"name":"anonymous","email":"steipete@gmail.com"},"directories":{},"maintainers":[{"name":"anonymous","email":"steipete@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/clawpdf_0.3.0_1780004397386_0.18671093409650652"},"_hasShrinkwrap":false,"_cnpmcore_publish_time":"2026-05-28T21:39:57.626Z","publish_time":1780004397626,"_source_registry_name":"default","contributors":[]},"0.3.1":{"_id":"clawpdf@0.3.1","bin":{"clawpdf":"dist/cli.js"},"bugs":{"url":"https://github.com/openclaw/clawpdf/issues"},"dist":{"shasum":"311b19e80755da40c8b9621224bb1d5ef59761ce","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/clawpdf/-/clawpdf-0.3.1.tgz","fileCount":50,"integrity":"sha512-HZ8gz3cm8arzT/V2CnMZlHlRJbsrUYQ71u+A4nymeyvNnYzpZ8RQwkr2EIZiXCOzRkzFy8sOiHBXBuSUDDcXqQ==","signatures":[{"sig":"MEQCIEMcnrrNnuvoiZMRCgL218NExmiXcYYlqDSbbELip2iMAiAZQY2BoZsBW3J+gwvRZXzU0w+oQwcaoI/UmjH5A939CQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIDOcrTqVvjHC1u5YX48mztKBXCTaXZbfQmyJ9FmNZXBDAiBrihERTMbZylNGWe2cS6c8HDFlkE/noQXlPtv6K/q5eg=="}],"unpackedSize":5580210,"size":2496168},"name":"clawpdf","type":"module","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.js"},"./adapters":{"types":"./dist/adapters/index.d.ts","import":"./dist/adapters/index.js"}},"gitHead":"49f25d1eed86055c152fd8ca7c20534f081a29ef","license":"MIT","scripts":{"test":"pnpm build && vitest run","build":"tsc -p tsconfig.json && node scripts/copy-vendor.mjs","clean":"rm -rf dist site","prepack":"pnpm build","docs:site":"node scripts/build-docs-site.mjs","typecheck":"tsc -p tsconfig.json --noEmit","test:package":"pnpm build && node scripts/test-package-e2e.mjs","download:pdfium":"node scripts/download-pdfium.mjs"},"version":"0.3.1","_npmUser":{"name":"anonymous","email":"steipete@gmail.com"},"homepage":"https://github.com/openclaw/clawpdf#readme","repository":{"url":"git+https://github.com/openclaw/clawpdf.git","type":"git"},"_npmVersion":"11.16.0","description":"Zero-dependency PDFium WASM bindings for PDF text extraction and page rendering.","directories":{},"maintainers":[{"name":"anonymous","email":"steipete@gmail.com"}],"sideEffects":false,"_nodeVersion":"24.18.0","_hasShrinkwrap":false,"packageManager":"pnpm@11.9.0","devDependencies":{"vitest":"4.1.10","typescript":"^7.0.2","@types/node":"26.1.2"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/clawpdf_0.3.1_1785774219125_0.3020839899276502"},"_cnpmcore_publish_time":"2026-08-03T16:23:39.250Z","publish_time":1785774219250,"_source_registry_name":"default","contributors":[]},"0.3.2":{"_id":"clawpdf@0.3.2","bin":{"clawpdf":"dist/cli.js"},"bugs":{"url":"https://github.com/openclaw/clawpdf/issues"},"dist":{"shasum":"adf056702e1c64aa8fdc70a50760cd2075898c64","tarball":"http://123.232.10.234:8212/nexus/content/groups/npm-public/clawpdf/-/clawpdf-0.3.2.tgz","fileCount":50,"integrity":"sha512-1JudW0rZ5B7O2E9+cgnU5F4As7K6HZ3/s/3CHUXm5uG0+965uPOk11gvhmprpwXGJaRXhrmywZ1WWc5a+GZ7TQ==","signatures":[{"sig":"MEYCIQD4ZBHPkAqG2ZnvqZ8SJ4BLvXaUlDeXXNaN2jVGcZijPwIhAIQzfcNAbSw6rNsMFuQcG5Q/WoFw1cmSxcekFLV5Lqj2","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIHxZt+gA0eyPHnFZcmafMWzG+JN4M5BhG+gms5yMiVfbAiEAwU2c4Pn2Fn6s1jtQyFURKQvGFM1MmIb3OTQRG8UIS1Q="}],"unpackedSize":5584556,"size":2497198},"name":"clawpdf","type":"module","engines":{"node":">=22"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"},"./browser":{"types":"./dist/browser.d.ts","import":"./dist/browser.js"},"./adapters":{"types":"./dist/adapters/index.d.ts","import":"./dist/adapters/index.js"}},"gitHead":"636ef3eaa32c4be964601cfa67f06e75ec833c4e","license":"MIT","scripts":{"test":"pnpm build && vitest run","build":"tsc -p tsconfig.json && node scripts/copy-vendor.mjs","clean":"rm -rf dist site","prepack":"pnpm build","docs:site":"node scripts/build-docs-site.mjs","typecheck":"tsc -p tsconfig.json --noEmit","test:package":"pnpm build && node scripts/test-package-e2e.mjs","download:pdfium":"node scripts/download-pdfium.mjs"},"version":"0.3.2","_npmUser":{"name":"anonymous","email":"steipete@gmail.com"},"homepage":"https://github.com/openclaw/clawpdf#readme","repository":{"url":"git+https://github.com/openclaw/clawpdf.git","type":"git"},"_npmVersion":"12.0.2","description":"Zero-dependency PDFium WASM bindings for PDF text extraction and page rendering.","directories":{},"maintainers":[{"name":"anonymous","email":"steipete@gmail.com"}],"sideEffects":false,"_nodeVersion":"26.8.1","_hasShrinkwrap":false,"packageManager":"pnpm@11.25.0","devDependencies":{"vitest":"5.0.0","typescript":"^7.0.2","@types/node":"26.4.1"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/clawpdf_0.3.2_1788634261563_0.13249524548596336"},"_cnpmcore_publish_time":"2026-09-05T18:51:01.780Z","publish_time":1788634261780,"_source_registry_name":"default","contributors":[]}},"dist-tags":{"latest":"0.3.2"},"name":"clawpdf","time":{"created":"2026-05-28T08:28:00.084Z","modified":"2026-09-05T18:52:35.179Z","0.1.0":"2026-05-28T08:27:46.197Z","0.2.0":"2026-05-28T15:04:27.981Z","0.3.0":"2026-05-28T21:39:57.626Z","0.3.1":"2026-08-03T16:23:39.250Z","0.3.2":"2026-09-05T18:51:01.780Z"},"readme":"# clawpdf 🦞 — Pull the text and pixels out of PDFs\n\n![clawpdf banner](docs/assets/readme-banner.jpg)\n\n[![CI](https://img.shields.io/github/actions/workflow/status/openclaw/clawpdf/ci.yml?branch=main&style=flat-square&label=ci)](https://github.com/openclaw/clawpdf/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/npm/v/clawpdf?style=flat-square)](https://www.npmjs.com/package/clawpdf)\n[![Node.js](https://img.shields.io/node/v/clawpdf?style=flat-square)](https://nodejs.org/)\n[![License](https://img.shields.io/github/license/openclaw/clawpdf?style=flat-square)](LICENSE)\n[![Docs](https://img.shields.io/badge/docs-clawpdf.dev-4c1?style=flat-square)](https://clawpdf.dev/)\n\nClawPDF is an ESM-only PDFium WebAssembly library and CLI for Node.js and bundled browser apps. It extracts text, renders pages, and produces PNG bytes without runtime dependencies, native addons, postinstall scripts, or a canvas package.\n\n## Install\n\n```bash\nnpm install clawpdf\n```\n\nNode.js 22 or newer is required. The package includes the `clawpdf` command and its PDFium WebAssembly runtime.\n\n## Quick start\n\nExtract text from a PDF without writing a script:\n\n```console\n$ npx clawpdf https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf\nDummy PDF file\n```\n\nOr open a local file from JavaScript and render its first page:\n\n```ts\nimport { writeFile } from \"node:fs/promises\";\nimport { openPdf } from \"clawpdf\";\n\nawait using pdf = await openPdf(\"report.pdf\");\nconsole.log(pdf.text({ maxPages: 5 }));\n\nconst png = await pdf.page(1).png({ dpi: 144, forms: true });\nawait writeFile(\"page-1.png\", png);\n```\n\nPage numbers in the CLI and library are one-based.\n\n## CLI\n\nThe CLI reads file paths, URLs, and standard input. Text goes to stdout; diagnostics go to stderr.\n\n| Task | Command |\n| --- | --- |\n| Extract text | `clawpdf report.pdf` |\n| Read standard input | `cat report.pdf \\| clawpdf -` |\n| Emit structured output | `clawpdf report.pdf --json` |\n| Render one page | `clawpdf render report.pdf --page 1 -o page.png` |\n\nHTTP(S) downloads have no size cap by default. Opt into a byte budget with `--fetch-max-bytes 10000000` or the library's `fetchMaxBytes` option. `0` disables the budget; the existing 30-second deadline still applies.\n\nSee the [CLI reference](docs/cli.md) for extraction modes, page selection, passwords, image budgets, inline terminal images, JSON output, and exit codes.\n\n## Text-first extraction\n\n`extractPdf()` can return text, PNG fallback images, or both. In `auto` mode it always extracts text, then renders selected pages only when the text is shorter than `minTextChars`.\n\n```ts\nimport { extractPdf } from \"clawpdf\";\n\nconst result = await extractPdf(\"report.pdf\", {\n  mode: \"auto\",\n  maxPages: 20,\n  minTextChars: 200,\n  image: { dpi: 96, maxPixels: 4_000_000, forms: true },\n});\n\nconsole.log(result.text, result.images);\n```\n\nImage results contain raw PNG bytes. The optional `clawpdf/adapters` export converts them to data URLs or model-message content blocks. See [extraction fallback](docs/extraction-fallback.md) for the modes, limits, and result shape.\n\n## Reuse an engine\n\n`openPdf()` owns a private engine and suits one-off work. Servers should create one engine, reuse it across documents, and dispose it during shutdown:\n\n```ts\nimport { createEngine } from \"clawpdf\";\n\nexport async function inspect(pdfBytes: Uint8Array) {\n  await using engine = await createEngine();\n  await using pdf = await engine.open(pdfBytes);\n\n  console.log(pdf.metadata.title);\n  console.log(pdf.page(1).text());\n}\n```\n\nThe Node entry point accepts byte arrays, file paths, URLs, and blobs. Bundled browser code should import the pre-wired `clawpdf/browser` entry point; see [browser and bundler setup](docs/browser-bundlers.md).\n\n## Documentation\n\n- [Loading PDFs](docs/loading.md) covers inputs, document lifetimes, and passwords.\n- [Text extraction](docs/text-extraction.md), [page rendering](docs/page-rendering.md), and [PNG output](docs/png-output.md) cover the core document APIs.\n- [Password-protected PDFs](docs/passwords.md) covers the library and CLI flows.\n- [API reference](docs/api-reference.md) lists exports, types, options, and typed errors.\n- [Package shape](docs/package-shape.md) records the published files and dependency contract.\n- [PDFium provenance](docs/pdfium-provenance.md) records the vendored release, checksum, notices, and refresh workflow.\n- [Performance](docs/performance.md) contains the current local benchmark snapshot.\n\nThe full documentation site is available at [clawpdf.dev](https://clawpdf.dev/).\n\n## Development\n\n```bash\npnpm install\npnpm build\npnpm typecheck\npnpm test\npnpm test:package\npnpm docs:site\n```\n\nCI runs the same checks on Node.js 22, 24, and 26.\n\n## License\n\nMIT. PDFium carries upstream BSD-style and Apache-2.0 notices; see [THIRD_PARTY_NOTICES.md](THIRD_PARTY_NOTICES.md).","users":{}}