PDF Structure Extraction
Extract page-linked text from a text PDF and identify pages that need OCR.
Get JSON with page numbers, extracted text and explicit OCR-needed flags.
Free · 4 KB · SKILL.md, instructions and example files. Python 3.10+ and pypdf are required for the included extraction helper.
A worked example
A small example to try before using your own data.
Input
{
"file": "examples/sample.pdf",
"expected_pages": 2
}Expected result
{
"page_count": 2,
"pages": [
{
"page_number": 1,
"text_contains": "Quarterly report",
"needs_ocr": false
},
{
"page_number": 2,
"text_contains": "Appendix",
"needs_ocr": false
}
]
}What to check: Both fixture pages retain their numbers and expected text; a blank/scanned page is flagged rather than silently reported as extracted.
Limits: Text extraction cannot recover arbitrary table semantics or scanned text. Layout and OCR are separate checks; no 90% accuracy claim is made.
Worked example included. Model-specific performance and vendor compatibility have not been benchmarked.
🧠 Why it works
Both fixture pages retain their numbers and expected text; a blank/scanned page is flagged rather than silently reported as extracted.
⚙️ How it works
- Run scripts/extract_pdf.py input.pdf --output extracted.json in a Python environment with pypdf installed.
- Inspect pages[].text alongside the original PDF. Keep page_number on every passage you reuse.
- If a page is flagged needs_ocr, report that limitation; this helper does not install or run OCR.
- Group passages into sections only where headings are visible in the source. Keep uncertain layout and reading order explicit.
- For a table, compare row and column boundaries with the page image before treating extracted text as cells.
Description
Get JSON with page numbers, extracted text and explicit OCR-needed flags.
Python 3.10+ and pypdf are required for the included extraction helper.
Limits: Text extraction cannot recover arbitrary table semantics or scanned text. Layout and OCR are separate checks; no 90% accuracy claim is made.
Recommended Use
Sign in to suggestTools and workflow packs this skill pairs well with. Forge picks are auto-generated from category + capability signals; Community picks are added by people who've used the pairing.
No matches yet. Be the first to suggest a pairing, or the Forge will populate suggestions as signals align.
Report compatibility
Tell the community which tool you used this skill with, and whether it worked.
Suggest a pairing
Recommend a tool or workflow pack that this skill works well with. Up to 5 recommendations per day.