v0.17.0 MiniPdf CLI Tool
v0.17.0
π New: MiniPdf CLI Tool
A brand-new command-line tool (MiniPdf.Cli) for converting Excel (.xlsx) and Word (.docx) files to PDF β installable as a .NET global tool via NuGet.
dotnet tool install -g MiniPdf.Cli
minipdf convert input.xlsx -o output.pdf
minipdf convert report.docx --fonts /path/to/fonts- Supports
--output,--fontsoptions and shorthand syntax - Packaged as a NuGet dotnet tool (
PackAsTool) - Automated NuGet publish via new GitHub Actions workflow (
nuget-publish-cli.yml, triggered bycli-v*tags)
π DOCX-to-PDF Improvements
- CJK font resolution: Per-run font name resolution with East Asia theme font support β reads
theme1.xmlmajor/minor script fonts, resolvesw:rFontswith East Asia language awareness - Preferred CJK font propagation: Document's
DefaultEastAsiaFontNameis now passed to the PDF writer for correct font selection and prioritization - Floating text boxes: Added support for
wrapNonefloating text boxes with absolute page positioning (newDocxFloatingTextBoxrecord) - Field instruction parsing: New
GetFieldInstructionTypefor PAGE/NUMPAGES field support in headers/footers - List numbering: Added
FormatChineseCountingfor Chinese-style ordered list numbering; improved list label font alignment (shares same embedded font slot as body text) - Character spacing: Per-run
CharSpacingtracking and word-spacing propagation during line rendering - Line spacing: Correct handling of exact/atLeast spacing (not snapped to document grid per OOXML spec); auto-spacing uses max run font size for grid-snapped height
π¨οΈ PDF Writer Enhancements
- Font name normalization & alias matching:
NormalizeFontNameandIsFontAliasMatchfor flexible font resolution - CJK font file mapping: New
CjkFontFileMapdictionary for well-known CJK font-to-file mapping (Chinese, Japanese, Korean) - Font prioritization:
PrioritizePreferredCjkFontreorders candidate font paths based on document preference - Multi-font slot support:
FindPreferredFontIndexandfontNameToSlotdictionary for per-run font slot selection in content streams
π Excel-to-PDF
- Improved print-scale precision: stores precise float scale to avoid integer rounding loss
π MiniPdf.Web
- Custom font upload: Users can upload their own
.ttf/.otffont files for better CJK rendering - Font loading status indicators: Download progress, success, and failure states
- i18n support: Added
I18n.cswith English, Simplified Chinese, and Traditional Chinese translations - Enhanced CSS styling for the converter page
π Documentation & Licensing
- Added open-source and licensing information (Apache 2.0) to all README files (EN, zh-CN, zh-TW, ja, ko, fr, it)
- New README.nuget.cli.md for CLI NuGet package
- Updated README to reflect lightweight design and serverless capabilities
π§ͺ Testing & Benchmarks
- New DOCX-to-PDF unit test:
Convert_FooterPageFieldWithSwitch_RendersPageNumber - Added test files: Academic Achievement Summary Table (xlsx), SA8000 ch sample, nthu_article (docx)
- Updated DOCX and XLSX benchmark comparison reports with new test cases
- Cleaned up outdated benchmark report files and removed obsolete test PDFs (wedding timeline planner, payroll calculator, etc.)
π§ Other
- Code refactoring for improved readability and maintainability
- Updated .gitignore with new patterns
- Solution file updated to include
MiniPdf.Cliproject
Full Changelog: v0.16.0...v0.17.0