Skip to content

Releases: mini-software/MiniPdf

v0.29.0

30 Apr 06:34

Choose a tag to compare

What's New in v0.29.0

DOCX rendering fidelity release: substantial improvements to OOXML indent cascade, list label placement, CJK metrics, paragraph spacing, theme font resolution, and shape rendering. Improves Chinese/Japanese/Korean document fidelity and resolves several long-standing layout regressions.

Highlights

  • OOXML indent cascade -- correct inheritance from styles per OOXML 17.3.1.12 and 17.9.3, with auto-tab handling for inherited list paragraphs.
  • List label placement -- gate auto-tab snap on w:suff; correct CJK numbered-list label placement; prefer w:left twips over w:leftChars when both are present.
  • CJK grid metrics -- recognize Chinese font aliases; include paragraph-mark font size in cell line height; skip empty/tab-only runs from line-height max.
  • Paragraph spacing -- apply explicit pStyle SpacingBefore at top of page (narrowed to first paragraph); apply explicit SpacingBefore for first cell paragraph.
  • Theme & font resolution -- resolve theme Latin font for runs without explicit rFonts; substitute Avenir LT Pro to Times New Roman for serif embedding.
  • Shapes & anchors -- render explicit-fill shapes when stroke is also present; handle ObjectAnchor host paragraph (anchor image + shape).
  • Chinese chromatography report fidelity -- targeted improvements driven by real-world test corpus.

Downloads

Platform CLI GUI
Windows x64 minipdf-win-x64.zip minipdf-gui-win-x64.zip
Windows ARM64 minipdf-win-arm64.zip minipdf-gui-win-arm64.zip
Linux x64 minipdf-linux-x64.tar.gz minipdf-gui-linux-x64.tar.gz
Linux ARM64 minipdf-linux-arm64.tar.gz minipdf-gui-linux-arm64.tar.gz
macOS x64 minipdf-osx-x64.tar.gz minipdf-gui-osx-x64.tar.gz
macOS ARM64 minipdf-osx-arm64.tar.gz minipdf-gui-osx-arm64.tar.gz

NuGet package MiniPdf is published automatically via the NuGet workflow.

Changes since v0.28.0

  • dab2898 fix(docx): improve Chinese chromatography report fidelity
  • fbe2fa5 fix(docx): apply OOXML 17.9.3 ind cascade for numbered paragraphs
  • 0650b65 fix(docx): correct CJK numbered-list label placement
  • 27f7e29 fix(docx): render explicit-fill shapes when stroke is also present
  • 6267eec fix(docx): resolve theme Latin font for runs without explicit rFonts
  • b97808e fix(docx): narrow SpacingBefore-explicit-at-top-of-page to first paragraph only
  • b3fffea fix(docx): apply explicit pStyle SpacingBefore at top of page
  • a86535e DOCX: prefer w:left twips over w:leftChars when both present
  • 96213f5 DOCX: apply explicit pStyle SpacingBefore for first cell paragraph
  • c48fc2b fix(docx): substitute Avenir LT Pro to Times New Roman to embed serif
  • 6497e07 fix(docx): handle ObjectAnchor host paragraph (anchor image + shape)
  • 6017cb1 fix(docx): skip empty/tab-only runs in paragraph line-height max-Fs
  • 9ec77ef fix(docx): include paragraph mark font size in cell line height
  • 2d0bd43 fix(docx): recognize Chinese font aliases for CJK grid metrics
  • c933d02 test(nthu): regenerate report artifacts to reflect current source
  • 04a5218 fix(docx): honor OOXML w:suff to gate list label auto-tab snap
  • c620d18 fix(docx): correct OOXML indent cascade and apply auto-tab for inherited list paragraphs
  • 39b91c7 DocxReader: inherit paragraph indent from styles (OOXML 17.3.1.12)
389 files changed, 3089 insertions(+), 20324 deletions(-)

Core source changes:

  • src/MiniPdf/DocxReader.cs (+/-693 lines)
  • src/MiniPdf/DocxToPdfConverter.cs (+/-253 lines)
  • src/MiniPdf/PdfWriter.cs (+/-32 lines)

Remaining diff is benchmark report regeneration (reports_docx/ images and comparison data).

Full Changelog: v0.28.0...v0.29.0

v0.28.0

29 Apr 02:12

Choose a tag to compare

What's New in v0.28.0

Highlights

  • DOCX line-metrics & font fidelity -- font-aware top-of-page ascent, gated line-height growth on font-size jumps, Franklin Gothic line-height factor tuned to LibreOffice (1.149 -> 1.136), Times Roman widths for serif runs in Calibri-default docs, and TNR/Arial Bold wrap accuracy improvements.
  • DOCX justification & wrapping -- preserve leading tab indent, run-boundary justify gaps, snap auto-numbered list label to next default tab stop, num-aligned tab override when list label overflows hanging indent, and explicit spacingAfter flag for paragraph spacing.
  • DOCX CJK rendering -- digit-CJK gap insertion at run boundaries in the multi-format renderer, kinsoku no-end rule for opening punctuation, PDF-level CJK punctuation compression, and tolerance for Calibri Latin width overshoot in CJK runs (SA8000).
  • DOCX layout fixes -- floating images anchored to paragraph line-box top (not baseline), skip line-height advance for wrapNone anchor-image-only paragraphs, skip SpacingBefore for first paragraph in table cell, outlined Wingdings bullets, KaiTi_GB2312 / FangSong_GB2312 font alias mapping.
  • PDF engine -- cap justified line width when natural exceeds MaxWidth; split emoji range so Dingbats bullets use the text font.
  • API -- ConvertToPdf(Stream) now auto-detects DOCX vs XLSX (#70).

Downloads

Platform CLI GUI
Windows x64 minipdf-win-x64.zip minipdf-gui-win-x64.zip
Windows ARM64 minipdf-win-arm64.zip minipdf-gui-win-arm64.zip
Linux x64 minipdf-linux-x64.tar.gz minipdf-gui-linux-x64.tar.gz
Linux ARM64 minipdf-linux-arm64.tar.gz minipdf-gui-linux-arm64.tar.gz
macOS x64 minipdf-osx-x64.tar.gz minipdf-gui-osx-x64.tar.gz
macOS ARM64 minipdf-osx-arm64.tar.gz minipdf-gui-osx-arm64.tar.gz

Changes since v0.27.0

d3b3160 fix(docx): tune Franklin Gothic line-height factor to LibreOffice (1.136)
7f8a4d8 fix(pdf): cap justified line width when natural exceeds MaxWidth
6b44e8c fix(docx): improve MSc Thesis p2 line metrics for justified TNR
93ac363 fix(docx): improve TNR/Arial Bold wrap accuracy in Calibri-default docs
f90d086 fix(docx): font-aware top-of-page ascent and gate line-height-grow on font-size jump
82d54ce fix(api): auto-detect docx/xlsx in ConvertToPdf(Stream) (#70)
7216497 fix(docx): add explicit spacingAfter flag to handle paragraph spacing correctly
22b4d9b fix(docx): add Franklin Gothic line-height factor (1.149)
dd54d03 fix(docx): skip SpacingBefore for first paragraph in table cell
995e909 fix(docx): preserve leading tab indent and run-boundary justify gaps
d5f1673 fix(docx): use Times Roman widths for serif runs in Calibri-default docs
a0cdf3c fix(docx): outlined Wingdings bullets + drop stray leading space on wrap
8e98028 fix(docx): anchor floating images to paragraph line-box top, not baseline
db9051d fix(docx): skip line-height advance for wrapNone anchor-image-only paragraphs
05e527f fix(docx): insert digit-CJK gap at run boundaries in multi-format renderer
63b2395 fix(docx): apply CJK kinsoku no-end rule for opening punctuation
1fda6b8 fix(docx): snap auto-numbered list label to next default tab stop
fe16ec7 fix(pdf): split emoji range so Dingbats bullets use text font
4e2e4a0 Refine serif-run-in-Calibri width estimate
70d8c6b Fix left-aligned tab gap calculation in ExpandTabs
a085604 Apply CJK punctuation compression in PDF text emission
a6ae666 fix(docx): tolerate Calibri Latin width overshoot in CJK runs (SA8000)
0a3732a fix(docx): honor num-aligned tab override when list label overflows hanging indent
eed1be0 fix(docx): map KaiTi_GB2312/FangSong_GB2312 font aliases to simkai/simfang

Diff stat: 313 files changed, 2972 insertions(+), 1777 deletions(-)

Full Changelog: v0.27.0...v0.28.0

v0.27.0

28 Apr 01:45

Choose a tag to compare

What's New in v0.27.0

Highlights

This release focuses on DOCX-to-PDF rendering fidelity, with broad layout, text-wrap, and font-metric improvements plus PDF writer enhancements for image transparency and connector lines.

DOCX Conversion

  • Conditional table borders -- honor band1Horz / firstCol conditional borders so styled tables match Word output.
  • CJK baseline accuracy -- correct snap-to-grid baseline placement for KaiTi-family fonts.
  • Justified line wrapping -- justified lines now stay within the right margin even when the wrap-width estimate undercounts; trailing underlined whitespace in justified paragraphs is suppressed.
  • Wide sans-serif width estimation -- WordWrap uses a wider Helvetica reduction for wide sans-serif fonts.
  • trHeight atLeast rows -- allow rows to shrink so they stay on the current page instead of forcing a page break.
  • Floating-anchor host paragraphs -- skip lineHeight for wrapNone floating-anchor host paragraphs to avoid extra vertical space.
  • Font weight detection + Montserrat metrics -- improved bold/weight detection and Montserrat character-width tables.
  • Calibri-like font width estimation -- improved width estimation for Calibri-family fonts.
  • Bold list text -- bold formatting is preserved on numbered/bulleted list runs.
  • CJK + empty paragraph handling -- improved CJK font selection and empty-paragraph height handling.
  • Header/footer images and connector lines -- added rendering support for connector lines and header/footer images.

PDF Writer

  • Image alpha transparency -- support alpha transparency for images embedded during DOCX-to-PDF conversion.

Tooling / Repo

  • New create-release skill for automating GitHub releases with CLI and GUI AOT binaries.
  • New libreoffice-reference skill for looking up Office-to-PDF processing logic from local references.

Downloads

Platform CLI GUI
Windows x64 minipdf-win-x64.zip minipdf-gui-win-x64.zip
Windows ARM64 minipdf-win-arm64.zip minipdf-gui-win-arm64.zip
Linux x64 minipdf-linux-x64.tar.gz minipdf-gui-linux-x64.tar.gz
Linux ARM64 minipdf-linux-arm64.tar.gz minipdf-gui-linux-arm64.tar.gz
macOS x64 minipdf-osx-x64.tar.gz minipdf-gui-osx-x64.tar.gz
macOS ARM64 minipdf-osx-arm64.tar.gz minipdf-gui-osx-arm64.tar.gz

Changes since v0.26.0

1c1ef32 Refactor code structure for improved readability and maintainability
7548231 fix(docx): suppress trailing underlined whitespace in justified paragraphs
f6b0118 fix(docx): honor band1Horz/firstCol conditional borders in tables
ce42ef1 fix(docx): correct CJK snap-to-grid baseline placement for KaiTi-family fonts
684f3b0 fix(docx): justify lines fit within margin even when wrap estimate undercounts
7c0e251 fix(docx): use wider Helvetica reduction for wide sans-serif fonts in WordWrap
4d999ef update skill of obsidian
f3ede13 fix(docx): allow trHeight atLeast rows to shrink to keep on current page
666d768 fix(docx): skip lineHeight for wrapNone floating-anchor host paragraphs
b24468a feat: enhance DOCX to PDF conversion with support for font weight detection and Montserrat character widths
b696c37 feat: enhance DOCX to PDF conversion with improved font width estimation for Calibri-like fonts
146d67a feat: add support for alpha transparency in images during DOCX to PDF conversion
3227b80 Refactor code structure for improved readability and maintainability
603fdfd feat: add support for rendering connector lines and header/footer images in PDF conversion
59a0a97 feat: add support for bold list text in DOCX to PDF conversion
fac6c67 feat: enhance DOCX to PDF conversion with CJK font support and improved empty paragraph handling
9b4bd7d feat: add create-release skill for automating GitHub releases with CLI and GUI AOT binaries

Source diff stat

 src/MiniPdf/DocxReader.cs         | 615 ++++++++++++++++++++++----
 src/MiniPdf/DocxToPdfConverter.cs | 904 +++++++++++++++++++++++++++++++++-----
 src/MiniPdf/PdfPage.cs            |   7 +-
 src/MiniPdf/PdfWriter.cs          | 145 +++---
 4 files changed, 1421 insertions(+), 250 deletions(-)

Full Changelog: v0.26.0...v0.27.0

v0.26.0

03 Apr 06:47

Choose a tag to compare

What's New in v0.26.0

Cross-Platform GUI Desktop App (New!)

Added MiniPdf.Gui -- a cross-platform desktop application built with Avalonia UI for converting DOCX/XLSX to PDF.

Features:

  • Open single or multiple Office files (DOCX, XLSX)
  • Open folders for batch conversion
  • Drag and drop files/folders directly onto the window
  • Real-time progress tracking per file
  • Custom font directory support (CJK fonts etc.)
  • Open output folder after conversion
  • NativeAOT single-file executable -- no .NET runtime required

Downloads

Platform CLI GUI
Windows x64 minipdf-win-x64.zip minipdf-gui-win-x64.zip
Windows ARM64 minipdf-win-arm64.zip minipdf-gui-win-arm64.zip
Linux x64 minipdf-linux-x64.tar.gz minipdf-gui-linux-x64.tar.gz
Linux ARM64 minipdf-linux-arm64.tar.gz minipdf-gui-linux-arm64.tar.gz
macOS x64 minipdf-osx-x64.tar.gz minipdf-gui-osx-x64.tar.gz
macOS ARM64 minipdf-osx-arm64.tar.gz minipdf-gui-osx-arm64.tar.gz

Full Changelog: v0.25.0...v0.26.0

v0.25.0

02 Apr 11:21

Choose a tag to compare

Highlights from v0.24.0 to current commit (6aecd83):

  • DOCX: last rendered page break support — added handling for w:lastRenderedPageBreak and improved proactive page break logic.
  • DOCX: line height calculation adjustment — refined line height calculations and empty paragraph handling for better layout accuracy.
  • DOCX: vertically merged cell border suppression — suppressed borders for vertically merged table cells and adjusted post-table gap calculation.
  • DOCX: CJK/Latin fraction exclusion — excluded CJK fullwidth glyphs and thin spaces from Latin fraction width logic.
  • DOCX: frame alignment support — added frame alignment, trailing empty paragraph trimming, and improved page break logic.
  • DOCX: auto spacing for Latin and East Asian text — added auto spacing between Latin and East Asian characters with grid snapping adjustments.
  • DOCX: serif font detection — added serif font detection and adjusted width reduction for improved text layout.
  • DOCX: w:keepNext support — implemented w:keepNext paragraph property and fixed cellPaddingV floor for zero-margin tables.
  • DOCX: Fabrikam document support — enhanced conversion with additional test coverage.

Full Changelog: v0.24.0...v0.25.0

v0.24.0

29 Mar 14:20

Choose a tag to compare

Highlights from v0.23.0 to current commit (a02ae6d):

  • DOCX: table style paragraph spacing/line spacing propagation in table cells.
  • DOCX: improved line-height calculation for mixed run font sizes to avoid overlap.
  • DOCX: table cell spacing behavior aligned with Word compatibility mode.
  • XLSX: support second-row stripe style rendering.
  • XLSX: improved fitToPage scaling behavior to reduce near-overflow extra pages.
  • API: added SQLite-based usage logging (hashed IP, file type, size, duration, success).
  • Benchmarks: added IEEE style DOCX case and refreshed comparison assets/reports.

Full Changelog: v0.23.0...v0.24.0

v0.23.0

27 Mar 15:57

Choose a tag to compare

What's Changed (v0.22.0 → v0.23.0)

DOCX Enhancements

  • Footnote support: Full parsing & rendering of footnotes with separator lines and proper numbering
  • Floating textbox: Added hAlign Align support for <wsp> shapes
  • SDT (Structured Document Tag): Recursive unwrapping of <w:sdt> content for richer document fidelity
  • Orphaned list labels: Correct rendering when list paragraphs lack explicit text runs
  • Wrap-top-and-bottom images: Layout mode now supported so images don't overlap text
  • Header top-margin fix: Ensures first-page content doesn't collide with headers

XLSX / Excel Enhancements

  • Bold prefix length: Accurate column-width calculation when cells mix bold and normal text
  • Verdana-specific font widths: Pixel-perfect column sizing for Verdana (commonly used in Excel defaults)
  • Cell indent rendering: Respects indent attribute for left-padded cells
  • Wrapped-text clip: Long wrapped text is now clipped to cell bounds instead of overflowing

PDF Writer

  • Embedded font width measurement: Improved glyph width calculation for TrueType fonts embedded in output PDF

CI / CD

  • NativeAOT cross-platform CLI binaries: Added release-aot.yml workflow — automatically builds and attaches self-contained CLI binaries for 6 platforms on every release

v0.22.0

26 Mar 14:47

Choose a tag to compare

Release v0.22.0

Includes cross-platform CLI AOT binaries for Windows/Linux/macOS (x64/arm64)

v0.20.0

24 Mar 14:48

Choose a tag to compare

v0.21.0

Highlights

A feature-packed release focused on XLSX shape rendering, DOCX line-spacing fidelity, improved PNG decoding, and cloud font deployment for the Web API.

New Features

  • XLSX decorative shape rendering — Rectangle and rounded-rectangle shapes from XLSX drawings are now rendered with fill and border colors, including theme-color luminance modulation support.
  • XLSX dashed/dotted border styles — Cell borders in Excel now render with correct dash patterns (dotted, dashed, dash-dot, dash-dot-dot, hair) instead of solid-only.
  • XLSX formula evaluation engine — Added SUM(), multi-range SUM(A1:A5,B1:B5), and simple A1+B1+C1 cell addition evaluation when cached values are missing.
  • XLSX range expression evaluation — Support for evaluating NAME+N=TODAY() conditional formatting formulas with defined names.
  • XLSX string-based conditional formattingcellIs / equal operator now falls back to string comparison (e.g., matching "✔") when numeric comparison is not applicable.
  • Azure App Service CJK font auto-deployment — New startup.sh script auto-downloads Noto Sans/Serif CJK, LXGW WenKai fonts to persistent /home/fonts/ storage on first run; install-fonts.ps1 configures the Azure Web App; CI workflow sets the startup command automatically.

Improvements

  • DOCX line spacing inheritance — Line spacing (lineRule=exact/atLeast) is now correctly inherited from styles (including basedOn chain), fixing layouts where paragraph-level spacing was absent.
  • DOCX absolute line spacing in tables — Table cell height measurement now uses absolute points for exact/atLeast line rules instead of always computing proportional height.
  • DOCX text wrapping with maxWidth clipping — Flushed text segments now pass maxWidth to AddText(), preventing overflow beyond the right edge.
  • DOCX hyphen-aware word wrap — Word-wrap now tries breaking at hyphens before wrapping the entire word to the next line.
  • DOCX Latin-width correction for CJK documentsEstimateWrapTextWidth applies a 22% kerning reduction to the Latin portion when using Helvetica fallback metrics, better matching actual CJK-Latin document fonts.
  • XLSX dynamic font-size digit widthLookupMaxDigitWidthPx now scales the max-digit-width from 11pt calibration to the actual Normal style font size, improving column width accuracy for non-11pt workbooks.
  • PNG palette image supportPdfWriter now decodes palette (indexed color type 3) PNGs with 1/2/4/8-bit depth, including tRNS transparency chunks.
  • PDF dash pattern outputPdfWriter now emits [...] 0 d dash-array operators for dashed line rendering.
  • Excel chart anchor fallback — Chart positioning now interpolates from the nearest earlier rendered row when the anchor row is beyond the rendered area.

Infrastructure

  • CI/CD — GitHub Actions workflow now sets Azure Web App startup command after deployment.
  • Benchmark updates — Updated DOCX and XLSX comparison reports and reference images.

Full Changelog

v0.20.0...v0.21.0 — 7 commits, 11 source files changed (+990 lines)

v0.20.0

23 Mar 01:51

Choose a tag to compare

v0.20.0

Full Changelog: v0.19.0...v0.20.0

🚀 New Features

DOCX to PDF

  • Line spacing inheritance from styles: Paragraph line spacing (lineRule, exact, atLeast) is now correctly inherited from the document's style hierarchy (basedOn chains), fixing cases where styled paragraphs ignored their defined line spacing.
  • Hyphen-aware word wrapping: Long words containing hyphens are now broken at hyphen positions before wrapping to the next line, improving text layout for compound words and hyphenated terms.
  • Improved text wrapping with maxWidth constraint: Text runs now carry a maxWidth parameter, enabling the PDF writer to apply horizontal scaling (Tz) more accurately when text overflows its container.

Excel/XLSX to PDF

  • Drawing shape rendering: Decorative shapes (rectangles, rounded rectangles) from worksheet drawings are now parsed and rendered with fill color, border color, and border width — visible as colored frames and background decorations in the PDF output.
  • Dynamic font size for digit width: MaxDigitWidthPx calculation now uses the workbook's actual Normal style font size (not a hardcoded default), improving column width accuracy across workbooks with non-standard base fonts.
  • First column table styling: Table style firstColumn DXF formatting (bold, fill) is now applied when showFirstColumn is enabled, matching Excel rendering.
  • Border dash patterns: Cell borders with styles like dotted, dashed, dashDot, hair now render with correct PDF dash patterns instead of solid lines.

MiniPdf Web API

  • Cloud CJK font deployment: New startup.sh and install-fonts.ps1 scripts automatically download Noto Sans CJK + Latin fonts to Azure App Service persistent storage (/home/fonts/) on first run.
  • Runtime font registration: API now scans /home/fonts/ and local Fonts/ directory at startup, registering all .ttf, .ttc, .otf files via MiniPdf.RegisterFont() for full CJK support in cloud deployments.

🐛 Bug Fixes

  • Line spacing exact mode in style inheritance: lineSpacingExact flag is now properly tracked and inherited through DocxStyleInfo style resolution, preventing exact line spacing from being lost during style chain resolution.
  • Chart anchor row extrapolation: When a chart's anchor row falls beyond rendered rows, the converter now finds the closest earlier row and extrapolates position instead of failing silently.

🔧 PDF Writer / Core

  • Indexed (palette) PNG support: PNG images with color type 3 (indexed/palette) at 1/2/4/8 bit depth are now correctly decoded, including tRNS transparency chunk handling for palette-based alpha.
  • Line dash pattern rendering: PdfLineBlock now supports a DashPattern array, enabling dotted, dashed, and dash-dot border styles in the PDF output via the d (setdash) operator.

📦 Infrastructure & Tests

  • Font installation scripts: Added install-fonts.ps1 (Windows/dev) and startup.sh (Azure Linux) for automated font provisioning.
  • New XLSX test files: Added Business Expense Budget and Weekly Schedule Planner Excel files for expanded benchmark coverage.
  • New reference PDFs: Added 20+ Office-generated reference PDFs for DOCX and XLSX issue-based benchmarks (SA8000, Cooperation Agreement, Invoice, Wedding Timeline Planner, Payroll Calculator, etc.).
  • Updated comparison reports: Refreshed MiniPdf vs Reference PDF comparison images and reports.

6 non-merge commits | 6 source files changed, 784 insertions, 110 deletions (src/ only)