dsh-pdf
在终端中运行以下命令:
dsh plugin install henryxiao709/dsh-pdf
将以下提示词粘贴到 DeepSeek Harness 对话框中:
在 DeepSeek Harness 中执行 dsh plugin install henryxiao709/dsh-pdf 即可安装,完整源码地址为 https://github.com/henryxiao709/dsh-pdf 。
插件介绍
Most DSH agent plugins hit a hard wall when reading PDFs: a 64 KB file cap that rejects real-world documents, and no way to extract text from scanned or image-heavy pages. dsh-pdf removes both constraints in one pass. It lifts the single-file limit to 200 MB by default and pulls the full Unicode text layer through pdfjs-dist, so Chinese, English, and other scripts work out of the box.
The standout feature is its automatic OCR fallback. When a page's text layer falls below a configurable character threshold, the plugin renders that page to an image and runs OCR. On Windows it prefers the built-in WinRT recognizers (Simplified Chinese and English, zero-install, zero-download); in headless or non-Windows environments you can drop tesseract.js trained-data into the expected folder as an alternative. Every page in the result is tagged as text, ocr, or mixed so the agent can gauge confidence. All knobs—OCR engine, render scale, per-page timeout, cache size—are adjustable live from the DSH settings UI, with changes taking effect immediately.
If your workflow involves feeding multi-hundred-page contracts, tens-of-megabytes whitepapers, or handwritten lecture notes to the agent, dsh-pdf is a lightweight, service-free plugin that just works.
截图预览
使用场景
- 读取超过 64 KB 的大型 PDF 合同或白皮书全文
- 识别扫描版讲义、手写笔记等图片为主的页面
- 按需选取指定页码提取中西文混合文本
适合人员
- 需要让 agent 处理长 PDF 文档的 DSH 开发者
- 处理中文扫描件或手写笔记的团队
- 希望零额外服务部署即可获得 OCR 能力的轻量用户
