dsh-pdf-translate
Run the following command in DeepSeek Harness:
dsh plugin install l2685209197/dsh-pdf-translate
Paste the following prompt into your AI chat to install this plugin:
Run dsh plugin install l2685209197/dsh-pdf-translate in the DeepSeek Harness terminal to install this plugin; full source code is available at https://github.com/l2685209197/dsh-pdf-translate
About this plugin
Translating a PDF while preserving its layout, font sizes, colors, images, and clickable links sounds straightforward, yet most tools either leave the source text searchable underneath white patches, scatter the original formatting beyond recognition, or force a full restart whenever a network hiccup kills a mid-flight translation. dsh-pdf-translate closes exactly that gap for text-based PDFs that must read naturally in the target language and still look as if they were typeset in that language from the start.
Under the hood the pipeline works in three stages. First, column detection and line-merging rules split each page into semantic paragraphs. Next, every paragraph is sent to the user-configured DeepSeek endpoint or any other OpenAI-compatible API. Finally, a two-phase reconstruction guarantees correctness: a single PyMuPDF redaction pass removes all source characters from the PDF layer (true deletion, not a cover-up), and a second pass writes the translation back at the original anchors. Images, vector graphics, and code blocks pass through untouched. A hash of paragraph text plus language pair drives a resumable translation cache, so an interrupted run only fetches the missing segments. A term base in JSON or TXT format lets translators lock proper nouns against auto-translation. Each job caps at 50 pages so large books can be processed in consecutive segments. The API key lives under a secret role, never appears in session logs, and the settings card renders in both Chinese and English, following the global language setting of the DSH desktop app.
It suits users who run on their own API quota and regularly translate technical manuals, research papers, contracts, or product documentation, as well as localization teams in regulated domains where terminology consistency is non-negotiable. The source PDF must carry a text layer; scanned pages that require OCR are outside the current scope.
Use Cases
- Translate a technical manual while keeping the original layout, images, and hyperlinks intact.
- Batch-process contracts with locked proper nouns to prevent auto-translation of brand names.
- Resume an interrupted run by fetching only missing paragraphs instead of restarting from scratch.
Best For
- Translators and localization teams running on their own API quota.
- Practitioners who regularly process technical docs, papers, and contracts.
- Users in regulated industries where terminology consistency is non-negotiable.
Related Plugins
A unified suite combining hot runtime injection, task-aware thinking-mode routing, and a graded session protocol with red-team gates to sustain model diligence across long-horizon inference.
ModLens is a vision plugin for DeepSeek Harness that gives text-only models sight by reading images pasted directly into chat, with zero-config setup and multiple vision engines.
On-demand vision for text-only DeepSeek Harness agents: built-in free keyless vision chain and 14 vision tools, routing image turns as tool calls to vision models with pixel fidelity, no Python needed, one-command install.
Give text-only models in DeepSeek Harness eyes, enabling image Q&A, long-screenshot OCR, UI restoration, and GUI visual tasks.