{"_id":"@happyvertical/pdf","_rev":"8-ddeaeb0b02f3cbf844409e5fbf3c30c6","name":"@happyvertical/pdf","dist-tags":{"latest":"0.65.9"},"versions":{"0.65.2":{"name":"@happyvertical/pdf","version":"0.65.2","keywords":["pdf","ocr","text-extraction","pdf-generation","html-to-pdf","markdown-to-pdf","unpdf"],"license":"MIT","_id":"@happyvertical/pdf@0.65.2","maintainers":[{"name":"wllgrffn","email":"willgriffin@gmail.com"}],"homepage":"https://github.com/happyvertical/pdf#readme","bugs":{"url":"https://github.com/happyvertical/pdf/issues"},"dist":{"shasum":"d27edd264f8ed7859e96fcf5771e3a991f25e9ad","tarball":"https://registry.npmjs.org/@happyvertical/pdf/-/pdf-0.65.2.tgz","fileCount":53,"integrity":"sha512-qbXcEiD4ubQ/xwzONqpviFgIinPJvgf3+wKEDb4/BD0FygVT0sJeOxqywDkkeN9KOthAew3AiT3FhJkErXcEFA==","signatures":[{"sig":"MEYCIQDjdWK9+qGYhR3Qn/jD9Yqzp0Dmj2zVNQxk3ztPNvBDvwIhALMrmH0MEf4QArvSAupu8PhmtEoamy4bGCfsbt15WdJ9","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":464861},"main":"./dist/index.js","type":"module","_from":"file:happyvertical-pdf-0.65.2.tgz","types":"./dist/index.d.ts","engines":{"node":">=24","pnpm":">=9"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"npm run build:watch & npm run test:watch","lint":"biome check .","test":"vitest run --testTimeout 120000","build":"vite build","clean":"rm -rf dist *.tsbuildinfo","format":"biome format --write src/","docs:api":"typedoc --options typedoc.json","changeset":"changeset","typecheck":"tsc --noEmit","test:watch":"vitest --testTimeout 120000","build:watch":"vite build --watch","test:coverage":"vitest run --coverage --testTimeout 120000","changeset:auto":"npx tsx scripts/auto-changeset.ts","docs:api:check":"tsx scripts/check-generated-api-docs.ts","changeset:publish":"changeset publish","changeset:version":"changeset version"},"_npmUser":{"name":"wllgrffn","email":"willgriffin@gmail.com"},"_resolved":"/tmp/e63bcf9b2ff27057ec7aaf84661715c1/happyvertical-pdf-0.65.2.tgz","_integrity":"sha512-qbXcEiD4ubQ/xwzONqpviFgIinPJvgf3+wKEDb4/BD0FygVT0sJeOxqywDkkeN9KOthAew3AiT3FhJkErXcEFA==","repository":{"url":"git+https://github.com/happyvertical/pdf.git","type":"git"},"_npmVersion":"11.16.0","description":"Node.js PDF extraction, OCR fallback, image extraction, and PDF generation utilities","directories":{},"_nodeVersion":"24.18.0","dependencies":{"unpdf":"^1.4.0","marked":"^14.1.4","pdf-lib":"^1.17.1","pdfjs-dist":"5.4.296","puppeteer-core":"^25.1.0","@napi-rs/canvas":"0.1.99","@happyvertical/ocr":"^0.60.52","@happyvertical/utils":"^0.74.9"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.0","vite":"7.3.2","vitest":"^4.0.8","typedoc":"^0.28.19","lefthook":"^1.11.13","typescript":"^5.9.3","@types/node":"24.12.2","@biomejs/biome":"1.9.4","@changesets/cli":"^2.29.8","@commitlint/cli":"^19.8.1","vite-plugin-dts":"4.5.4","@vitest/coverage-v8":"^4.0.15","@commitlint/config-conventional":"^19.8.1"},"optionalDependencies":{"@kreuzberg/node":"^4.1.1"},"_npmOperationalInternal":{"tmp":"tmp/pdf_0.65.2_1782292267962_0.019121009651530407","host":"s3://npm-registry-packages-npm-production"}},"0.65.3":{"name":"@happyvertical/pdf","version":"0.65.3","keywords":["pdf","ocr","text-extraction","pdf-generation","html-to-pdf","markdown-to-pdf","unpdf"],"license":"MIT","_id":"@happyvertical/pdf@0.65.3","maintainers":[{"name":"wllgrffn","email":"willgriffin@gmail.com"}],"homepage":"https://github.com/happyvertical/pdf#readme","bugs":{"url":"https://github.com/happyvertical/pdf/issues"},"dist":{"shasum":"d2b90477abe078fc960c338dd415f31826cd78d3","tarball":"https://registry.npmjs.org/@happyvertical/pdf/-/pdf-0.65.3.tgz","fileCount":53,"integrity":"sha512-kxsONlwyMFRLe28VpffoRwiB1VBKlLX3R5FxBL6NO+ItNdfIL5/TtGfmWVrPSswQ6kq9smgeLUujUUvRz60T3g==","signatures":[{"sig":"MEYCIQC/Us4K3tIGgx8HieWLSUBaa4PhhxU5i6X95HMrJ4JgvQIhAObqBw3CTBCeJG0FZGsostSDeXIAhHj2Pip1rg+GFXsQ","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":465195},"main":"./dist/index.js","type":"module","_from":"file:happyvertical-pdf-0.65.3.tgz","types":"./dist/index.d.ts","engines":{"node":">=24","pnpm":">=9"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"npm run build:watch & npm run test:watch","lint":"biome check .","test":"vitest run --testTimeout 120000","build":"vite build","clean":"rm -rf dist *.tsbuildinfo","format":"biome format --write src/","docs:api":"typedoc --options typedoc.json","changeset":"changeset","typecheck":"tsc --noEmit","test:watch":"vitest --testTimeout 120000","build:watch":"vite build --watch","test:coverage":"vitest run --coverage --testTimeout 120000","changeset:auto":"npx tsx scripts/auto-changeset.ts","docs:api:check":"tsx scripts/check-generated-api-docs.ts","changeset:publish":"changeset publish","changeset:version":"changeset version"},"_npmUser":{"name":"wllgrffn","email":"willgriffin@gmail.com"},"_resolved":"/tmp/b11e9cd56c2695651db614c3dac674d3/happyvertical-pdf-0.65.3.tgz","_integrity":"sha512-kxsONlwyMFRLe28VpffoRwiB1VBKlLX3R5FxBL6NO+ItNdfIL5/TtGfmWVrPSswQ6kq9smgeLUujUUvRz60T3g==","repository":{"url":"git+https://github.com/happyvertical/pdf.git","type":"git"},"_npmVersion":"11.16.0","description":"Node.js PDF extraction, OCR fallback, image extraction, and PDF generation utilities","directories":{},"_nodeVersion":"24.18.0","dependencies":{"unpdf":"^1.4.0","marked":"^14.1.4","pdf-lib":"^1.17.1","pdfjs-dist":"5.4.296","puppeteer-core":"^25.1.0","@napi-rs/canvas":"0.1.99","@happyvertical/ocr":"^0.60.53","@happyvertical/utils":"^0.74.9"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.0","vite":"7.3.2","vitest":"^4.0.8","typedoc":"^0.28.19","lefthook":"^1.11.13","typescript":"^5.9.3","@types/node":"24.12.2","@biomejs/biome":"1.9.4","@changesets/cli":"^2.29.8","@commitlint/cli":"^19.8.1","vite-plugin-dts":"4.5.4","@vitest/coverage-v8":"^4.0.15","@commitlint/config-conventional":"^19.8.1"},"optionalDependencies":{"@kreuzberg/node":"^4.1.1"},"_npmOperationalInternal":{"tmp":"tmp/pdf_0.65.3_1782357670989_0.22336308931287752","host":"s3://npm-registry-packages-npm-production"}},"0.65.4":{"name":"@happyvertical/pdf","version":"0.65.4","keywords":["pdf","ocr","text-extraction","pdf-generation","html-to-pdf","markdown-to-pdf","unpdf"],"license":"MIT","_id":"@happyvertical/pdf@0.65.4","maintainers":[{"name":"wllgrffn","email":"willgriffin@gmail.com"}],"homepage":"https://github.com/happyvertical/pdf#readme","bugs":{"url":"https://github.com/happyvertical/pdf/issues"},"dist":{"shasum":"657800d419d83118b6cd7327ebf4df8b4b1049aa","tarball":"https://registry.npmjs.org/@happyvertical/pdf/-/pdf-0.65.4.tgz","fileCount":57,"integrity":"sha512-Y70f2dVv2A5AjV3cAFt3zMMFd1zQSVCBKwKFJupGXL6XsxWHxwzklk1ZHHcf7marJW4G9Ps4sYdX/RopgysGtQ==","signatures":[{"sig":"MEUCIQCyZpeNc4sQl7OTLfZBXWh9HeqaW07HuGaIYkwBNAJpdgIgC1MZ8xiUPue/05mxeB29WPVoOKS9wD5tjY/fGCHbXuE=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":465305},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=24","pnpm":">=11.13.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"npm run build:watch & npm run test:watch","lint":"biome check .","test":"vitest run --testTimeout 120000","build":"vite build","clean":"rm -rf dist *.tsbuildinfo","format":"biome format --write src/","docs:api":"typedoc --options typedoc.json","changeset":"changeset","typecheck":"tsc --noEmit","test:watch":"vitest --testTimeout 120000","build:watch":"vite build --watch","test:coverage":"vitest run --coverage --testTimeout 120000","changeset:auto":"npx tsx scripts/auto-changeset.ts","docs:api:check":"tsx scripts/check-generated-api-docs.ts","changeset:publish":"changeset publish","changeset:version":"changeset version"},"_npmUser":{"name":"wllgrffn","email":"willgriffin@gmail.com"},"repository":{"url":"https://github.com/happyvertical/pdf.git","type":"git"},"description":"Node.js PDF extraction, OCR fallback, image extraction, and PDF generation utilities","directories":{},"_nodeVersion":"24.18.0","dependencies":{"unpdf":"^1.4.0","marked":"^14.1.4","pdf-lib":"^1.17.1","pdfjs-dist":"5.4.296","puppeteer-core":"^25.1.0","@napi-rs/canvas":"0.1.99","@happyvertical/ocr":"^0.60.53","@happyvertical/utils":"^0.74.9"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.20.0","vite":"8.1.4","vitest":"4.1.10","typedoc":"^0.28.19","lefthook":"2.1.10","typescript":"5.9.3","@types/node":"24.12.2","@biomejs/biome":"2.5.3","@changesets/cli":"^2.29.8","@commitlint/cli":"^19.8.1","vite-plugin-dts":"4.5.4","@vitest/coverage-v8":"4.1.10","@commitlint/config-conventional":"^19.8.1"},"optionalDependencies":{"@kreuzberg/node":"^4.1.1"},"_npmOperationalInternal":{"tmp":"tmp/pdf_0.65.4_1784125015229_0.45459013613598453","host":"s3://npm-registry-packages-npm-production"}},"0.65.5":{"name":"@happyvertical/pdf","version":"0.65.5","keywords":["pdf","ocr","text-extraction","pdf-generation","html-to-pdf","markdown-to-pdf","unpdf"],"license":"MIT","_id":"@happyvertical/pdf@0.65.5","maintainers":[{"name":"wllgrffn","email":"willgriffin@gmail.com"}],"homepage":"https://github.com/happyvertical/pdf#readme","bugs":{"url":"https://github.com/happyvertical/pdf/issues"},"dist":{"shasum":"7e9917fd5953521ffe2039cf95d4d97f4e8a1ffd","tarball":"https://registry.npmjs.org/@happyvertical/pdf/-/pdf-0.65.5.tgz","fileCount":57,"integrity":"sha512-8XvncVUOFyYmsKgLWb1O1k9QLLr33QTDkRMo+2idAXvUfOb4zhNlGTzVm+QkJEoWiHLebc/licF9Qqbri6mFiw==","signatures":[{"sig":"MEUCIEst+KluivxT41PXg25UiMhOjS//vF/78QtNQsuSoraaAiEA7+6P+jbcXGmVGvEBHPCBn7hUhVcMxzkA2QA/UfCetI4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":466407},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=24","pnpm":">=11.13.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"npm run build:watch & npm run test:watch","lint":"biome check .","test":"vitest run --testTimeout 120000","build":"vite build","clean":"rm -rf dist *.tsbuildinfo","format":"biome format --write src/","docs:api":"typedoc --options typedoc.json","changeset":"changeset","typecheck":"tsc --noEmit","test:watch":"vitest --testTimeout 120000","build:watch":"vite build --watch","test:coverage":"vitest run --coverage --testTimeout 120000","changeset:auto":"npx tsx scripts/auto-changeset.ts","docs:api:check":"tsx scripts/check-generated-api-docs.ts","changeset:publish":"changeset publish","changeset:version":"changeset version"},"_npmUser":{"name":"wllgrffn","email":"willgriffin@gmail.com"},"repository":{"url":"https://github.com/happyvertical/pdf.git","type":"git"},"description":"Node.js PDF extraction, OCR fallback, image extraction, and PDF generation utilities","directories":{},"_nodeVersion":"24.18.0","dependencies":{"unpdf":"^1.6.2","marked":"^18.0.6","pdf-lib":"^1.17.1","pdfjs-dist":"6.1.200","puppeteer-core":"^25.3.0","@napi-rs/canvas":"0.1.100","@happyvertical/ocr":"^0.61.1","@happyvertical/utils":"^0.80.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.1","vite":"8.1.4","vitest":"4.1.10","typedoc":"^0.28.20","lefthook":"2.1.10","typescript":"6.0.3","@types/node":"24.13.3","@biomejs/biome":"2.5.4","@changesets/cli":"^2.31.0","@commitlint/cli":"^21.2.1","vite-plugin-dts":"5.0.3","@vitest/coverage-v8":"4.1.10","@commitlint/config-conventional":"^21.2.0"},"optionalDependencies":{"@kreuzberg/node":"^4.10.2"},"_npmOperationalInternal":{"tmp":"tmp/pdf_0.65.5_1784154338605_0.7762804307568338","host":"s3://npm-registry-packages-npm-production"}},"0.65.6":{"name":"@happyvertical/pdf","version":"0.65.6","keywords":["pdf","ocr","text-extraction","pdf-generation","html-to-pdf","markdown-to-pdf","unpdf"],"license":"MIT","_id":"@happyvertical/pdf@0.65.6","maintainers":[{"name":"wllgrffn","email":"willgriffin@gmail.com"}],"homepage":"https://github.com/happyvertical/pdf#readme","bugs":{"url":"https://github.com/happyvertical/pdf/issues"},"dist":{"shasum":"f7c9b4d7685c00184056b61eb6f439ca28863f33","tarball":"https://registry.npmjs.org/@happyvertical/pdf/-/pdf-0.65.6.tgz","fileCount":57,"integrity":"sha512-uOUHww2+bjBf8DRptrKZ2YlHG5d3RMwGzpT+Jepf1AUdPCUxS4mqi4FtUvtumU+w46cfcwUeehxV1y3FiBiehg==","signatures":[{"sig":"MEUCIG5zngnlLBWNvasFHR2TvDDTqjNd4ldOl73e7FxOXbxwAiEA1MLDArBj0WV3rHy9WPGRGC+j35XokKTrkmHevWXDM1Y=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":466407},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=24","pnpm":">=11.13.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"npm run build:watch & npm run test:watch","lint":"biome check .","test":"vitest run --testTimeout 120000","build":"vite build","clean":"rm -rf dist *.tsbuildinfo","format":"biome format --write src/","docs:api":"typedoc --options typedoc.json","changeset":"changeset","typecheck":"tsc --noEmit","test:watch":"vitest --testTimeout 120000","build:watch":"vite build --watch","test:coverage":"vitest run --coverage --testTimeout 120000","changeset:auto":"npx tsx scripts/auto-changeset.ts","docs:api:check":"tsx scripts/check-generated-api-docs.ts","changeset:publish":"changeset publish","changeset:version":"changeset version"},"_npmUser":{"name":"wllgrffn","email":"willgriffin@gmail.com"},"repository":{"url":"https://github.com/happyvertical/pdf.git","type":"git"},"description":"Node.js PDF extraction, OCR fallback, image extraction, and PDF generation utilities","directories":{},"_nodeVersion":"24.18.0","dependencies":{"unpdf":"^1.6.2","marked":"^18.0.6","pdf-lib":"^1.17.1","pdfjs-dist":"6.1.200","puppeteer-core":"^25.3.0","@napi-rs/canvas":"0.1.100","@happyvertical/ocr":"^0.61.1","@happyvertical/utils":"^0.80.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.1","vite":"8.1.4","vitest":"4.1.10","typedoc":"^0.28.20","lefthook":"2.1.10","typescript":"6.0.3","@types/node":"24.13.3","@biomejs/biome":"2.5.4","@changesets/cli":"^2.31.0","@commitlint/cli":"^21.2.1","vite-plugin-dts":"5.0.3","@vitest/coverage-v8":"4.1.10","@commitlint/config-conventional":"^21.2.0"},"optionalDependencies":{"@kreuzberg/node":"^4.10.2"},"_npmOperationalInternal":{"tmp":"tmp/pdf_0.65.6_1784368834734_0.011465230650642866","host":"s3://npm-registry-packages-npm-production"}},"0.65.7":{"name":"@happyvertical/pdf","version":"0.65.7","keywords":["pdf","ocr","text-extraction","pdf-generation","html-to-pdf","markdown-to-pdf","unpdf"],"license":"MIT","_id":"@happyvertical/pdf@0.65.7","maintainers":[{"name":"wllgrffn","email":"willgriffin@gmail.com"}],"homepage":"https://github.com/happyvertical/pdf#readme","bugs":{"url":"https://github.com/happyvertical/pdf/issues"},"dist":{"shasum":"decd2cdee1c6f21133c6b63a515c84d39f8a18d9","tarball":"https://registry.npmjs.org/@happyvertical/pdf/-/pdf-0.65.7.tgz","fileCount":66,"integrity":"sha512-sLNH5xMmxsq40aIfXDwSiX3BdyuX69MnJzxFR63qctQZXzWLLQqk2RTStLVx+Zga7qBSamsex8K4NmDN9yxwng==","signatures":[{"sig":"MEQCIHU38y/rwjRg/loxYqHbB8oRu1B6A8P6l91b6dnXah4YAiAnbEUvvQeJ4n+6HMnxDfC3CYov/eQP5qRv1/3X7LJkwQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":497948},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=24","pnpm":">=11.13.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"npm run build:watch & npm run test:watch","lint":"biome check .","test":"vitest run --testTimeout 120000","build":"vite build","clean":"rm -rf dist *.tsbuildinfo","format":"biome format --write src/","docs:api":"typedoc --options typedoc.json","changeset":"changeset","typecheck":"tsc --noEmit","test:watch":"vitest --testTimeout 120000","build:watch":"vite build --watch","test:coverage":"vitest run --coverage --testTimeout 120000","changeset:auto":"npx tsx scripts/auto-changeset.ts","docs:api:check":"tsx scripts/check-generated-api-docs.ts","changeset:publish":"changeset publish","changeset:version":"changeset version"},"_npmUser":{"name":"wllgrffn","email":"willgriffin@gmail.com"},"repository":{"url":"https://github.com/happyvertical/pdf.git","type":"git"},"description":"Node.js PDF extraction, OCR fallback, image extraction, and PDF generation utilities","directories":{},"_nodeVersion":"24.18.0","dependencies":{"unpdf":"^1.6.2","marked":"^18.0.6","pdf-lib":"^1.17.1","pdfjs-dist":"6.1.200","puppeteer-core":"^25.3.0","@napi-rs/canvas":"0.1.100","@happyvertical/ocr":"^0.61.1","@happyvertical/utils":"^0.80.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.1","vite":"8.1.4","vitest":"4.1.10","typedoc":"^0.28.20","lefthook":"2.1.10","typescript":"6.0.3","@types/node":"24.13.3","@biomejs/biome":"2.5.4","@changesets/cli":"^2.31.0","@commitlint/cli":"^21.2.1","vite-plugin-dts":"5.0.3","@vitest/coverage-v8":"4.1.10","@commitlint/config-conventional":"^21.2.0"},"optionalDependencies":{"@kreuzberg/node":"^4.10.2"},"_npmOperationalInternal":{"tmp":"tmp/pdf_0.65.7_1785295157907_0.9495742554168909","host":"s3://npm-registry-packages-npm-production"}},"0.65.8":{"name":"@happyvertical/pdf","version":"0.65.8","keywords":["pdf","ocr","text-extraction","pdf-generation","html-to-pdf","markdown-to-pdf","unpdf"],"license":"MIT","_id":"@happyvertical/pdf@0.65.8","maintainers":[{"name":"wllgrffn","email":"willgriffin@gmail.com"}],"homepage":"https://github.com/happyvertical/pdf#readme","bugs":{"url":"https://github.com/happyvertical/pdf/issues"},"dist":{"shasum":"739f3dc4d1dc292005b51ad1f11a432bf41fd73e","tarball":"https://registry.npmjs.org/@happyvertical/pdf/-/pdf-0.65.8.tgz","fileCount":66,"integrity":"sha512-KahZTgmkgmPEFgZnEE5APPhkg9QylpfdzzT/JvY5h/FjFOyMMGcd3cc2zUm5sib4l2CjX+9RJiDdDxr5xMp4Pw==","signatures":[{"sig":"MEQCIGs1Q9fVvy209/c50auJPtQ62u7O5WKRk2BJfXsua00fAiB8ZqcfRAmAtExNsWLbnuUkCjrOuer9ET5LTbc8tTbfJg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":501922},"main":"./dist/index.js","type":"module","types":"./dist/index.d.ts","engines":{"node":">=24","pnpm":">=11.13.0"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js"}},"scripts":{"dev":"npm run build:watch & npm run test:watch","lint":"biome check .","test":"vitest run --testTimeout 120000","build":"vite build","clean":"rm -rf dist *.tsbuildinfo","format":"biome format --write src/","docs:api":"typedoc --options typedoc.json","changeset":"changeset","typecheck":"tsc --noEmit","test:watch":"vitest --testTimeout 120000","build:watch":"vite build --watch","test:coverage":"vitest run --coverage --testTimeout 120000","changeset:auto":"npx tsx scripts/auto-changeset.ts","docs:api:check":"tsx scripts/check-generated-api-docs.ts","changeset:publish":"changeset publish","changeset:version":"changeset version"},"_npmUser":{"name":"wllgrffn","email":"willgriffin@gmail.com"},"repository":{"url":"https://github.com/happyvertical/pdf.git","type":"git"},"description":"Node.js PDF extraction, OCR fallback, image extraction, and PDF generation utilities","directories":{},"_nodeVersion":"24.18.0","dependencies":{"unpdf":"^1.6.2","marked":"^18.0.6","pdf-lib":"^1.17.1","pdfjs-dist":"6.1.200","puppeteer-core":"^25.3.0","@napi-rs/canvas":"0.1.100","@happyvertical/ocr":"^0.61.1","@happyvertical/utils":"^0.80.1"},"publishConfig":{"access":"public","registry":"https://registry.npmjs.org"},"_hasShrinkwrap":false,"devDependencies":{"tsx":"^4.23.1","vite":"8.1.4","vitest":"4.1.10","typedoc":"^0.28.20","lefthook":"2.1.10","typescript":"6.0.3","@types/node":"24.13.3","@biomejs/biome":"2.5.4","@changesets/cli":"^2.31.0","@commitlint/cli":"^21.2.1","vite-plugin-dts":"5.0.3","@vitest/coverage-v8":"4.1.10","@commitlint/config-conventional":"^21.2.0"},"optionalDependencies":{"@kreuzberg/node":"^4.10.2"},"_npmOperationalInternal":{"tmp":"tmp/pdf_0.65.8_1785348490714_0.14261242276795882","host":"s3://npm-registry-packages-npm-production"}},"0.65.9":{"name":"@happyvertical/pdf","version":"0.65.9","description":"Node.js PDF extraction, OCR fallback, image extraction, and PDF generation utilities","type":"module","main":"./dist/index.js","types":"./dist/index.d.ts","engines":{"node":">=24","pnpm":">=11.13.0"},"keywords":["pdf","ocr","text-extraction","pdf-generation","html-to-pdf","markdown-to-pdf","unpdf"],"publishConfig":{"registry":"https://registry.npmjs.org","access":"public"},"repository":{"type":"git","url":"https://github.com/happyvertical/pdf.git"},"bugs":{"url":"https://github.com/happyvertical/pdf/issues"},"homepage":"https://github.com/happyvertical/pdf#readme","license":"MIT","exports":{".":{"import":"./dist/index.js","types":"./dist/index.d.ts"}},"dependencies":{"@happyvertical/ocr":"^0.61.1","@happyvertical/utils":"^0.80.1","@napi-rs/canvas":"0.1.100","marked":"^18.0.6","pdf-lib":"^1.17.1","pdfjs-dist":"6.1.200","puppeteer-core":"^25.3.0","unpdf":"^1.6.2"},"optionalDependencies":{"@kreuzberg/node":"^4.10.2"},"devDependencies":{"@biomejs/biome":"2.5.4","@changesets/cli":"^2.31.0","@commitlint/cli":"^21.2.1","@commitlint/config-conventional":"^21.2.0","@types/node":"24.13.3","@vitest/coverage-v8":"4.1.10","lefthook":"2.1.10","tsx":"^4.23.1","typedoc":"^0.28.20","typescript":"6.0.3","vite":"8.1.4","vite-plugin-dts":"5.0.3","vitest":"4.1.10"},"scripts":{"test":"vitest run --testTimeout 120000","test:coverage":"vitest run --coverage --testTimeout 120000","test:watch":"vitest --testTimeout 120000","build":"vite build","build:watch":"vite build --watch","typecheck":"tsc --noEmit","lint":"biome check .","format":"biome format --write src/","docs:api":"typedoc --options typedoc.json","docs:api:check":"tsx scripts/check-generated-api-docs.ts","clean":"rm -rf dist *.tsbuildinfo","dev":"npm run build:watch & npm run test:watch","changeset":"changeset","changeset:auto":"npx tsx scripts/auto-changeset.ts","changeset:version":"changeset version","changeset:publish":"changeset publish"},"_nodeVersion":"24.18.1","_id":"@happyvertical/pdf@0.65.9","dist":{"integrity":"sha512-FnyCI8N8YQeeuKUQdiiPoKkN4U4Hqgf/N+7Vw1HMAw0vmoliNGlPJBZcqzl6hX4N3ZdXYNP6pqiVHGmPiDiBhw==","shasum":"f45d373318c9fef95ab46bd177114ba4f7bc557b","tarball":"https://registry.npmjs.org/@happyvertical/pdf/-/pdf-0.65.9.tgz","fileCount":66,"unpackedSize":501922,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCCHH2rDQxctJTx5pozN0oxe259/2X9mg5JVKioRcrf3wIgDcylu6hPLLQ3FRUAN6tM4GLYZ8/cQZk/p1B8KK2Fwas="}]},"_npmUser":{"name":"wllgrffn","email":"willgriffin@gmail.com"},"directories":{},"maintainers":[{"name":"wllgrffn","email":"willgriffin@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/pdf_0.65.9_1785517402929_0.5585671539738621"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-24T09:11:07.783Z","modified":"2026-07-31T17:03:23.277Z","0.65.2":"2026-06-24T09:11:08.112Z","0.65.3":"2026-06-25T03:21:11.163Z","0.65.4":"2026-07-15T14:16:55.379Z","0.65.5":"2026-07-15T22:25:38.774Z","0.65.6":"2026-07-18T10:00:34.883Z","0.65.7":"2026-07-29T03:19:18.043Z","0.65.8":"2026-07-29T18:08:10.871Z","0.65.9":"2026-07-31T17:03:23.074Z"},"bugs":{"url":"https://github.com/happyvertical/pdf/issues"},"license":"MIT","homepage":"https://github.com/happyvertical/pdf#readme","keywords":["pdf","ocr","text-extraction","pdf-generation","html-to-pdf","markdown-to-pdf","unpdf"],"repository":{"type":"git","url":"https://github.com/happyvertical/pdf.git"},"description":"Node.js PDF extraction, OCR fallback, image extraction, and PDF generation utilities","maintainers":[{"name":"wllgrffn","email":"willgriffin@gmail.com"}],"readme":"# @happyvertical/pdf\n\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\nNode.js PDF utilities for extracting text, reading metadata, extracting or\nrendering images, running OCR fallback, and generating PDFs from Markdown or\nHTML.\n\n## Features\n\n- Direct PDF text, metadata, and image extraction through `unpdf`\n- OCR fallback for scanned or image-based PDFs through `@happyvertical/ocr`\n- Document analysis with `getInfo()` strategy recommendations\n- Batched image extraction for large PDFs\n- Web-safe image output from extracted PDF images (`webp` by default)\n- Markdown-to-PDF generation with `pdf-lib` and `marked`\n- HTML-to-PDF generation with `puppeteer-core` and a system Chromium\n- Typed errors for dependency, file-size, image-collection, and OCR failures\n\n## Requirements\n\n- Node.js `>=24`\n- ESM imports\n- A Chromium or Chrome binary only when using `renderHtmlToPdf`\n- Extra memory for OCR-heavy workloads; 2 GB+ is a practical starting point\n\nThis package is currently Node-first. Browser provider code exists internally,\nbut the public package export does not expose a stable browser entry point yet.\n\n## Installation\n\n```bash\npnpm add @happyvertical/pdf\nnpm install @happyvertical/pdf\nyarn add @happyvertical/pdf\nbun add @happyvertical/pdf\n```\n\n## Basic Usage\n\n```typescript\nimport { getPDFReader } from '@happyvertical/pdf';\n\nconst reader = await getPDFReader();\nconst text = await reader.extractText('/path/to/document.pdf');\n\nconsole.log(text);\n```\n\n`extractText()` first tries embedded PDF text. When OCR is enabled and direct\ntext extraction finds nothing useful, the Node reader renders pages and sends\nthem through `@happyvertical/ocr`.\n\n## Analyze Before Processing\n\nUse `getInfo()` when routing many documents or deciding whether OCR is likely\nto be needed.\n\n```typescript\nimport { getPDFReader } from '@happyvertical/pdf';\n\nconst reader = await getPDFReader();\nconst info = await reader.getInfo('/path/to/document.pdf');\n\nconsole.log({\n  pages: info.pageCount,\n  hasEmbeddedText: info.hasEmbeddedText,\n  hasImages: info.hasImages,\n  strategy: info.recommendedStrategy,\n});\n\nconst text = await reader.extractText('/path/to/document.pdf', {\n  skipOCRFallback: info.recommendedStrategy === 'text',\n});\n```\n\n## Metadata And Images\n\n```typescript\nimport { getPDFReader } from '@happyvertical/pdf';\n\nconst reader = await getPDFReader();\n\nconst metadata = await reader.extractMetadata('/path/to/document.pdf');\nconsole.log(metadata.title, metadata.author, metadata.pageCount);\n\nconst images = await reader.extractImages('/path/to/document.pdf');\nconsole.log(images.map((image) => image.format)); // image/webp by default\n```\n\n`extractImages()` returns WebP images by default so callers can store or serve\n`image.data` directly. Pass `outputFormat: 'original'` when you need the raw\nprovider bytes, especially for OCR pipelines that prefer raw RGB data.\n\n```typescript\nconst rawImages = await reader.extractImages('/path/to/document.pdf', {\n  outputFormat: 'original',\n});\n```\n\nFor image-heavy PDFs, process image batches incrementally instead of retaining\nevery image buffer in memory.\n\n```typescript\nawait reader.extractImages('/path/to/large-document.pdf', {\n  batchSize: 4,\n  collect: false,\n  onBatch: async ({ images, pages }) => {\n    console.log(`Processing ${images.length} images from pages ${pages.join(', ')}`);\n  },\n});\n```\n\n## Explicit OCR\n\nFor scanned PDFs, prefer `extractText()` with OCR fallback. If you need to call\nOCR yourself, render full pages rather than extracting embedded images.\n\n```typescript\nimport { getPDFReader } from '@happyvertical/pdf';\n\nconst reader = await getPDFReader({\n  defaultOCROptions: {\n    language: 'eng',\n    confidenceThreshold: 70,\n  },\n});\n\nconst pages = await reader.renderPages('/path/to/scanned.pdf', {\n  scale: 2,\n  outputFormat: 'original',\n});\n\nconst result = await reader.performOCR(pages);\nconsole.log(result.text, result.confidence);\n```\n\n## Generate PDFs\n\n### Markdown\n\n`renderMarkdownToPdf()` is pure JavaScript. It supports common Markdown blocks\nand inline emphasis, uses PDF standard fonts, and paginates content.\n\n```typescript\nimport { writeFile } from 'node:fs/promises';\nimport { renderMarkdownToPdf } from '@happyvertical/pdf';\n\nconst pdf = await renderMarkdownToPdf('# Status\\n\\nEverything is green.', {\n  title: 'Status Report',\n  pageSize: 'letter',\n});\n\nawait writeFile('status.pdf', pdf);\n```\n\n### HTML\n\n`renderHtmlToPdf()` uses `puppeteer-core` and never downloads a browser. Install\nChromium in the runtime image or set `PUPPETEER_EXECUTABLE_PATH`.\n\n```typescript\nimport { writeFile } from 'node:fs/promises';\nimport { renderHtmlToPdf } from '@happyvertical/pdf';\n\nconst pdf = await renderHtmlToPdf('<h1>Invoice</h1>', {\n  format: 'Letter',\n  margin: { top: '0.5in', bottom: '0.5in' },\n});\n\nawait writeFile('invoice.pdf', pdf);\n```\n\nYou can also pass `executablePath` directly or call\n`resolveChromiumExecutablePath()` to inspect what binary will be used.\n\n## Configuration\n\n```typescript\nimport { getPDFReader } from '@happyvertical/pdf';\n\nconst reader = await getPDFReader({\n  provider: 'auto',\n  enableOCR: true,\n  timeout: 30_000,\n  maxFileSize: 50 * 1024 * 1024,\n  ocrProvider: 'auto',\n  defaultOCROptions: {\n    language: 'eng',\n    confidenceThreshold: 70,\n  },\n});\n```\n\nEnvironment variables use the `HAVE_PDF_` prefix and are merged with explicit\noptions. Explicit options always win.\n\n| Environment variable | Type | Example |\n| --- | --- | --- |\n| `HAVE_PDF_ENABLE_OCR` | boolean | `true` |\n| `HAVE_PDF_TIMEOUT` | number | `30000` |\n| `HAVE_PDF_PROVIDER` | string | `auto`, `unpdf`, `kreuzberg` |\n| `HAVE_PDF_OCR_PROVIDER` | string | `auto`, `tesseract`, `onnx` |\n| `HAVE_PDF_MAX_FILE_SIZE` | number | `52428800` |\n\n## Providers\n\n- `auto`: default. In Node.js, uses the combined `unpdf` plus OCR reader.\n- `unpdf`: Node.js text, metadata, image extraction, page rendering, and OCR\n  fallback through `@happyvertical/ocr`.\n- `kreuzberg`: optional Node.js provider via `@kreuzberg/node`; useful when\n  available, but not required.\n\nThe `pdfjs` provider is not a stable public package target yet.\n\nAutomatic selection stays on `unpdf` when `enableOCR` is `false` or\n`ocrProvider` names a backend Kreuzberg cannot serve, since Kreuzberg is in the\nchain for its integrated OCR.\n\n### Kreuzberg needs an AVX2-capable CPU\n\nThe prebuilt `@kreuzberg/node` binary executes AVX2 instructions, so using it on\na pre-AVX2 x86-64 host (`x86-64-v2` and below) raises `SIGILL` and terminates the\nprocess. The binary is loaded lazily on the first native call, so any code that\nmerely asks whether the provider works is enough to trigger it.\n`optionalDependencies` cannot prevent this: npm and pnpm only skip a package by\n`os`, `cpu`, or `libc`, and AVX2 is a microarchitecture level rather than an\narchitecture.\n\nThis package therefore reads the `avx2` flag from `/proc/cpuinfo` before loading\nanything native. Automatic selection falls back to `unpdf` when the flag is\nabsent. Requesting `provider: 'kreuzberg'` explicitly still returns a reader,\nand that reader degrades the same way it does for any other missing dependency\nrather than killing the process: `checkDependencies()` reports\n`available: false` with an error naming AVX2, and extraction calls return their\nempty result. Check `checkDependencies()` before relying on this provider.\n\nNon-Linux and non-x86-64 hosts keep attempting the load: their CPU flags are not\nreadable this way, and the fault has only been observed on older Linux servers.\n\n## Errors\n\n```typescript\nimport {\n  PDFDependencyError,\n  PDFFileSizeError,\n  PDFImageCollectionLimitError,\n  PDFOCRFallbackError,\n  PDFUnsupportedError,\n  getPDFReader,\n} from '@happyvertical/pdf';\n\ntry {\n  const reader = await getPDFReader();\n  await reader.extractText('/path/to/document.pdf');\n} catch (error) {\n  if (error instanceof PDFDependencyError) {\n    console.error('Missing dependency:', error.message);\n  } else if (error instanceof PDFFileSizeError) {\n    console.error('File too large:', error.message);\n  } else if (error instanceof PDFImageCollectionLimitError) {\n    console.error('Use batched image extraction:', error.message);\n  } else if (error instanceof PDFOCRFallbackError) {\n    console.error('OCR fallback failed:', error.message);\n  } else if (error instanceof PDFUnsupportedError) {\n    console.error('Unsupported operation:', error.message);\n  } else {\n    throw error;\n  }\n}\n```\n\n## Legacy Compatibility\n\nThese exports remain for older callers, but new code should use\n`getPDFReader()`.\n\n```typescript\nimport {\n  checkOCRDependencies,\n  extractImagesFromPDF,\n  extractTextFromPDF,\n  performOCROnImages,\n} from '@happyvertical/pdf';\n```\n\n## Development\n\nLifecycle-protected pull requests merge through the managed merge queue so the\nsynthetic merge revision is revalidated before it reaches `main`.\n\n```bash\npnpm install\npnpm build\npnpm typecheck\npnpm lint\npnpm test\npnpm test:coverage\npnpm docs:api\npnpm docs:api:check\npnpm pack --dry-run\n```\n\nThe package ships generated JavaScript and declaration files from `dist/`.\nRun `pnpm build` to refresh the declarations before inspecting the full API\nsurface locally. The generated API reference lives in `docs/api/`; run\n`pnpm docs:api` after changing public exports or JSDoc, and run\n`pnpm docs:api:check` to verify the committed reference is current.\n\n## License\n\nMIT. See [LICENSE](LICENSE).\n","readmeFilename":""}