{"_id":"pdf-parser","_rev":"10-95ed52038f3aeb44ca51a8a7f7cac08e","name":"pdf-parser","description":"Convert PDF content and layout information with pdf.js","dist-tags":{"latest":"1.0.5"},"versions":{"1.0.0":{"name":"pdf-parser","version":"1.0.0","description":"Convert PDF content and layout information with pdf.js","main":"index.js","scripts":{"test":"node pdf2json"},"repository":{"type":"git","url":"git+https://github.com/dunso/pdf-parser.git"},"keywords":["pdf","parser","convertor","pdf.js"],"author":{"name":"dunso"},"license":"Apache-2.0","bugs":{"url":"https://github.com/dunso/pdf-parser/issues"},"homepage":"https://github.com/dunso/pdf-parser#readme","_id":"pdf-parser@1.0.0","_shasum":"42671794251afff60e5b8685271a69931446aa33","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.2","_npmUser":{"name":"dunso","email":"dunso@dun.so"},"dist":{"shasum":"42671794251afff60e5b8685271a69931446aa33","tarball":"https://registry.npmjs.org/pdf-parser/-/pdf-parser-1.0.0.tgz","integrity":"sha512-9bHM6zC5w33R9PA7lsRLSN96CJlimcNqmDHLt6sn7vCOlj56Ypo5xirS0D1JteY+Nduc0YJL0axsZrHPdvaQMA==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6OCCwAw3mXrOjnhIDcW1xVLjdWVeCMtlRaeGWu3fZiAIgQSreGdPIZ4TKOjaaF6QXLZKKM40vQbqeMEEhSyqeWds="}]},"maintainers":[{"name":"dunso","email":"dunso@dun.so"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pdf-parser-1.0.0.tgz_1511718239103_0.9414066637400538"},"directories":{}},"1.0.1":{"name":"pdf-parser","version":"1.0.1","description":"Convert PDF content and layout information with pdf.js","main":"index.js","dependencies":{"node-ensure":"^0.0.0"},"scripts":{"test":"node pdf2json"},"repository":{"type":"git","url":"git+https://github.com/dunso/pdf-parser.git"},"keywords":["pdf","parser","convertor","pdf.js"],"author":{"name":"dunso"},"license":"Apache-2.0","bugs":{"url":"https://github.com/dunso/pdf-parser/issues"},"homepage":"https://github.com/dunso/pdf-parser#readme","gitHead":"27ea5c11470fcfaff06707e7903f9a27c7081a04","_id":"pdf-parser@1.0.1","_shasum":"c4fbe3ce492be73ab880c047f50576561b2a3753","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.2","_npmUser":{"name":"dunso","email":"dunso@dun.so"},"dist":{"shasum":"c4fbe3ce492be73ab880c047f50576561b2a3753","tarball":"https://registry.npmjs.org/pdf-parser/-/pdf-parser-1.0.1.tgz","integrity":"sha512-c60qhk7ttZ94znUuBqh5vEoqYP07rxR1wFJeh+93k9c5EPbtCoEquqqgNiuXuwEOvB9UphQ9haJs4V4PiGJe5A==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDeU1hkJI7HIxMoQC8lxqatqxRKvu694+bbZ1Q5sP4ogQIgN/Cs/2az1k20mXA1N6K8myiZYS/nWdGCDmB/JInVK7A="}]},"maintainers":[{"name":"dunso","email":"dunso@dun.so"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pdf-parser-1.0.1.tgz_1511726951688_0.6599250433500856"},"directories":{}},"1.0.2":{"name":"pdf-parser","version":"1.0.2","description":"Convert PDF content and layout information with pdf.js","main":"index.js","dependencies":{"node-ensure":"^0.0.0"},"scripts":{"test":"node pdf2json"},"repository":{"type":"git","url":"git+https://github.com/dunso/pdf-parser.git"},"keywords":["pdf","parser","convertor","pdf.js"],"author":{"name":"dunso"},"license":"Apache-2.0","bugs":{"url":"https://github.com/dunso/pdf-parser/issues"},"homepage":"https://github.com/dunso/pdf-parser#readme","gitHead":"e84e046025d8cc967022f12a352cda1e8bee49cf","_id":"pdf-parser@1.0.2","_shasum":"0607d0e5775ac09d21dd5fe41b64118cb4299bed","_from":".","_npmVersion":"3.10.10","_nodeVersion":"6.11.2","_npmUser":{"name":"dunso","email":"dunso@dun.so"},"dist":{"shasum":"0607d0e5775ac09d21dd5fe41b64118cb4299bed","tarball":"https://registry.npmjs.org/pdf-parser/-/pdf-parser-1.0.2.tgz","integrity":"sha512-8JnkwEwafaQEBEuY0woeYp6xmrbNQCqRfjanptn9unzyLNhsjMkzN21BAMq0aXRVxfF1JW8+5amI6886KMwKQw==","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQDa/cmJdLZIiY4is21Yg76slhfBuwQDN5kXQdHTsKzYDgIgK5ED+f8QLNobk3xiBpB6n6yUi/10yw5ltIm4j/c+lUo="}]},"maintainers":[{"name":"dunso","email":"dunso@dun.so"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pdf-parser-1.0.2.tgz_1511728742126_0.41475332365371287"},"directories":{}},"1.0.3":{"name":"pdf-parser","version":"1.0.3","description":"Convert PDF content and layout information with pdf.js","main":"index.js","dependencies":{"node-ensure":"^0.0.0"},"scripts":{"test":"node pdf2json"},"repository":{"type":"git","url":"git+https://github.com/dunso/pdf-parser.git"},"keywords":["pdf","parser","convertor","pdf.js"],"author":{"name":"dunso"},"license":"Apache-2.0","bugs":{"url":"https://github.com/dunso/pdf-parser/issues"},"homepage":"https://github.com/dunso/pdf-parser#readme","gitHead":"4400ca732bb28cf45f2faa93f17ae9f625951ad7","_id":"pdf-parser@1.0.3","_npmVersion":"5.5.1","_nodeVersion":"9.2.0","_npmUser":{"name":"dunso","email":"dunso@dun.so"},"dist":{"integrity":"sha512-9Pno/RjEPc9oU4Guj3MsghH5BEh2XmepO4XtbrkxK3l4D3KYVLv96YEoIROTUU/NEosdc2XO0+50UOKx40tCAQ==","shasum":"d3721bd9f16ea7975a6576243c833c98cd24432a","tarball":"https://registry.npmjs.org/pdf-parser/-/pdf-parser-1.0.3.tgz","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQDm7Cw6jLVg7NqdVBUsNPd/nmsy6C+fnGbl+m16kytPnAIhAMPpkt4sDL86170+lHbIM0LZCsGEORCgE9Jz5qT42HLJ"}]},"maintainers":[{"name":"dunso","email":"dunso@dun.so"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pdf-parser-1.0.3.tgz_1512820905656_0.4471958491485566"},"directories":{}},"1.0.4":{"name":"pdf-parser","version":"1.0.4","description":"Convert PDF content and layout information with pdf.js","main":"index.js","dependencies":{"node-ensure":"^0.0.0"},"scripts":{"test":"node pdf2json"},"repository":{"type":"git","url":"git+https://github.com/dunso/pdf-parser.git"},"keywords":["pdf","parser","convertor","pdf.js"],"author":{"name":"dunso"},"license":"Apache-2.0","bugs":{"url":"https://github.com/dunso/pdf-parser/issues"},"homepage":"https://github.com/dunso/pdf-parser#readme","gitHead":"a6f2305bb59afd5461cf2e604662ab3ab0006330","_id":"pdf-parser@1.0.4","_npmVersion":"5.5.1","_nodeVersion":"9.2.0","_npmUser":{"name":"dunso","email":"dunso@dun.so"},"dist":{"integrity":"sha512-FMXE/phwAWlGYBk0YCDGZ2lAhw2V+BL6Pn4UvJjQIyhg0NU9n+p5wjCg5TAEBV4trqoUX+xzlfTHh8K+8rlA4w==","shasum":"4bd10528897c7b7a4c3335bef5821cea4469fbe4","tarball":"https://registry.npmjs.org/pdf-parser/-/pdf-parser-1.0.4.tgz","fileCount":179,"unpackedSize":6884227,"signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEYCIQCOR21jmO7wRB9mgKIxYqwDr/qbMqtTMXpm5MWFHGET6AIhAKUVxvRRZOw5OcpkU94jIlVTzjeVlBLGIkJPdVLYARDC"}]},"maintainers":[{"name":"dunso","email":"dunso@dun.so"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pdf-parser_1.0.4_1522780832181_0.45252825238395133"},"_hasShrinkwrap":false},"1.0.5":{"name":"pdf-parser","version":"1.0.5","description":"Convert PDF content and layout information with pdf.js","main":"index.js","dependencies":{"node-ensure":"^0.0.0"},"scripts":{"test":"node pdf2json"},"repository":{"type":"git","url":"git+https://github.com/dunso/pdf-parser.git"},"keywords":["pdf","parser","convertor","pdf.js"],"author":{"name":"dunso"},"license":"Apache-2.0","bugs":{"url":"https://github.com/dunso/pdf-parser/issues"},"homepage":"https://github.com/dunso/pdf-parser#readme","gitHead":"55b7eb979509c5fc1313f3f6c58d1be07258801f","_id":"pdf-parser@1.0.5","_npmVersion":"5.5.1","_nodeVersion":"9.2.0","_npmUser":{"name":"dunso","email":"dunso@dun.so"},"dist":{"integrity":"sha512-57abulap1s4GYqaDVZdbXxA7h4GOGnmYvU8fJlI03VbuQCQnj6nZmMB0Ed1qsRehNPtQiqAjPnJFIWdR5BB9qQ==","shasum":"dd2c5db767837f5bf394a87148589b21f8b74ffa","tarball":"https://registry.npmjs.org/pdf-parser/-/pdf-parser-1.0.5.tgz","fileCount":179,"unpackedSize":6884845,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJbujazCRA9TVsSAnZWagAArksQAJXLpsXUS55KpDjna+8k\n4+AaJXaIRop+2p/r21J0nCqVm4NA+ZaDZ1lP6NvRBpmt6JqSsnPauUXMkv8F\nogk1NammvGrVgaCuZYVE66IE/Oe/zLZIQ9k3KFDNpnzzf4NSJTnW03gNnLY0\n5yP0jK30T5Rhzla5H9Qvei5PXMBvtwAa22ib9dQAbBPhs8xIrQ/9yD/+X/Ot\nSx73ocm20BnrEw2btkJUXXzNUXshq06XlXKNYvl3OI6KempyDdUI0B8L2qbJ\nevQtZtP+g4/FS4fs8i9CMpltn8c8T8arBCV4oHoI2aQS6eJITpZAfeHbhiGh\nLDSgLrz9H9OBC055T7TBPPsDRnprdXdzm2qUY2a1JhQelthJBhQf2S1tQVZ6\nbEMhKsparu6/E7tr9BMJjD+aUtJL+EMlx+FjwUMXwIsmh6SjxCXk5v8w4mT3\n0bOEvfeW44dvCUJCLkZcFcmO4BMcfnqaaw+1HBUeal8lcrbW+KfnHFkoBZOf\nqT8ND0TPcAvvUN/6asOGEGE81OqjMPfUD53xrJA56LFXqkQo7LG+PK4Gaphh\nj8zIPgnqLhm/Ap+VZeR2J8GNb3O+VJ9MV2XTE+z56sZaFjG+USsKSW4ZkDMK\n/iJR39ztYbxCDRb8y7kJS1WHDRiKdrZV0vx5aWlQZ9pdeHLklMB6DuwD2bpW\ny6Mx\r\n=Z+JW\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQD6EuY2u4sQr+35gI2ZoRn5ychq5xYXRJSvbB4gLiLhngIgR4nFqEkK4SSkuE6cVnBlkuKAYYa6TlSjyOK68jMliYE="}]},"maintainers":[{"name":"dunso","email":"dunso@dun.so"}],"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/pdf-parser_1.0.5_1538930354398_0.4057606588514622"},"_hasShrinkwrap":false}},"readme":"# pdf-parser\r\n\r\nThe pdf-parser is a parser of PDF content and layout information with [pdf.js](https://github.com/mozilla/pdf.js).\r\n\r\n## Getting the Code\r\n\r\nTo get a local copy of the current code, clone it using git:\r\n\r\n    $ git clone https://github.com/dunso/pdf-parser.git\r\n    $ cd pdf-parser\r\n\r\nNext, install Node.js via the [official package](http://nodejs.org) or via\r\n[nvm](https://github.com/creationix/nvm).\r\n\r\ninstall all dependencies for pdf-parser:\r\n\r\n    $ npm install\r\n\r\n## Example\r\n\r\nThe example is in the file example/node/pdf2json.js.\r\n\r\nIf you are in the root directory, you can use `node example/node/pdf2json` to run the example.\r\n\r\nOr you can `cd example/node` and then `node pdf2json`.\r\n\r\n## Usage\r\n\r\n```\r\nvar pdfParser = require('pdf-parser');\r\n\r\nvar PDF_PATH = 'test.pdf';\r\n\r\npdfParser.pdf2json(PDF_PATH, function (error, pdf) {\r\n    if(error != null){\r\n        console.log(error);\r\n    }else{\r\n        console.log(JSON.stringify(pdf));\r\n    }\r\n});\r\n```\r\n\r\nThe tool can convert pdf to json as bellow:\r\n\r\n```\r\n{\r\n    \"pages\":[\r\n        {\r\n            \"width\":612,\r\n            \"height\":792,\r\n            \"pageId\":0,\r\n            \"texts\":[\r\n                {\r\n                    \"text\":\"Hello World\",\r\n                    \"direction\":\"ltr\",              //from left to right\r\n                    \"width\":52.81644000000001,\r\n                    \"height\":27.96,\r\n                    \"top\":278.69,\r\n                    \"left\":296.81,\r\n                    \"transform\":[27.96,0,0,27.96,296.81,278.69],\r\n                    \"fontSize\":27.96,\r\n                    \"fontName\":\"Times\",\r\n                    \"fontOriginName\":\"TimesNewRomanPSMT\",\r\n                    \"bold\":false,\r\n                    \"italic\":false,\r\n                    \"black\":false,\r\n                    \"color\":\"[68,113,196]\"\r\n                }\r\n            ]\r\n        }\r\n    ]\r\n}\r\n\r\n```\r\n\r\n## Java Usage\r\n\r\nThe usage of how to call the pdf-parser in java : [java-pdf-parser](https://github.com/dunso/java-pdf-parser)\r\n\r\n## Questions\r\n\r\nFile an issue:\r\n\r\n+ https://github.com/dunso/pdf-parser/issues/new\r\n","maintainers":[{"name":"dunso","email":"dunso@dun.so"}],"time":{"modified":"2022-06-23T16:34:39.801Z","created":"2017-11-26T17:43:59.292Z","1.0.0":"2017-11-26T17:43:59.292Z","1.0.1":"2017-11-26T20:09:11.817Z","1.0.2":"2017-11-26T20:39:02.432Z","1.0.3":"2017-12-09T12:01:45.843Z","1.0.4":"2018-04-03T18:40:32.375Z","1.0.5":"2018-10-07T16:39:14.585Z"},"homepage":"https://github.com/dunso/pdf-parser#readme","keywords":["pdf","parser","convertor","pdf.js"],"repository":{"type":"git","url":"git+https://github.com/dunso/pdf-parser.git"},"author":{"name":"dunso"},"bugs":{"url":"https://github.com/dunso/pdf-parser/issues"},"license":"Apache-2.0","readmeFilename":"README.md","users":{"dunso":true}}