Skip to content

v0.18.2

Choose a tag to compare

@shps951023 shps951023 released this 19 Mar 10:28
· 87 commits to main since this release

v0.18.1

Highlights

This release significantly improves DOCX header/footer rendering, refines CJK text layout accuracy, adds Excel accounting format support, and enhances image sizing fidelity for both XLSX and DOCX conversions.


DOCX Conversion

  • Header/Footer element rendering: Full support for rendering inline images, text runs, and tables inside DOCX headers and footers, including alignment, font sizing, word-wrap, and vertical alignment within table cells.
  • Improved inter-script spacing: Smarter CJK↔Latin spacing logic that avoids over-spacing for short labels, single-letter prefixes, and pure numeric tokens (e.g., "500字", "A期" no longer get unwanted spaces).
  • Table cell text justification: Added word spacing (Tw) for justified text in DOCX table cells, distributing extra space across words for "both" alignment.
  • Calibri width estimation improvements: Separated Latin and CJK width calculations; applied ~2.3% kerning reduction to Latin characters only, improving text width estimation accuracy.
  • Cell text horizontal scaling: Uses PDF Tz (horizontal scaling) to fit text within table cell boundaries when Helvetica rendering exceeds cell width.

Excel (XLSX) Conversion

  • Accounting prefix rendering: Properly renders accounting number format prefixes (e.g., $, ¥) left-aligned in cells, separate from the right-aligned numeric value — matching Excel/LibreOffice behavior across title rows, overflow rows, and normal rows.
  • Formula evaluation: Added support for evaluating YEAR(TODAY()), MONTH(NOW()), DAY(TODAY()) date-part formulas and simple CONCATENATE/& formulas with quoted literals and date tokens.
  • Image sizing fidelity: Removed aggressive size capping (usableWidth * 0.95, pageHeight * 0.75) for images; now uses actual EMU dimensions and clamps only to remaining drawable space from the anchor point, producing more accurate image placement.
  • Column width handling: Explicit column widths from the spreadsheet are no longer capped by maxColWidth, honoring the author's layout intent.
  • twoCellAnchor image fallback: Images using twoCellAnchor that omit xdr:ext now fall back to a:xfrm/a:ext for size information.

PDF Writer

  • Character spacing state fix: Always emit Tc (character spacing) operator to prevent previous text block's Tc value from leaking through the graphics state to subsequent blocks.

Documentation

  • Added MiniPdf.Cli badge and usage instructions (install, commands, examples) to all README files.
  • Added conversion limitation notice encouraging users to report issues or contribute PRs.

Stats

  • 5 source files changed, 1,049 insertions, 148 deletions

Full Changelog: v0.17.0...v0.18.0