Skill: PaperLab Source PDF to HTML
Purpose
Convert or plan conversion of source PDFs into clean, searchable HTML for
PaperLab books. Use this when lecture PDFs, public reports, exam PDFs, or
standards excerpts need to be searchable by agents and linked to chapter
figures, captions, and source manifests.
Inputs
- Book directory with
source_manifest.json, or a --source-root folder.
- PDF files from lectures, exercises, exams, public reports, or approved
reference documents.
- Optional OCR output for scanned/image-only PDFs.
Workflow
- Inventory source files with
book-source-inventory.
- Run
python paperflow.py book-source-pdf-html-plan <book_dir> to create a
conversion manifest.
- Convert PDFs using the selected local converter. A robust converter should:
- preserve the source PDF,
- extract text and images,
- fall back to OCR or PyMuPDF when table-heavy PDFs fail,
- write HTML under an
_HTML/ folder next to the source category.
- Feed converted HTML and extracted images into
technical_figure_understanding
and figure_dossier.json.
Output
source_pdf_html_plan.json
source_pdf_html_plan.md
- Converted HTML files and extracted resources when the conversion script is run.
Quality Checks
- Count converted PDFs against the plan.
- Flag PDFs with very low extracted text length for OCR.
- Do not silently drop pages or figures.
- Record source path, output path, page count, text length, image count, and
extraction method when the converter supports it.
Safety Rules
- Never delete or overwrite source PDFs.
- Do not publish converted HTML for non-public or licensed material unless that
is explicitly allowed.
- For standards, extract only metadata or allowed excerpts unless the standard's
license permits broader reproduction.
1---2name: paperlab-source-pdf-to-html3description: Skill: PaperLab Source PDF to HTML4---5# Skill: PaperLab Source PDF to HTML67## Purpose89Convert or plan conversion of source PDFs into clean, searchable HTML for10PaperLab books. Use this when lecture PDFs, public reports, exam PDFs, or11standards excerpts need to be searchable by agents and linked to chapter12figures, captions, and source manifests.1314## Inputs1516- Book directory with `source_manifest.json`, or a `--source-root` folder.17- PDF files from lectures, exercises, exams, public reports, or approved18 reference documents.19- Optional OCR output for scanned/image-only PDFs.2021## Workflow22231. Inventory source files with `book-source-inventory`.242. Run `python paperflow.py book-source-pdf-html-plan <book_dir>` to create a25 conversion manifest.263. Convert PDFs using the selected local converter. A robust converter should:27 - preserve the source PDF,28 - extract text and images,29 - fall back to OCR or PyMuPDF when table-heavy PDFs fail,30 - write HTML under an `_HTML/` folder next to the source category.314. Feed converted HTML and extracted images into `technical_figure_understanding`32 and `figure_dossier.json`.3334## Output3536- `source_pdf_html_plan.json`37- `source_pdf_html_plan.md`38- Converted HTML files and extracted resources when the conversion script is run.3940## Quality Checks4142- Count converted PDFs against the plan.43- Flag PDFs with very low extracted text length for OCR.44- Do not silently drop pages or figures.45- Record source path, output path, page count, text length, image count, and46 extraction method when the converter supports it.4748## Safety Rules4950- Never delete or overwrite source PDFs.51- Do not publish converted HTML for non-public or licensed material unless that52 is explicitly allowed.53- For standards, extract only metadata or allowed excerpts unless the standard's54 license permits broader reproduction.