Parse PDF in Node.js

peter picture peter · Jan 3, 2018 · Viewed 19.8k times · Source

I am using meteor-react for uploading PDF docs to my Node.js backend, where I want to read the uploaded PDF doc, as a json, or whatever. Is it possible? And what library/tool would you recommended for that? Thank you!

Answer

Arash Motamedi picture Arash Motamedi · Jan 3, 2018

There are a couple of Node packages for parsing PDF:

  1. pdf2json: https://www.npmjs.com/package/pdf2json
  2. pdfreader: https://www.npmjs.com/package/pdfreader

Check out their Github and documentation pages. It appears to me that pdf2json is a more complete solution, while pdfreader might be easier to get started with. You'll have to experiment and choose based on your project requirements.