
linkingoscar/dsh-attachment-formats
31Last commit Aug 15, 2026
dsh-attachment-formats DSH plugin
This plugin extends the DeepSeek Harness composer to support a wide range of attachment formats including PDF, Office documents, TIFF, epub, and more. It uses document cards to keep the input area clean, and for long documents it spills content into a workspace index-card mode, allowing the model to read page-by-page without silent truncation.
How to install the dsh-attachment-formats DSH plugin
dsh plugin --profile web add github:linkingoscar/dsh-attachment-formatsCopying does not run this command. Review the repository and version before installing the dsh-attachment-formats DSH plugin.
dsh-attachment-formats DSH plugin data source
dsh-attachment-formats DSH plugin snapshot date: Aug 16, 2026
discovered
What the dsh-attachment-formats DSH plugin can do
- Supports PDF (text layer extraction via pymupdf4llm or pdfjs, scanned PDF OCR via tesseract.js, Baidu OCR, or VLM)
- Supports Office formats: .docx, .xlsx, .pptx, and legacy .doc, .xls, .ppt (via LibreOffice)
- Supports ebook formats: epub, odt, rtf (via pandoc or fallback)
- Converts TIFF images to PNG pages (multi-page, up to 20 pages)
- Reads text files (txt, md, json, code) with UTF-8/GB18030 fallback
- Converts BMP, ICO, AVIF, SVG etc. to PNG via browser canvas
- Document cards: mounts content above the composer, merges on send with provenance markers
- Long document index-card mode: spills content to workspace, model reads via read tool
- Adaptive merge limit based on context pressure
- /attach slash commands: list, full (merge full text)
- Paperclip button, drag & drop, paste support
- External doc server and Baidu/VLM OCR integration
Where the dsh-attachment-formats DSH plugin fits
- Upload a PDF with text layer and have its content merged into the conversation as a document card
- Process a scanned PDF with OCR and get the extracted text into the model context
- Drag and drop a .docx file with tables, preserving table structure as Markdown pipe tables
- Handle long PDFs (over 80k characters) with index-card mode, allowing the model to read page by page
- Use Baidu OCR or a remote VLM to improve OCR accuracy on scanned documents
- Convert a TIFF multi-page image to PNG pages for image draft rail
Who the dsh-attachment-formats DSH plugin is for
- DeepSeek Harness users who need to attach and process PDF, Office, and other document formats in conversations
- Users who work with long documents and want to avoid context truncation via index-card mode
dsh-attachment-formats DSH plugin limitations
- Legacy Office formats (.doc/.xls/.ppt) require LibreOffice headless (soffice) installed on the host
- epub, odt, rtf require pandoc for best results; without pandoc, epub/odt fall back to in-process extraction, rtf is not supported
- Scanned PDF OCR confidence below 45 falls back to page images; external OCR (Baidu, VLM) requires API keys or endpoints
- TIFF support limited to 20 pages per file
- Text files larger than 16MB are rejected; zero-copy only works for files between 512KB and 16MB in the workspace
- PDF text extraction via pymupdf4llm is limited to 40 pages; larger PDFs use the faster pdfjs engine
- First use of tesseract.js downloads ~24MB language data
dsh-attachment-formats DSH plugin: from the repository README
Quoted from the linkingoscar/dsh-attachment-formats README, the upstream source of the dsh-attachment-formats DSH plugin. Copyright remains with the original authors.
English | [中文](README.zh.md) A [DeepSeek Harness](https://github.com/deepseek-ai/deepseek-harness) web plugin that makes the composer accept many more attachment formats, Codex-style. Zero core-package changes: a pure plugin that reuses the harness-native image draft rail, upload limits, history rendering and model request pipeline. ## Supported formats | File | Handling | Destination | | --- | --- | --- | | PNG / JPEG / WebP / GIF | native pipeline (plugin not involved) | image draft rail (native) | | **PDF (with text layer)** | text-layer extraction (≤40 pages via the pymupdf4llm high-fidelity engine; larger/unavailable falls back to pdfjs) | full text on a **document card** (merged on send); over-limit → workspace spill + index card | | **PDF (scanned / no text layer)** | tesseract.js OCR (accepted only at confidence ≥45), falls back to page images | OCR success → text channel; failure → image draft rail (vision models only) | | **Word (.docx) / Excel (.xlsx) / PPT (.pptx)** | text extraction — docx via mammoth HTML → turndown, **tables kept as Markdown pipe tables** | document card (merged on send); over-limit → spill + index card | | **Legacy .doc / .xls / .ppt** | LibreOff
Read the full READMERepository license: Apache-2.0
dsh-attachment-formats DSH plugin questions
How do I install dsh-attachment-formats?
The plugin is a standard DSH web plugin. You can install it by adding the plugin repository URL to your DeepSeek Harness plugin manager. The README does not provide exact installation commands, but typically you would use the host's plugin management interface to add this plugin from its GitHub source.
Does this plugin support scanning PDFs with no text layer?
Yes, it supports scanned PDFs through OCR. It uses tesseract.js by default, and can also integrate with Baidu OCR API or a remote VLM (OpenAI-compatible vision endpoint). If OCR confidence is below 45, it falls back to sending page images as image draft to the vision model.
Can I attach a very long document without losing content?
Yes, the plugin has an index-card mode for long documents (over 80k characters). Instead of stuffing the full text into the message, it spills the content into the workspace and sends a short index card. The model can then read pages using the native read tool, so no content is silently truncated.
What formats are supported besides PDF and Office?
The plugin supports PDF, DOCX, XLSX, PPTX, legacy Office formats (via LibreOffice), TIFF, EPUB, ODT, RTF, plain text files (txt, md, json, code), and many image formats (BMP, ICO, AVIF, SVG, etc.). It also handles native image formats (PNG, JPEG, WebP, GIF) via the built-in pipeline.
Do I need to install any external tools to use this plugin?
Some features require external tools. For legacy Office formats, you need LibreOffice headless (soffice). For best results with epub/odt/rtf, pandoc is recommended. The plugin will show clear error messages when these tools are missing. For OCR, tesseract.js works out of the box but downloads data on first use; Baidu OCR requires API keys.