zhtx2024/dsh-pdf

PDF parsing tools for DSH: pdf_info, pdf_extract_text, and pdf_render_page with dual pdfjs and built-in rendering engines, including system-font rendering for PDFs with non-embedded CJK fonts.

A PDF parsing toolkit for DeepSeek Harness exposing three agent-facing tools — pdf_info (page count, page sizes in points, metadata, font list with per-font embedded flags), pdf_extract_text (per-page text with optional page and withPosition for per-line x/y coordinates and font size) and pdf_render_page (renders one page to PNG with configurable scale/outDir). Its two-engine design (pdfjs when all fonts are embedded, plus a built-in sysfont renderer) is aimed at PDFs pdfjs cannot render because their fonts are not embedded and lack a ToUnicode map — the README's example being JLC EDA / EasyEDA schematic exports with SimSun/SimHei Type0 fonts, where system-font rendering recovers CJK text and glyphs.

Tools & Capabilities ★ 0 updated 2026-08-20
View on GitHub ↗

Install

dsh plugin --profile web add @zhtx2026/dsh-pdf

README Install block quoted verbatim; a local-checkout form dsh plugin --profile web add link:<path-to-repo> is also documented. Registry-verified live 2026-09-16: @zhtx2026/dsh-pdf latest 0.1.1 with repository field github.com/zhtx2024/dsh-pdf — note the npm scope (zhtx2026) differs from the GitHub owner (zhtx2024). After install, restart DSH or open a new session.

Compatibility

README: a cordis plugin (lib/index.js) that registers three native tool objects with plain JSON-Schema parameters/output, so it needs no @deepseek-ai/dsh-tools dependency, and injects an agent guidance block via systemPrompt.section. Documented limitations: scanned/image-only PDFs have no text layer, so extraction returns nothing (rendering still works); the sysfont renderer assumes Type0 CID codes equal Unicode code points (true for UniGB-UCS2-H exports); large PDFs are parsed fully into memory.

Details

Recent updates

The README documents the three tools, the two-engine design and the limitations rather than a release-by-release table; the latest version on the registry when checked on 2026-09-16 was 0.1.1.

FAQ

How do I install it?
The README's command is dsh plugin --profile web add @zhtx2026/dsh-pdf, with a link:<path-to-repo> form for a local checkout; then restart DSH or open a new session.
Why does it bundle its own renderer?
The README explains pdfjs-dist cannot render PDFs whose fonts are not embedded and lack a ToUnicode map (e.g. JLC EDA / EasyEDA schematic exports), so dsh-pdf adds a sysfont engine that draws text with system fonts.
Can it read scanned PDFs?
The README's limitations say scanned/image-only PDFs have no text layer, so extraction returns nothing, though rendering still works as a plain image.

More plugins in Tools & Capabilities

Browse more in Tools & Capabilities

Guides for Tools & Capabilities plugins