If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.
This add-on enhances the PI Coding Agent inside the ddev-pi DDEV add-on with deterministic document conversion and visual page verification capabilities.
It provisions Pandoc, headless LibreOffice, Poppler utilities, and drop-in Microsoft metric-compatible fonts (Carlito for Calibri, Caladea for Cambria, Liberation for Arial/Times/Courier) at image build time, delivering a sandboxed CLI tool (docconv) accessible inside the Pi sidecar container and from the host via ddev docconv.
ddev add-on get mxr576/ddev-pi-docconv
ddev restart
After installation, make sure to commit the .ddev directory to version control.
You can invoke docconv from your host terminal or within the pi container:
| Command | Description |
|---|---|
ddev docconv --help |
Display CLI usage information and options |
ddev docconv convert <file> |
Convert Markdown/DOCX to DOCX, PDF, and per-page PNG images |
ddev docconv verify <file> --exact-pages <n> |
Verify that a document meets an exact page count budget |
ddev docconv verify <file> --min-pages <n> --max-pages <m> |
Validate page boundary limits |
ddev docconv convert document.md --to docx,pdf,png
ddev docconv convert document.md --reference-doc custom-template.docx
ddev docconv verify CV.md --exact-pages 2 --to-png --json
Output:
{
"status": "success",
"pages": 2,
"target_pages": {
"exact": 2,
"min": null,
"max": null
},
"artifacts": {
"docx": "/var/www/html/CV.docx",
"pdf": "/var/www/html/CV.pdf",
"images": [
"/var/www/html/CV-page-1.png",
"/var/www/html/CV-page-2.png"
]
},
"errors": []
}
The default version tag is defined in docker-compose.pi-docconv.yaml via ${PI_DOCCONV_VERSION:-main}.
To override this version locally on your machine without altering tracked repository files:
.ddev/.env.pi:
PI_DOCCONV_VERSION="custom-override"
ddev restart
All customization options:
| Variable | Default | Description |
|---|---|---|
PI_DOCCONV_VERSION |
main |
Version / git ref of Pi Docconv |
Contributed and maintained by @mxr576
If you find this add-on useful, please star it on GitHub — stars show appreciation and help maintainers know their work matters.