clip-pdf

Extracts text from local PDFs into Markdown clippings with fidelity flags for an Obsidian wiki.

Updated Jul 16, 2026
One-click install
npx skills add https://github.com/ehartye/wiki-master --skill clip-pdf-ehartye
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: clip-pdf
Source: https://github.com/ehartye/wiki-master/tree/main/skills/clip-pdf
Command: npx skills add https://github.com/ehartye/wiki-master --skill clip-pdf-ehartye

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Saving a PDF into a Markdown-based wiki usually means losing tables, mangling accented characters, or silently storing an opaque binary that cannot be searched or quoted. This Skill converts local or downloaded PDFs into greppable, citable Markdown clippings with explicit fidelity metadata so downstream notes know how much to trust the extraction. ## Core Features & Use Cases - Layout-aware text extraction: Uses pdftotext (Xpdf or Poppler) with automatic detection of reading-order versus tabular layouts, plus manual --mode overrides when the detector misfires. - OCR fallback for scanned PDFs: Rasterizes pages with pdftoppm and recognizes them with Tesseract when no text layer exists, tagging results with extraction: ocr. - Fidelity and provenance tracking: Stamps clippings with fidelity: tabular|degraded, source URL, content hash, and topic, and records declines for thin extractions so they are not retried blindly. - Use Case: During a literature review, clip a two-column academic paper into raw/clippings/, verify the extraction, then hand it to the ingestion workflow to summarize and cross-reference it in the wiki. ## Quick Start Ask the agent to clip a local PDF into the wiki, for example: clip the paper at ~/Downloads/attention.pdf with source URL and topic set to my current research run.

Frequently Asked Questions about clip-pdf

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

FAQPage Schema
How do I convert a PDF to Markdown for Obsidian?▼

Run the clip-pdf.mjs script with the PDF path, an optional source URL, quality tier, and topic. It extracts text with pdftotext and writes a Markdown clipping with frontmatter into raw/clippings/, ready for ingestion into the wiki.

How do I extract text from a scanned PDF without a text layer?▼

The clipper automatically falls back to OCR: it rasterizes pages with pdftoppm and recognizes them with Tesseract. You can force this path with --ocr, and OCR'd clippings are tagged extraction: ocr in frontmatter.

Why does my PDF table extraction lose row pairings?▼

Reading-order mode emits a table column-by-column, detaching keys from values. The clipper detects tabular layouts and uses Xpdf's -table mode to preserve rows; without Xpdf it stamps the clipping extraction: table-flattened and fidelity: degraded instead of silently mispairing rows.

Does pdftotext handle accented characters and UTF-8 correctly?▼

Only when forced: pdftotext defaults to Latin-1 on some builds, which corrupts accents and symbols when decoded as UTF-8. The clipper always passes -enc UTF-8, fixing accented text at the source without needing OCR.

What are the limitations of PDF text extraction for quoting?▼

Math and symbol fonts extract lossily and tables reconstructed from layout may mispair cells, so clippings carry fidelity flags. Degraded clippings should be paraphrased rather than quoted verbatim, and tabular pairings verified against the original PDF.