pdf-to-llm

Extract structured data from PDFs into JSON, JSONL, or Markdown.

Updated Feb 5, 2026
One-click install
npx skills add https://github.com/rondoallaturka/chart-skills --skill pdf-to-llm
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pdf-to-llm
Source: https://github.com/rondoallaturka/chart-skills/tree/main/skills/shared/pdf-to-llm
Command: npx skills add https://github.com/rondoallaturka/chart-skills --skill pdf-to-llm

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill requires pdftotext, anthropic, and includes scripts (resource) components.

What problem does it solve?

This Skill automates extracting and structuring data from PDF documents to feed large language models, reducing manual effort and improving data fidelity.

Core Features & Use Cases

  • Document metadata extraction: Pulls title, author, date or date range, and entity information.
  • Structure-aware parsing: Detects sections, headings, and preserves table structures with headers and rows.
  • Multiple output formats: Produces JSON, JSONL, or Markdown for downstream processing.
  • Use Case: Process a batch of invoices to generate a consolidated JSON feed with line items and totals.

Quick Start

  • Run the basic extraction (no API key required): python scripts/pdf_to_llm.py --file your-document.pdf --mode basic --output result.json
  • For LLM-powered extraction (requires ANTHROPIC_API_KEY): export ANTHROPIC_API_KEY=your-key python scripts/pdf_to_llm.py --file your-document.pdf --mode llm --output result.json
  • Process specific pages: python scripts/pdf_to_llm.py --file your-document.pdf --pages "1,2,10-15" --output sample.json

Frequently Asked Questions about pdf-to-llm

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I extract structured data from PDFs for LLM processing?

To extract structured data from PDFs for LLM processing, run the Python script on your document to detect sections, headings, and tables, outputting JSON, JSONL, or Markdown formats for downstream models.

Do I need an Anthropic API key to parse PDF documents into Markdown?

No, you do not need an Anthropic API key to parse PDFs into Markdown or JSON. Basic extraction runs without it, but providing the key enables LLM-powered extraction for enhanced structuring.

Can I extract data from specific page ranges in a PDF?

Yes, you can extract data from specific page ranges in a PDF by passing the pages argument, allowing you to target exact sections like pages 1, 2, or 10 through 15 for focused output.

What is the best way to convert PDF invoices into JSON line items?

The best way to convert PDF invoices into JSON line items is using structure-aware parsing that preserves table headers and rows, generating a consolidated JSON feed with totals and entity information.

Does this Python PDF extraction tool preserve document tables and metadata?

Yes, this Python PDF extraction tool preserves document tables and metadata by detecting sections and headings, pulling title, author, date ranges, and entity information while maintaining table structures.

What output formats can I generate when converting PDFs for large language models?

You can generate JSON, JSONL, or Markdown output formats when converting PDFs for large language models, ensuring compatibility with various downstream processing pipelines and data feeds.