概览
@zhtx2026/dsh-pdf
DSH PDF 解析插件: 为 agent 提供 pdf_info / pdf_extract_text / pdf_render_page 三个工具。基于 pdfjs-dist + @napi-rs/canvas; 对未内嵌字体的 PDF (如嘉立创EDA导出) 自动改用系统字体渲染文字。热插拔 — 通过 cordis.patch.yml + profile node_modules 软链接挂载, 无需改动 dsh 源码。
README / ZH
插件文档
目录摘要
DSH PDF 解析插件: 为 agent 提供 pdf_info / pdf_extract_text / pdf_render_page 三个工具。基于 pdfjs-dist + @napi-rs/canvas; 对未内嵌字体的 PDF (如嘉立创EDA导出) 自动改用系统字体渲染文字。热插拔 — 通过 cordis.patch.yml + profile node_modules 软链接挂载, 无需改动 dsh 源码。
dsh.pub 核对固定版本的组合包契约、运行时事实与分发语义;完整 README 请查看源仓库。
在 GitHub 阅读完整 READMELIMITATIONS
已知限制
- Scanned/image-only PDFs have no text layer — extraction returns nothing (rendering still works, as a plain image). - The sysfont renderer assumes `Type0` CID codes equal Unicode code points (true for `UniGB-UCS2-H` exports); exotic CID fonts fall back to pdfjs. - Large PDFs are parsed fully into memory.
