pdf2json

v3.1.4
PDF file parser that converts PDF binaries to JSON and text, powered by porting a fork of PDF.JS to Node.js
pdf pdf parser pdf2json convert pdf to json convert pdf form to json server side PDF parser port pdf.js to node.js PDF to text PDF text extractor and 7 more...

pretest

npm run build

test:jest

jest --config ./jest.config.json

test

jest --config ./jest.config.json && npm run parse-r && npm run parse-fd

test:forms

cd ./test && sh p2j.forms.sh

test:misc

cd ./test && sh p2j.one.sh misc . "Expected: 13 success, 4 fail exception with stack trace"

parse

./bin/pdf2json.js -f ./test/pdf/fd/form/F1040.pdf -o ./test/target/fd/form

parse-s

./bin/pdf2json.js -f ./test/pdf/fd/form/F1040.pdf -o ./test/target/fd/form -s

parse-t

./bin/pdf2json.js -f ./test/pdf/fd/form/F1040.pdf -o ./test/target/fd/form -s -t

parse-c

./bin/pdf2json.js -f ./test/pdf/fd/form/F1040.pdf -o ./test/target/fd/form -s -t -c

parse-m

./bin/pdf2json.js -f ./test/pdf/fd/form/F1040.pdf -o ./test/target/fd/form -s -t -c -m

parse-r

./bin/pdf2json.js -f ./test/pdf/fd/form/F1040.pdf -o ./test/target/fd/form -t -c -m -r

parse-fd

./bin/pdf2json.js -f ./test/pdf/fd/form/ -o ./test/target/fd/form -t -c -m -r

parse-tb

./bin/pdf2json.js -f ./test/pdf/misc/i242_testingWithTable.pdf -o ./test/target/misc

parse-tc

./bin/pdf2json.js -f ./test/pdf/misc/i293_pdfpac.pdf -o ./test/target/misc

parse-rectFix

./bin/pdf2json.js -f ./test/pdf/misc/pr298_rect_fix_from_upstream.pdf -o ./test/target/misc

parse-e

./bin/pdf2json.js -f ./test/pdf/misc/i43_encrypted.pdf -o ./test/target/misc

build:rollup

rollup -c ./rollup.config.js

build:bundle-pdfjs-base

node rollup/bundle-pdfjs-base.js

build

npm run build:bundle-pdfjs-base && npm run build:rollup

prepare

npm run build
npm i pdf2json

Metadata

Downloads

Maintainers