Skip to content

sunshine-lang/dsh-pdf

41Last commit Aug 14, 2026

dsh-pdf DSH plugin

dsh-pdf is a DeepSeek Harness plugin that provides the pdf_read tool for extracting text from PDF files. It operates locally using PDF.js, so no internet or API key is needed. It supports selective page ranges, built-in boundary controls, and integrates with the harness file system.

How to install the dsh-pdf DSH plugin

dsh plugin --profile web add "github:sunshine-lang/dsh-pdf

Copying does not run this command. Review the repository and version before installing the dsh-pdf DSH plugin.

dsh-pdf DSH plugin data source

dsh-pdf DSH plugin snapshot date: Aug 16, 2026

discovered

What the dsh-pdf DSH plugin can do

  • Extract text from PDF pages with page number markers
  • Select specific page ranges using formats like "1-3,5" or "all"
  • Retrieve document metadata (title) and total page count
  • Built-in limits for file size, pages per call, and characters per call with clear truncation behavior
  • Reads via harness file system (ctx.fs) respecting deployment sandbox policies

Where the dsh-pdf DSH plugin fits

  • Summarize the first few pages of a PDF document
  • Extract specific content from a contract or report by page number
  • Process large PDFs by reading in chunks
  • Automate document analysis in a chat interface without needing an external API

Who the dsh-pdf DSH plugin is for

  • Developers who use DeepSeek Harness and need PDF reading capabilities
  • Users who want to interact with PDF content via a chat interface without uploading to external services

dsh-pdf DSH plugin limitations

  • Only supports text extraction; no image or table extraction
  • Maximum file size defaults to 20 MiB (configurable up to 50 MiB)
  • Maximum 500 pages per call (configurable)
  • Requires DeepSeek Harness environment to function

dsh-pdf DSH plugin: from the repository README

Quoted from the sunshine-lang/dsh-pdf README, the upstream source of the dsh-pdf DSH plugin. Copyright remains with the original authors.

- `pdf_read` 工具:逐页提取文本,带页码标记。 - 页码选择:`"1-3,5"` 或 `"all"`——大文档可分块读取。 - 文档元数据(标题)与总页数。 - 内置边界控制:文件字节上限、单次解析页数上限、单次调用字符上限——截断行为明确,并提示模型如何继续。 - 通过 harness 文件系统接缝(`ctx.fs`)读取,部署的权限与沙箱策略自动生效。 ## 安装 ### 从 GitHub 安装 ```sh dsh plugin --profile web add "github:sunshine-lang/dsh-pdf" ``` 然后重启 `dsh --profile web`。`lib/` 已预构建并提交,安装无需构建权限。 ### 从 npm 安装 ```sh dsh plugin --profile web add dsh-pdf ``` ### 从本地源码安装(开发) ```sh dsh plugin --profile web add ./dsh-pdf ``` > 注意:pnpm 对 `link:` 方式的本地依赖不会自动安装其依赖,需要手动添加到 profile(通过 registry 或 GitHub 安装则会自动处理): > > ```sh > dsh plugin --profile web add @deepseek-ai/dsh-tools @deepseek-ai/cordis @deepseek-ai/schemastery pdfjs-dist > ``` ## 使用方法 启动 Web UI 后,向模型提问,例如: > 读取 `paper.pdf` 的前 3 页并总结。 > > `contract.pdf` 第 7 页写了什么? 模型会调用 `pdf_read`:参数 `path`(必填),可选 `pages`(`"1-3,5"` 或 `"all"`)。输出达到上限时会在页边界截断并给出提示,模型会用页码范围继续读取。 ## 配置 可通过 `cordis.patch.yml` 或 profile 的 patch 层覆盖任意配置项: ```yaml - patch: - id: dsh-pdf config: maxFileBytes: 52428800 maxPages: 200 maxCharsPerCall: 20000 ``` | 配置项 | 默认值 | 含义 | | --- | --- | --- | | `maxFileBytes` | `20971520`(20 MiB) | 整个 PDF 的字节上限(含);超过直接报错 | | `maxPages` | `500` | 单次调用最多解析的页数;超

Read the full READMERepository license: MIT

dsh-pdf DSH plugin questions

How do I install dsh-pdf?

You can install dsh-pdf via the command 'dsh plugin --profile web add dsh-pdf' or from GitHub using 'dsh plugin --profile web add "github:sunshine-lang/dsh-pdf"'. After installation, restart dsh with 'dsh --profile web'.

Does dsh-pdf need an API key or internet connection?

No, dsh-pdf works entirely locally using PDF.js. It does not require any API key or internet connection. All PDF parsing happens on your machine.

Can I extract text from specific pages only?

Yes, the pdf_read tool supports page selection. You can specify pages like "1-3,5" to read pages 1, 2, 3, and 5, or use "all" to read the entire document. This is useful for large documents.

What are the file size limits for dsh-pdf?

By default, the maximum file size is 20 MiB, but you can configure it via the maxFileBytes setting (up to 50 MiB). There are also limits on pages per call (default 500) and characters per call (default 12000). These limits help prevent resource exhaustion.

How can I configure dsh-pdf settings?

You can override configuration options like maxFileBytes, maxPages, and maxCharsPerCall by using the cordis.patch.yml file or the profile's patch layer. For example, add a patch section with the plugin id 'dsh-pdf' and your desired config values.