Stirling Office Convert 0.3.0
New conversions
- PDF to PDF/A-4, plus PDF/A font, ToUnicode, colour-space and structure-tree fixes for parts 1–3
- PDF to Markdown, HTML (fixed layout, with embedded web fonts), JSON, EPUB and Kindle AZW3
- HTML, JSON, EPUB, MOBI, AZW3 and FB2 to PDF; HTML pages from ZIPs; HTML form controls become fillable PDF fields
- Visio 2003–2010 drawings from their page preview; password-protected OpenDocument files
- New modules:
stirling-office-convert-optimize (bounded lossless PDF optimization and cross-reference repair) and stirling-office-convert-lineart (PDF line-art conversion with bilevel codecs)
- Scanned-photo splitting into separate cropped pictures
- PDF font conversion, missing-font embedding and Brotli stream support
Fidelity
- HTML to PDF: flex, grid, floats, columns, absolute/fixed boxes, transforms, SVG text, gradients, RTL, widows/orphans,
@page margin boxes and running headers
- Office to PDF: charts closer to LibreOffice (ODF, legacy XLS, radar), list numbering, SmartArt text, ODS paper and row sizing, RTF footnotes, Word freeforms, legacy PPT gradients and shapes
- PDF to Office: native slide gradients and lines, less common fonts embedded in ODT/DOCX, better justification, superscripts and running headers
- PDF bookmarks from headings, slides and sheets
- Smaller CLI jar (ProGuard) and faster legacy slide drawing, JPEG encoding and photo splitting
Safety and limits (for servers converting untrusted files)
- One JVM-wide memory gate for every conversion, now configurable:
memoryBudgetPercent, maxConcurrent, maxWaitSeconds (600) and refuseOversize, by system property or Admission.configure(...)
Admission.status() reports budget, memory in use, running, slots and stuck workers; new Admission.Busy and Admission.TooLarge refusals
- Fixed a self-deadlock when a conversion took a nested memory ticket (PDF to EPUB covers)
- Every page render has an operator, form, image, annotation and Type3 budget, checks for interrupts and turns stack overflows and out-of-memory into normal errors
- Image memory is charged at what PDFBox really allocates; oversized images are drawn subsampled instead of dropped
- Caps on DOCX body size, XML parts, slide shapes, path points, CSS rules and selector work; nested rotated table cells no longer take exponential time
- PDF to Office now times out after 5 minutes by default; the CLI's
--timeout covers every direction
- Fixed regex denial-of-service in PDF/A metadata, page links and CMap parsing
- Every limit is documented in docs/limits.md
Behaviour changes
OfficeConvert.Settings.defaults() has a 5-minute timeout (was none)
- PDF/A flattening fails instead of writing a partial page when a page exceeds its render budget
- Photo splitting refuses PDFs over 1,000 pages
- Very long DOCX bodies and HTML with very heavy CSS are cut off with a warning
Admission.Busy and Admission.TooLarge extend InterruptedIOException; check for them before treating it as a cancellation
implementation("com.stirling:stirling-office-convert:0.3.0")
implementation("com.stirling:stirling-office-convert-topdf:0.3.0")
implementation("com.stirling:stirling-office-convert-pdfa:0.3.0")