zhtx2024/dsh-pdf
zhtx2024★ 1JavaScript最后同步: 2026-08-16
PDF parsing toolkit for DeepSeek Harness: pdf_info, pdf_extract_text, pdf_render_page with hybrid pdfjs/built-in engines and system-font rendering for non-embedded CJK PDFs.
README 摘要
dsh-pdf PDF parsing toolkit for DeepSeek Harness — three agent-facing tools ( pdf info / pdf extract text / pdf render page ) with hybrid engines, including system-font rendering for PDFs with non-embedded CJK fonts (e.g. EasyEDA / JLC EDA schematic exports). English 中文 Tags: dsh-plugin · pdf · pdfjs · canvas · schematic · tools Install Or from a local checkout during development: Then restart DSH (or open a new session) — the three tools and an agent guidance block become available. Tools Tool What it does pdf info Page count, page sizes (pt), document metadata, and the font list with per-font embedded flags. pdf extract text Extracts text per page; optional page and withPosition (per-line x/y coordinates + font size). pdf render page Renders one page to a PNG (local file) with configurable scale / outDir ; engine auto-selection. Why a custom renderer? pdfjs-dist cannot render text in PDFs whose fonts are not embedded and lack a ToUnicode map — the classic case is JLC EDA / EasyEDA schematic exports (SimSun/SimHei Type0 fonts with UniGB-UCS2-H encoding): pdfjs emits translateFont failed and drops the glyphs. dsh-pdf solves this with a two-engine design: - pdfjs engine — used when …
在 GitHub 查看完整 README →