{"_id":"pdf-ts","_rev":"3-30307dc7cd125877cb7de4fbd1642434","name":"pdf-ts","dist-tags":{"latest":"0.0.2"},"versions":{"0.0.1-beta.1":{"name":"pdf-ts","version":"0.0.1-beta.1","description":"PDF text extraction in TypeScript","main":"./dist/index.js","homepage":"https://github.com/axilla-io/pdf-ts","keywords":["pdf","pdfjs","pdfts","extract","text","pages","typescript","node"],"scripts":{"prebuild":"rm -rf ./dist","build":"tsc","lint":"prettier --check 'src/**/*.ts'","test":"jest --testMatch \"./**/test/**/*.test.ts\"","prepublishOnly":"npm run build"},"author":{"name":"Axilla","url":"https://axilla.io"},"license":"MIT","dependencies":{"pdfjs-dist":"2.16.105"},"devDependencies":{"@types/jest":"^29.5.3","jest":"^29.6.2","prettier":"^3.0.1","ts-jest":"^29.1.1","typescript":"^5.1.6"},"repository":{"type":"git","url":"git+https://github.com/axilla-io/pdf-ts.git"},"bugs":{"url":"https://github.com/axilla-io/pdf-ts/issues"},"types":"./dist/index.d.ts","gitHead":"90ca1404039f45e7fef5cff1065ae6f8e392802d","_id":"pdf-ts@0.0.1-beta.1","_nodeVersion":"19.8.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-fzLpNx91EWuTzRHyl3nxXdYvoF6A3WfB1E228f3pn/H4GFwGcpxke9kshNjU3os8+6CAQZ+lI/xFiTi4g9ueDg==","shasum":"16f4983c945b5e2739409a576a870787e2f6f854","tarball":"https://registry.npmjs.org/pdf-ts/-/pdf-ts-0.0.1-beta.1.tgz","fileCount":7,"unpackedSize":9029,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIEm54Sy3PALH/qiCYCKGziWFtUQvtboj0YckPk62t4MOAiAhzyhHwt0j93lOhJvUxN1lLcyfYwaQ9vtaYGoftmvO9A=="}]},"_npmUser":{"name":"benjreinhart","email":"benjreinhart@gmail.com"},"directories":{},"maintainers":[{"name":"benjreinhart","email":"benjreinhart@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pdf-ts_0.0.1-beta.1_1691365561647_0.39187313409929514"},"_hasShrinkwrap":false},"0.0.1-beta.2":{"name":"pdf-ts","version":"0.0.1-beta.2","description":"PDF text extraction in TypeScript","main":"./dist/index.js","homepage":"https://github.com/axilla-io/pdf-ts","keywords":["pdf","pdfjs","pdfts","extract","text","pages","typescript","node"],"scripts":{"prebuild":"rm -rf ./dist","build":"tsc","lint":"prettier --check 'src/**/*.ts'","test":"jest --testMatch \"./**/test/**/*.test.ts\"","prepublishOnly":"npm run build"},"author":{"name":"Axilla","url":"https://axilla.io"},"license":"MIT","dependencies":{"pdfjs-dist":"2.16.105"},"devDependencies":{"@types/jest":"^29.5.3","jest":"^29.6.2","prettier":"^3.0.1","ts-jest":"^29.1.1","typescript":"^5.1.6"},"repository":{"type":"git","url":"git+https://github.com/axilla-io/pdf-ts.git"},"bugs":{"url":"https://github.com/axilla-io/pdf-ts/issues"},"types":"./dist/index.d.ts","gitHead":"12f3e66e871b38a3f16951ac1901ba4c4c20e0d8","_id":"pdf-ts@0.0.1-beta.2","_nodeVersion":"19.8.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-DjZLXqXixgamyOl2G56attxYi0eXuABQpR1XELyP5eGzHt06AzNx8iIEljCBo8N1KCCWh+VK1NLOSeJiKOeC/A==","shasum":"3a108044599065992690dc1a652bc7fe5b5a5d11","tarball":"https://registry.npmjs.org/pdf-ts/-/pdf-ts-0.0.1-beta.2.tgz","fileCount":7,"unpackedSize":9399,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCy4PMKmusdfgalWZrQ26NBA1M/PM0dG525sqc/OtXrjwIgZxRsuDqEAzXMCL144HFWv+s+3ejtZodzv+7Pm84SCdc="}]},"_npmUser":{"name":"benjreinhart","email":"benjreinhart@gmail.com"},"directories":{},"maintainers":[{"name":"benjreinhart","email":"benjreinhart@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pdf-ts_0.0.1-beta.2_1691366032258_0.6495301419815687"},"_hasShrinkwrap":false},"0.0.1":{"name":"pdf-ts","version":"0.0.1","description":"PDF text extraction in TypeScript","main":"./dist/index.js","homepage":"https://github.com/axilla-io/pdf-ts","keywords":["pdf","pdfjs","pdfts","extract","text","pages","typescript","node"],"scripts":{"prebuild":"rm -rf ./dist","build":"tsc","lint":"prettier --check 'src/**/*.ts'","test":"jest --testMatch \"./**/test/**/*.test.ts\"","prepublishOnly":"npm run build"},"author":{"name":"Axilla","url":"https://axilla.io"},"license":"MIT","dependencies":{"pdfjs-dist":"2.16.105"},"devDependencies":{"@types/jest":"^29.5.3","jest":"^29.6.2","prettier":"^3.0.1","ts-jest":"^29.1.1","typescript":"^5.1.6"},"repository":{"type":"git","url":"git+https://github.com/axilla-io/pdf-ts.git"},"bugs":{"url":"https://github.com/axilla-io/pdf-ts/issues"},"types":"./dist/index.d.ts","gitHead":"6b9309d0f86a7fb172e37879a883ea09887c0a62","_id":"pdf-ts@0.0.1","_nodeVersion":"19.8.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-Dq+XsCeBxFyHCh4P2WZSwClF3yDdCNY9ssqv4eO7cZe5y1xu8xqTlLdEpp3TFOjE1N7gpwlDOc7wAQI3z4b3dA==","shasum":"6f6d772d6027f8fcb8026761d32443f55bdf79d3","tarball":"https://registry.npmjs.org/pdf-ts/-/pdf-ts-0.0.1.tgz","fileCount":7,"unpackedSize":9392,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEQCIFcSa67rs1nNOfKYyJc6D4Y8/oGz0lld/ayvz16SMw95AiBtC+9ekHTlzrlF4B80LJsAnPg3Nb8MMgz+0KuNCP+gRw=="}]},"_npmUser":{"name":"benjreinhart","email":"benjreinhart@gmail.com"},"directories":{},"maintainers":[{"name":"benjreinhart","email":"benjreinhart@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pdf-ts_0.0.1_1691366159683_0.24525575469240302"},"_hasShrinkwrap":false},"0.0.2":{"name":"pdf-ts","version":"0.0.2","description":"PDF text extraction in TypeScript","main":"./dist/index.js","homepage":"https://github.com/axilla-io/pdf-ts","keywords":["pdf","pdfjs","pdfts","extract","text","pages","typescript","node"],"scripts":{"prebuild":"rm -rf ./dist","build":"tsc","lint":"prettier --check 'src/**/*.ts'","test":"jest --testMatch \"./**/test/**/*.test.ts\"","prepublishOnly":"npm run build"},"author":{"name":"Axilla","url":"https://axilla.io"},"license":"MIT","dependencies":{"pdfjs-dist":"1.10.100"},"devDependencies":{"@types/jest":"^29.5.3","jest":"^29.6.2","prettier":"^3.0.1","ts-jest":"^29.1.1","typescript":"^5.1.6"},"repository":{"type":"git","url":"git+https://github.com/axilla-io/pdf-ts.git"},"bugs":{"url":"https://github.com/axilla-io/pdf-ts/issues"},"types":"./dist/index.d.ts","gitHead":"590a43aad42c9846921c416b5adff7fd48a1d115","_id":"pdf-ts@0.0.2","_nodeVersion":"19.8.1","_npmVersion":"9.5.1","dist":{"integrity":"sha512-t9VmdLA+8dvX9t3XulCD1hIEWi0N94p2WpfTPwDcvYCW/NElaK+abHj4q5F4XhJcnxzm6dzlileyaH7qcIbnmQ==","shasum":"27fc7842f998fdd679ae1aa2b95e42b8e0736758","tarball":"https://registry.npmjs.org/pdf-ts/-/pdf-ts-0.0.2.tgz","fileCount":8,"unpackedSize":63249,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDo/Jt/gWsfmV6WxkDRfFYzofhaExyz9DLsHRCuqVUpogIgOTqIIX/bYjS6rmmxKxnmGL/r/iZemgJ2EEYI5ya2tc8="}]},"_npmUser":{"name":"benjreinhart","email":"benjreinhart@gmail.com"},"directories":{},"maintainers":[{"name":"benjreinhart","email":"benjreinhart@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pdf-ts_0.0.2_1691461571201_0.43049901866020734"},"_hasShrinkwrap":false}},"time":{"created":"2023-08-06T23:46:01.643Z","0.0.1-beta.1":"2023-08-06T23:46:01.852Z","modified":"2023-08-08T02:26:11.474Z","0.0.1-beta.2":"2023-08-06T23:53:52.409Z","0.0.1":"2023-08-06T23:55:59.819Z","0.0.2":"2023-08-08T02:26:11.377Z"},"maintainers":[{"name":"benjreinhart","email":"benjreinhart@gmail.com"}],"description":"PDF text extraction in TypeScript","homepage":"https://github.com/axilla-io/pdf-ts","keywords":["pdf","pdfjs","pdfts","extract","text","pages","typescript","node"],"repository":{"type":"git","url":"git+https://github.com/axilla-io/pdf-ts.git"},"author":{"name":"Axilla","url":"https://axilla.io"},"bugs":{"url":"https://github.com/axilla-io/pdf-ts/issues"},"license":"MIT","readme":"# pdf-ts\n\npdf-ts is a TypeScript library for PDF text extraction. It uses [Mozilla's PDF.js](https://mozilla.github.io/pdf.js) to expose a simple API for text extraction.\n\n```shell\nnpm i pdf-ts\n```\n\n## Examples\n\nExtract text from a PDF.\n\n```ts\nimport {pdfToText} from 'pdf-ts';\nconst pdf = await fs.readFile('./path/to/file.pdf');\nconst text = await pdfToText(pdf);\nconsole.log(text);\n```\n\nExtract a list of pages from a PDF.\n\n```ts\nimport {pdfToPages} from 'pdf-ts';\nconst pdf = await fs.readFile('./path/to/file.pdf');\nconst pages = await pdfToPages(pdf);\nconsole.log(pages); // [{page: 1, text: '...'}, {page: 2, text: '...'}, ...]\n```\n\n## License\n\n[MIT](LICENSE)\n\n","readmeFilename":"README.md"}