DocQuill

Professional DOCX document processing library with AI-ready JSON export, PDF/HTML rendering, and round-trip editing.
Features
- 📄 Full DOCX Parsing - Headers, footers, tables, images, styles, numbering
- 🔄 Round-trip Editing - DOCX → HTML → DOCX with formatting preservation
- 📊 AI-Ready JSON Export - Structured layout data for ML/NLP workflows
- 🖨️ PDF Rendering - Python (ReportLab) or high-performance Rust backend
- 🎨 HTML Export - Static or editable HTML output
- 📝 Placeholder Engine - 20+ placeholder types for document automation
- 🔀 Document Merging - Combine documents with OPC relationship handling
Installation
pip install docquill
For high-performance PDF rendering with Rust:
pip install docquill[rust]
Quick Start
from docquill import Document
doc = Document.open("document.docx")
doc.to_pdf("output.pdf")
doc.to_html("output.html")
layout = doc.pipeline()
json_data = layout.to_json()
doc.fill_placeholders({
"company_name": "Acme Corp",
"date": "2024-01-15"
})
doc.save("filled.docx")
Documentation
See the full documentation for:
License
Apache License 2.0