Use ronnywang/pdf-table-extractor CLI to extract CSV files
✓ Published0🌍 Public
VVioletVivirand
Last edited Jun 16, 2017
Created on Jun 16, 2017
This example demonstrates how to extract tabular data from PDF files into JSON using the ronnywang/pdf-table-extractor command-line tool. It shows a shell-based workflow that clones the pdf-table-extractor repository alongside Mozilla’s pdf.js library, builds pdf.js with gulp, and then runs the `parse-cmd.js` script to convert a specified PDF input into structured JSON output. The code relies on Node.js, npm, gulp, and the pdf.js rendering engine to parse table cells, making the extracted data available for further processing or visualization.
AI-generated descriptionPrerequisities
- Install npm
- install gulp with
npm install gulp-cli -g
Step by step
$ git clone https://github.com/ronnywang/pdf-table-extractor
$ git clone https://github.com/mozilla/pdf.js
$ cd ./pdf.js/
$ gulp dist-install
$ cd ..
$ node parse-cmd.js <input filename> > <output filename>.json