feat(render-mode): Rich (LibreOffice) vs Standard (pandoc) toggle for office formats (.docx/.odt/.rtf); Rich default; 5 office tests; 152/152 green"
Test / Tests (Python 3.12) (push) Canceled after 0s
Test / Tests (Python 3.12) (push) Canceled after 0s
This commit is contained in:
+18
-1
@@ -24,7 +24,7 @@ Everything runs locally (or on your own server); **no file ever leaves your mach
|
||||
| Ebooks | `.epub` | Full CSS / images / metadata fidelity (the original mode) |
|
||||
| Web | `.html` `.htm` | Native WeasyPrint rendering; `<script>` tags stripped |
|
||||
| Markup | `.md` `.markdown` | Headers, tables, fenced code, links |
|
||||
| Office | `.docx` `.odt` `.rtf` | Via pandoc; title from document metadata (DOCX/ODT) or the H1 |
|
||||
| Office | `.docx` `.odt` `.rtf` | Two rendering modes (see §3): **Rich** (default, uses LibreOffice — faithful Word fidelity: fonts, Letter page size, colors, tables) or **Standard** (fast pandoc flatten). Title from document metadata (DOCX/ODT core.xml/meta.xml) or the H1 |
|
||||
| TeX / LaTeX | `.tex` `.latex` | Via pandoc; needs `\documentclass` or a leading `%`, else treated as plain text |
|
||||
| Extended markup | `.org` `.adoc` `.rst` | Org mode, AsciiDoc, reStructuredText via pandoc |
|
||||
| Text | `.txt` `.log` | UTF-8 safe, paginated |
|
||||
@@ -85,6 +85,23 @@ See `COOLIFY.md` in this directory (3 steps: Dockerfile service, port 8030, volu
|
||||
5. Repeat for the next book. Old jobs stay listed so you can re-download
|
||||
recent PDFs (the server keeps the 50 most recent jobs and their outputs).
|
||||
|
||||
### Rendering mode (Rich / Standard)
|
||||
|
||||
For **Office files** (`.docx`, `.odt`, `.rtf`) you can choose how they render.
|
||||
The choice is a radio pair just above the file picker, and **Rich** is
|
||||
selected by default:
|
||||
|
||||
| Mode | Uses | Result |
|
||||
|---|---|---|
|
||||
| **Rich** (default) | LibreOffice headless | Faithful Word fidelity — fonts, page size (Letter vs A4), page colors, and table borders preserved |
|
||||
| **Standard** | Pandoc | Fastest, text-faithful flatten — fonts, page size, and colors may differ from the original |
|
||||
|
||||
The toggle only affects the three Office formats; every other format renders
|
||||
identically regardless of which radio is selected.
|
||||
|
||||
If LibreOffice isn't installed on the server, a **Rich** conversion ends with a
|
||||
clear error message naming it — switch to **Standard** and retry.
|
||||
|
||||
### What can go wrong in the UI
|
||||
| Symptom | Meaning / fix |
|
||||
|---|---|
|
||||
|
||||
Reference in New Issue
Block a user