Extract structured data from PDF documents using OCR and pattern matching.
Prerequisites
Chrome browser installed
PDF file accessible locally or via URL
Instructions
Open Chrome and navigate to the PDF file:
If local file: use file:///path/to/document.pdf
If URL: navigate directly to the PDF URL
Wait for the PDF to fully load in Chrome's PDF viewer:
Confirm the page count is visible
Confirm text is selectable (if not scanned)
Use Chrome DevTools to extract text content:
Press F12 to open DevTools
Go to Console tab
For each page, extract visible text
For scanned PDFs without selectable text:
Take a screenshot of each page
Use OCR to extract text from screenshots
Clean up OCR results for accuracy
Parse extracted text for structured data:
Look for key-value patterns (e.g., "Name: John Doe")
Identify tables by detecting aligned columns
Extract dates, amounts, and other formatted data
Output the extracted data in requested format:
JSON for structured data
CSV for tabular data
Plain text for unstructured content
Error Handling
If PDF is password protected, inform user and request password
If OCR quality is poor, suggest higher resolution scan
If PDF has complex layouts, process page by page manually
Notes
Works best with text-based PDFs
Scanned documents require OCR and may have lower accuracy
For invoices and receipts, consider the invoice-parser skill
1---2name: pdf-data-extractor3description: PDF Data Extractor4---5# PDF Data Extractor67Extract structured data from PDF documents using OCR and pattern matching.89## Prerequisites1011- Chrome browser installed12- PDF file accessible locally or via URL1314## Instructions15161. Open Chrome and navigate to the PDF file:17 - If local file: use `file:///path/to/document.pdf`18 - If URL: navigate directly to the PDF URL19202. Wait for the PDF to fully load in Chrome's PDF viewer:21 - Confirm the page count is visible22 - Confirm text is selectable (if not scanned)23243. Use Chrome DevTools to extract text content:25 - Press F12 to open DevTools26 - Go to Console tab27 - For each page, extract visible text28294. For scanned PDFs without selectable text:30 - Take a screenshot of each page31 - Use OCR to extract text from screenshots32 - Clean up OCR results for accuracy33345. Parse extracted text for structured data:35 - Look for key-value patterns (e.g., "Name: John Doe")36 - Identify tables by detecting aligned columns37 - Extract dates, amounts, and other formatted data38396. Output the extracted data in requested format:40 - JSON for structured data41 - CSV for tabular data42 - Plain text for unstructured content4344## Error Handling4546- If PDF is password protected, inform user and request password47- If OCR quality is poor, suggest higher resolution scan48- If PDF has complex layouts, process page by page manually4950## Notes5152- Works best with text-based PDFs53- Scanned documents require OCR and may have lower accuracy54- For invoices and receipts, consider the `invoice-parser` skill
Run npx skillmds@latest add mediar-ai/pdf-data-extractor in your terminal (requires Node.js), paste this page's agent-chat prompt into Claude, Cursor, or any MCP-connected agent, or download the SKILL.md file and copy it into your agent's skills directory.
PDF Data Extractor It is listed under Docs & Writing on SkillMD.
This skill has not completed SkillMD's automated safety review yet. SkillMD never runs a skill's scripts for you; review the SKILL.md before installing.
This skill is tagged as working with Claude Code, Claude.ai, OpenAI Codex. SKILL.md is an open format, so most agents that read a skills directory can load it too.
Yes. Installing skills from SkillMD is free, and the skill stays under its author's original license.
mediar-ai (@mediar-ai) published this skill. Their other Agent Skills are listed on their SkillMD profile.