PDF Card MCP

How a dense PDF becomes a readable card reader

The tool keeps the PDF local, renders visual material as images, extracts body text into cards, and then removes text that already belongs inside a table, figure, or formula crop.

1

Open PDF

pypdfium2 renders pages while pdfplumber reads text, captions, tables, and coordinates for comparison.

2

Render Pages

Each source page becomes an embedded PNG for the source-page modal.

3

Find Assets

Captions, table boxes, embedded images, vector regions, and display equations become image crops.

4

Suppress Overlap

Text blocks inside asset regions are removed from body cards so diagram labels do not duplicate.

5

Merge Text

Nearby body blocks are joined before splitting into digestible cards.

6

Write HTML

The reader is one standalone file with embedded images, search, navigation, and font-size controls.

Where quality goes wrong

PDFs do not expose clean article structure. A visual chart may be stored as vector lines plus many tiny text blocks, while a table may not expose a reliable table box.

Fallback crop can grab nearby prose

What the reader tries to do

Keep tables, figures, and formulas visible as images, but use geometry to avoid duplicating their internal labels as separate cards.

FigureFigure card

One crop with caption and source-page link.

FormulaFormula card

One tight equation crop so math layout stays faithful.

Body card

Only prose outside the asset crop region.

Best case

The PDF has a text layer, good captions, and detectable table boxes. Crops are tight and cards read cleanly.

Hard case

The PDF has vector diagrams, multi-column flow, or table text without borders. The converter has to infer boundaries.

User control

The generated reader includes a font-size slider, source-page modal, and standalone embedded assets.