When building agents that require local document processing, heavy dependencies like Microsoft Office or LibreOffice are often necessary. The plugin introduced below solves this problem using a lightweight Rust/Skia engine.
What is this¶
This is a DeepSeek Harness (DSH) plugin that exposes a tool named dxpdf_convert. It uses the dxpdf engine to convert Microsoft Word .docx files to PDF without relying on MS Office, LibreOffice, or network connectivity. The plugin also fixes invalid schema constructs written by WPS Office and restores blank pages inserted by Word at odd/even page breaks.
Core Features¶
- Converts Word .docx to PDF.
- Fixes invalid schema constructs from WPS Office.
- Restores Word’s odd/even page alignment.
- Reduces math equations that the dxpdf engine would discard.
- Exposes the tool
dxpdf_convert.
Prerequisites¶
Before installing and using this plugin, the following environment requirements must be met:
- Node.js >= 22: Used to run the DSH plugin host.
- Python >= 3.8 on PATH: The plugin calls the engine via Python.
- dxpdf engine: Must be installed in the designated Python interpreter.
- lxml: Used for Word peer pagination checks (optional, but recommended).
Installation and Activation¶
This plugin is a DSH bundle. After installation, the dxpdf engine must be installed into the Python interpreter used by the plugin.
1. Install the Plugin¶
Execute the following command in your terminal:
dsh plugin --profile web add bauerelizabeth07139/dsh-plugin-dxpdf
2. Install the Conversion Engine¶
The plugin relies on the dxpdf engine. Please ensure your Python environment has this engine and lxml (for pagination repair) installed:
python -m pip install dxpdf lxml
3. Uninstall (if needed)¶
dsh plugin --profile web remove dsh-plugin-dxpdf
Typical Usage¶
Once installed, DSH will expose the dxpdf_convert tool. This tool supports the following options:
--fraction native|linear: Controls how fractions are processed (default is native).--radical parens|overline: Controls the display style of radicals (default is parens).--scripts unicode|brackets: Controls the representation of script characters within fractions.
If the lxml module is missing, the pagination check will be skipped, and paginationSkipped will be reported.
Use Cases and Notes¶
- Use Cases: Agents that need to convert Word documents to PDF without relying on the network or large office software suites.
- Permission Notes: The plugin runs with the privileges of the current DSH process. You should review the source code and license (MIT) before installation.
Conclusion¶
By introducing a Rust/Skia engine, this plugin provides lightweight document conversion capabilities for DSH, solving the issues of heavy dependencies and high network reliance found in traditional solutions.
- Catalog Page: https://www.skillhub.cn/plugins/bauerelizabeth07139/dsh-plugin-dxpdf
- Source Code: https://github.com/bauerelizabeth07139/dsh-plugin-dxpdf