DEV Community

Bobo
Bobo

Posted on

Extract Text from 100 PDFs in One Command with pdf-toolkit

Extract Text from 100 PDFs in One Command with pdf-toolkit

Need to extract text from multiple PDFs? Here's how.

Single PDF

pdf-toolkit-pro extract report.pdf --output report.txt
Enter fullscreen mode Exit fullscreen mode

Batch Processing

# Extract all PDFs in folder
pdf-toolkit-pro extract ./invoices/ --output ./text/

# Merge all into one file
pdf-toolkit-pro extract ./docs/ --merge -o all_docs.txt

# Extract specific pages
pdf-toolkit-pro extract manual.pdf --pages 1-10,25,30-40
Enter fullscreen mode Exit fullscreen mode

Real Use Case

# 237 PDF invoices -> single CSV
pdf-toolkit-pro extract ./invoices/ --format csv -o invoice_data.csv
# Processed 237 files in 12 seconds
Enter fullscreen mode Exit fullscreen mode
npm install -g pdf-toolkit-pro
Enter fullscreen mode Exit fullscreen mode

Visit us | Get free DigitalOcean credit | CLI Toolkit Pro $9.99

Top comments (0)