轉換
July 19, 2026 · View on GitHub
一個極簡、輕量化的 .NET 函式庫,用於將 Office 檔案轉換為 PDF。
👉 線上示範 — 在瀏覽器中快速體驗,無需安裝。
⚠️ 由於瀏覽器可用字體有限,渲染效果可能不夠理想。建議在本地電腦上測試以獲得最佳效果。
功能特色
- Excel 轉 PDF — 將
.xlsx檔案轉換為 PDF - Word 轉 PDF — 將
.docx檔案轉換為 PDF - PowerPoint 轉 PDF — 將
.pptx檔案轉換為 PDF - PDF 合併與書籤 — 合併多個 PDF,並為結果加入頂層書籤
- 極少相依性 — 輕量化設計,幾乎僅使用 .NET 內建 API
- Serverless 就緒 — 無需 COM、無需安裝 Office、無需 Adobe Acrobat — 有 .NET 即可運行
- Native AOT — 預編譯獨立二進位檔,支援 Windows / Linux / macOS,無需安裝 .NET 執行階段
- 標準 PDF 1.4 格式輸出
- 完全開源免費 — 基於 Apache 2.0 授權,可自由商用,無任何限制,註明出處即可。歡迎提交 PR 一起貢獻!
- 圖表 — 目前支援尚不完善
注意: MiniPdf 目前只能處理基本的轉換需求。對於複雜或高度自訂的 Office 文件,轉換結果可能不夠理想。如果您遇到相容性問題,歡迎提交 Issue 或發起 Pull Request,一起讓專案變得更好!
參考
- 使用
Apache POI+LibreOffice訓練參考小模型 - AI 開發使用
GitHub Copilot+Claude Code
快速開始
透過 NuGet 安裝
dotnet add package MiniPdf
使用方式
using MiniSoftware;
// Excel 轉 PDF
MiniPdf.ConvertToPdf("data.xlsx", "output.pdf");
// Word 轉 PDF
MiniPdf.ConvertToPdf("report.docx", "output.pdf");
// PowerPoint 轉 PDF
MiniPdf.ConvertToPdf("slides.pptx", "output.pdf");
// 檔案轉位元組陣列
byte[] pdfBytes = MiniPdf.ConvertToPdf("data.xlsx");
// 依名稱或 1-based 索引渲染指定的 Excel 工作表(null 會渲染所有工作表)
MiniPdf.ConvertToPdf("data.xlsx", "selected.pdf", sheets: new[] { "Summary", "Details" });
MiniPdf.ConvertToPdf("data.xlsx", "selected.pdf", sheetIndexes: new[] { 1, 3 });
// 壓縮並調整大型或寬 Excel 工作表的版面
MiniPdf.ConvertToPdf("data.xlsx", "compact.pdf", new MiniPdfConversionOptions
{
Compress = true,
FitToPage = true,
Landscape = true,
PrintScale = 70,
RowsPerPage = 80,
});
// 串流轉位元組陣列
using var stream = File.OpenRead("data.xlsx");
byte[] pdfBytes = MiniPdf.ConvertToPdf(stream);
// 合併 PDF 並加入書籤
MiniPdf.MergePdf(new[] { "cover.pdf", "body.pdf" }, "merged.pdf", new PdfMergeOptions
{
BookmarkTitles = new[] { "Cover", "Body" },
Bookmarks = new[] { new PdfBookmark("Body page 2", 2) },
});
PDF 合併使用方式
合併多個檔案
using MiniSoftware;
MiniPdf.MergePdf(
new[] { "cover.pdf", "chapter-1.pdf", "chapter-2.pdf" },
"book.pdf");
輸入順序會被保留,所以 cover.pdf 的頁面會先出現,接著是 chapter-1.pdf,最後是 chapter-2.pdf。
為每個來源 PDF 加入一個書籤
當每個輸入 PDF 都要成為頂層書籤時,使用 BookmarkTitles。標題數量必須與輸入 PDF 數量相同。
MiniPdf.MergePdf(
new[] { "cover.pdf", "chapter-1.pdf", "chapter-2.pdf" },
"book-with-bookmarks.pdf",
new PdfMergeOptions
{
BookmarkTitles = new[] { "Cover", "Chapter 1", "Chapter 2" },
});
為指定頁面加入書籤
使用 PdfBookmark 指定書籤目標頁。PageIndex 從 0 開始,並指向最終合併後的 PDF 頁碼。
MiniPdf.MergePdf(
new[] { "cover.pdf", "chapter-1.pdf", "chapter-2.pdf" },
"book-with-custom-bookmarks.pdf",
new PdfMergeOptions
{
Bookmarks = new[]
{
new PdfBookmark("Start", 0),
new PdfBookmark("Chapter 2 - page 3", 8),
},
});
回傳位元組陣列
byte[] mergedPdf = MiniPdf.MergePdf(
new[] { "cover.pdf", "chapter-1.pdf" },
new PdfMergeOptions
{
BookmarkTitles = new[] { "Cover", "Chapter 1" },
});
PDF 合併目前支援未加密且使用 classic xref table 的 PDF。加密 PDF 以及僅使用 xref stream 的 PDF 會拋出 NotSupportedException。
PDF 合併視覺化測試
如需產生帶書籤的合併 PDF 範例以便人工檢查:
./scripts/Test-PdfMergeVisual.ps1
腳本會寫入 artifacts/issue62-merge-visual/merged-bookmarks.pdf。請用 PDF 閱讀器開啟它,並檢查書籤面板是否包含 Source A、Source B 和 Source B - page 2。加入 -Open 可在產生後自動開啟 PDF。
自訂字體
如果執行環境的系統字體有限(例如容器或 Blazor WASM),請在轉換前先註冊字體。
using MiniSoftware;
// 建議在應用程式啟動時註冊一個或多個字體
MiniPdf.RegisterFont("NotoSansSC", File.ReadAllBytes("Fonts/NotoSansSC-Regular.ttf"));
MiniPdf.RegisterFont("NotoColorEmoji", File.ReadAllBytes("Fonts/NotoColorEmoji.ttf"));
MiniPdf.ConvertToPdf("report.docx", "report.pdf");
說明:
- 支援傳入 TrueType
.ttf與 TrueType Collection.ttc字體位元組。 - 建議只在啟動階段註冊一次,避免重複註冊。
- 已註冊字體會優先於系統字體進行匹配。
命令列工具
MiniPdf 還提供命令列工具 MiniPdf.Cli,無需撰寫程式碼即可快速轉換檔案。
安裝
dotnet tool install --global MiniPdf.Cli
使用方式
# 將 Excel 轉為 PDF(輸出: data.pdf)
minipdf data.xlsx
# 將 Word 轉為 PDF
minipdf report.docx
# 將 PowerPoint 轉為 PDF
minipdf slides.pptx
# 指定輸出路徑
minipdf report.docx -o /path/to/output.pdf
# 註冊自訂字體(適用於容器/無頭環境)
minipdf report.docx --fonts ./Fonts
# 依名稱或 1-based 索引渲染指定的 Excel 工作表
minipdf data.xlsx --sheets Summary,2
# 為大型輸出壓縮 PDF 內容串流
minipdf data.xlsx --compress
# 渲染有範圍限制的 Excel 預覽
minipdf data.xlsx --max-rows 200 --max-columns 20 --compress
# 調整大型或寬 Excel 工作表的版面
minipdf data.xlsx --fit-to-page --landscape --scale 70
# 目標是每頁容納更多工作表列
minipdf data.xlsx --rows-per-page 80 --compress
命令說明
| 命令 | 說明 |
|---|---|
minipdf <file> | 將 .xlsx / .docx / .pptx 轉換為 PDF |
minipdf convert <file> -o <out> | 轉換並指定輸出路徑 |
minipdf convert <file> --compress | 壓縮 PDF 內容串流 |
minipdf data.xlsx --max-rows <n> --max-columns <n> | 渲染有範圍限制的 Excel 預覽 |
minipdf data.xlsx --fit-to-page --landscape --scale <n> | 適配並縮放 Excel 版面 |
minipdf data.xlsx --rows-per-page <n> | 目標是每頁容納更多 Excel 列 |
minipdf --version | 顯示版本 |
minipdf --help | 顯示說明 |
Native AOT 獨立二進位檔
MiniPdf.Cli 支援 Native AOT(Ahead-of-Time,預編譯)— 在建置階段將 C# 程式碼直接編譯為原生機器碼,如同 C/C++ 編譯一樣,產生獨立的可執行檔。執行時無需 .NET 執行階段或 JIT 編譯器。
優勢:
- 零相依性 — 目標機器無需安裝 .NET SDK 或執行階段
- 即時啟動 — 原生機器碼,無 JIT 預熱
- 體積精巧 — 單檔二進位,便於散佈和部署
- CI/CD 友善 — 下載即可執行,無需在流水線中安裝 .NET
下載: 從 GitHub Releases 頁面下載對應平台的二進位檔。
| 平台 | 檔案 |
|---|---|
| Windows x64 | minipdf-win-x64.zip |
| Windows ARM64 | minipdf-win-arm64.zip |
| Linux x64 | minipdf-linux-x64.tar.gz |
| Linux ARM64 | minipdf-linux-arm64.tar.gz |
| macOS x64 | minipdf-osx-x64.tar.gz |
| macOS ARM64 (Apple Silicon) | minipdf-osx-arm64.tar.gz |
使用方式(Linux / macOS 範例):
# 下載並解壓
tar -xzf minipdf-linux-x64.tar.gz
# 轉換
./minipdf report.docx -o report.pdf
使用方式(Windows 範例):
# 解壓 zip 後執行
.\minipdf.exe report.docx -o report.pdf
基準測試
MiniPdf 的輸出與 MiniExcel 及 Office 365 作為參考渲染器進行對比,共 373 個測試案例。
| 報告 | 案例數 | 🟢 優秀 (≥90%) | 🟡 可接受 (70%–90%) | 🔴 待改進 (<70%) | 平均分 |
|---|---|---|---|---|---|
| XLSX 轉 PDF | 191 | 175 | 16 | 0 | 96.9% |
| DOCX 轉 PDF | 180 | 178 | 2 | 0 | 97.6% |
| Issue XLSX 檔案 | 2 | 1 | 1 | 0 | 83.8% |
| 合計 | 373 | 354 | 19 | 0 | 97.2% |
評分方式:文字相似度 40% + 視覺相似度 40% + 頁數 20%
詳細對比報告
- XLSX 基準測試報告 — XLSX 轉換測試案例
- DOCX 基準測試報告 — DOCX 轉換測試案例
- Issue XLSX 檔案報告 — 實際 Issue 檔案測試案例
- Issue DOCX 檔案報告 — 實際 Issue 檔案測試案例
視覺對比
所有測試案例對比 MiniPdf 輸出與 MiniExcel / Office 365 參考。多頁結果僅顯示第 1 頁。
| MiniPdf | MiniExcel / Office 365(參考) |
|---|---|
| classic01 | Basic table with headers 🟢 99.9% |
![]() |
![]() |
| classic02 | Multiple worksheets 🟢 99.8% |
![]() |
![]() |
| classic03 | Empty workbook 🟢 100.0% |
![]() |
![]() |
| classic04 | Single cell 🟢 100.0% |
![]() |
![]() |
| classic05 | Wide table 🟢 99.8% |
![]() |
![]() |
| classic06 | Tall table 🟢 97.8% |
![]() |
![]() |
| classic07 | Numbers only 🟢 100.0% |
![]() |
![]() |
| classic08 | Mixed text and numbers 🟢 99.9% |
![]() |
![]() |
| classic09 | Long text 🟢 98.4% |
![]() |
![]() |
| classic10 | Special xml characters 🟢 99.9% |
![]() |
![]() |
| classic11 | Sparse rows 🟢 100.0% |
![]() |
![]() |
| classic12 | Sparse columns 🟢 99.9% |
![]() |
![]() |
| classic13 | Date strings 🟢 99.9% |
![]() |
![]() |
| classic14 | Decimal numbers 🟢 99.9% |
![]() |
![]() |
| classic15 | Negative numbers 🟢 99.9% |
![]() |
![]() |
| classic16 | Percentage strings 🟢 99.4% |
![]() |
![]() |
| classic17 | Currency strings 🟢 99.9% |
![]() |
![]() |
| classic18 | Large dataset 🟢 95.7% |
![]() |
![]() |
| classic19 | Single column list 🟢 99.9% |
![]() |
![]() |
| classic20 | All empty cells 🟢 100.0% |
![]() |
![]() |
| classic21 | Header only 🟢 99.9% |
![]() |
![]() |
| classic22 | Long sheet name 🟢 99.9% |
![]() |
![]() |
| classic23 | Unicode text 🟢 91.3% |
![]() |
![]() |
| classic24 | Red text 🟢 99.9% |
![]() |
![]() |
| classic25 | Multiple colors 🟢 99.8% |
![]() |
![]() |
| classic26 | Inline strings 🟢 99.9% |
![]() |
![]() |
| classic27 | Single row 🟢 99.9% |
![]() |
![]() |
| classic28 | Duplicate values 🟢 99.9% |
![]() |
![]() |
| classic29 | Formula results 🟢 99.9% |
![]() |
![]() |
| classic30 | Mixed empty and filled sheets 🟢 100.0% |
![]() |
![]() |
| classic31 | Bold header row 🟢 99.9% |
![]() |
![]() |
| classic32 | Right aligned numbers 🟢 99.9% |
![]() |
![]() |
| classic33 | Centered text 🟢 99.9% |
![]() |
![]() |
| classic34 | Explicit column widths 🟢 99.9% |
![]() |
![]() |
| classic35 | Explicit row heights 🟢 99.5% |
![]() |
![]() |
| classic36 | Merged cells 🟢 99.9% |
![]() |
![]() |
| classic37 | Freeze panes 🟢 99.6% |
![]() |
![]() |
| classic38 | Hyperlink cell 🟢 99.9% |
![]() |
![]() |
| classic39 | Financial table 🟢 99.8% |
![]() |
![]() |
| classic40 | Scientific notation 🟢 99.9% |
![]() |
![]() |
| classic41 | Integer vs float 🟢 99.9% |
![]() |
![]() |
| classic42 | Boolean values 🟢 99.6% |
![]() |
![]() |
| classic43 | Inventory report 🟢 99.5% |
![]() |
![]() |
| classic44 | Employee roster 🟢 98.0% |
![]() |
![]() |
| classic45 | Sales by region 🟢 99.9% |
![]() |
![]() |
| classic46 | Grade book 🟢 99.6% |
![]() |
![]() |
| classic47 | Time series 🟢 99.3% |
![]() |
![]() |
| classic48 | Survey results 🟢 99.6% |
![]() |
![]() |
| classic49 | Contact list 🟢 98.5% |
![]() |
![]() |
| classic50 | Budget vs actuals 🟢 99.6% |
![]() |
![]() |
| classic51 | Product catalog 🟢 98.5% |
![]() |
![]() |
| classic52 | Pivot summary 🟢 99.6% |
![]() |
![]() |
| classic53 | Invoice 🟢 99.5% |
![]() |
![]() |
| classic54 | Multi level header 🟢 99.8% |
![]() |
![]() |
| classic55 | Error values 🟢 99.8% |
![]() |
![]() |
| classic56 | Alternating row colors 🟢 99.6% |
![]() |
![]() |
| classic57 | Cjk only 🟢 91.1% |
![]() |
![]() |
| classic58 | Mixed numeric formats 🟢 99.5% |
![]() |
![]() |
| classic59 | Multi sheet summary 🟢 99.9% |
![]() |
![]() |
| classic60 | Large wide table 🟢 97.4% |
![]() |
![]() |
| classic61 | Product card with image 🟢 99.9% |
![]() |
![]() |
| classic62 | Company logo header 🟢 99.6% |
![]() |
![]() |
| classic63 | Two products side by side 🟢 99.8% |
![]() |
![]() |
| classic64 | Employee directory with photo 🟢 99.1% |
![]() |
![]() |
| classic65 | Inventory with product photos 🟢 99.4% |
![]() |
![]() |
| classic66 | Invoice with logo 🟢 99.2% |
![]() |
![]() |
| classic67 | Real estate listing 🟢 99.8% |
![]() |
![]() |
| classic68 | Restaurant menu 🟢 98.6% |
![]() |
![]() |
| classic69 | Image only sheet 🟢 100.0% |
![]() |
![]() |
| classic70 | Product catalog with images 🟢 99.2% |
![]() |
![]() |
| classic71 | Multi sheet with images 🟢 99.8% |
![]() |
![]() |
| classic72 | Bar chart image with data 🟢 99.5% |
![]() |
![]() |
| classic73 | Event flyer with banner 🟢 99.6% |
![]() |
![]() |
| classic74 | Dashboard with kpi image 🟢 97.9% |
![]() |
![]() |
| classic75 | Certificate with seal 🟢 99.5% |
![]() |
![]() |
| classic76 | Product image grid 🟢 99.7% |
![]() |
![]() |
| classic77 | News article with hero image 🟢 99.6% |
![]() |
![]() |
| classic78 | Small icon per row 🟢 99.2% |
| classic79 | Wide panoramic banner 🟢 99.8% |
![]() |
![]() |
| classic80 | Portrait tall image 🟢 99.8% |
![]() |
![]() |
| classic81 | Step by step with images 🟢 99.7% |
![]() |
![]() |
| classic82 | Before after images 🟢 99.4% |
![]() |
![]() |
| classic83 | Color swatch palette 🟢 99.4% |
![]() |
![]() |
| classic84 | Travel destination cards 🟢 99.6% |
![]() |
![]() |
| classic85 | Lab results with image 🟢 99.2% |
![]() |
![]() |
| classic86 | Software screenshot features 🟢 98.7% |
![]() |
![]() |
| classic87 | Sports results with logos 🟢 99.8% |
![]() |
![]() |
| classic88 | Image after data 🟢 99.7% |
![]() |
![]() |
| classic89 | Nutrition label with image 🟢 99.5% |
![]() |
![]() |
| classic90 | Project status with milestones 🟢 99.0% |
![]() |
![]() |
| classic91 | Simple bar chart 🟢 96.6% |
![]() |
![]() |
| classic92 | Horizontal bar chart 🟢 96.9% |
![]() |
![]() |
| classic93 | Line chart 🟢 93.2% |
![]() |
![]() |
| classic94 | Pie chart 🟢 97.2% |
![]() |
![]() |
| classic95 | Area chart 🟡 76.4% |
![]() |
![]() |
| classic96 | Scatter chart 🟢 94.8% |
![]() |
![]() |
| classic97 | Doughnut chart 🟢 97.5% |
![]() |
![]() |
| classic98 | Radar chart 🟢 95.1% |
![]() |
![]() |
| classic99 | Bubble chart 🟢 92.0% |
![]() |
![]() |
| classic100 | Stacked bar chart 🟢 95.0% |
![]() |
![]() |
| classic101 | Percent stacked bar 🟢 93.6% |
![]() |
![]() |
| classic102 | Line chart with markers 🟢 93.0% |
![]() |
![]() |
| classic103 | Pie chart with labels 🟡 86.9% |
![]() |
![]() |
| classic104 | Combo bar line chart 🟡 81.6% |
![]() |
![]() |
| classic105 | 3d bar chart 🟡 85.8% |
![]() |
![]() |
| classic106 | 3d pie chart 🟢 96.7% |
![]() |
![]() |
| classic107 | Multi series line 🟡 80.6% |
![]() |
![]() |
| classic108 | Stacked area chart 🟢 94.4% |
![]() |
![]() |
| classic109 | Scatter with trendline 🟢 92.3% |
![]() |
![]() |
| classic110 | Chart with legend 🟡 84.7% |
![]() |
![]() |
| classic111 | Chart with axis labels 🟢 92.1% |
![]() |
![]() |
| classic112 | Multiple charts 🟡 85.4% |
![]() |
![]() |
| classic113 | Chart sheet 🟡 86.4% |
![]() |
![]() |
| classic114 | Chart large dataset 🟢 91.6% |
![]() |
![]() |
| classic115 | Chart negative values 🟢 92.1% |
![]() |
![]() |
| classic116 | Percent stacked area 🟢 93.8% |
![]() |
![]() |
| classic117 | Stock ohlc chart 🟡 80.9% |
![]() |
![]() |
| classic118 | Bar chart custom colors 🟢 95.5% |
![]() |
![]() |
| classic119 | Dashboard multi charts 🟢 92.1% |
![]() |
![]() |
| classic120 | Chart with date axis 🟡 76.1% |
![]() |
![]() |
| classic121 | Thin borders 🟢 99.7% |
![]() |
![]() |
| classic122 | Thick outer thin inner 🟢 99.6% |
![]() |
![]() |
| classic123 | Dashed borders 🟢 99.1% |
![]() |
![]() |
| classic124 | Colored borders 🟢 99.7% |
![]() |
![]() |
| classic125 | Solid fills 🟢 99.2% |
![]() |
![]() |
| classic126 | Dark header 🟢 99.5% |
![]() |
![]() |
| classic127 | Font styles 🟢 99.6% |
![]() |
![]() |
| classic128 | Font sizes 🟢 99.0% |
![]() |
![]() |
| classic129 | Alignment combos 🟢 99.8% |
![]() |
![]() |
| classic130 | Wrap and indent 🟢 99.5% |
![]() |
![]() |
| classic131 | Number formats 🟢 99.6% |
![]() |
![]() |
| classic132 | Striped table 🟢 99.0% |
![]() |
![]() |
| classic133 | Gradient rows 🟢 99.6% |
![]() |
![]() |
| classic134 | Heatmap 🟢 98.8% |
![]() |
![]() |
| classic135 | Bottom border only 🟢 99.8% |
![]() |
![]() |
| classic136 | Financial report styled 🟢 99.3% |
![]() |
![]() |
| classic137 | Checkerboard 🟢 98.4% |
![]() |
![]() |
| classic138 | Color grid 🟢 99.4% |
![]() |
![]() |
| classic139 | Pattern fills 🟢 99.2% |
![]() |
![]() |
| classic140 | Rotated text 🟢 98.1% |
![]() |
![]() |
| classic141 | Mixed edge borders 🟢 99.7% |
![]() |
![]() |
| classic142 | Styled invoice 🟢 98.3% |
![]() |
![]() |
| classic143 | Colored tabs 🟢 100.0% |
![]() |
![]() |
| classic144 | Note style cells 🟢 99.6% |
![]() |
![]() |
| classic145 | Status badges 🟢 99.1% |
![]() |
![]() |
| classic146 | Double border table 🟢 99.6% |
![]() |
![]() |
| classic147 | Multi sheet styled 🟢 99.7% |
![]() |
![]() |
| classic148 | Frozen styled grid 🟢 97.3% |
![]() |
![]() |
| classic149 | Merged styled sections 🟢 98.7% |
![]() |
![]() |
| classic150 | Kitchen sink styles 🟢 97.5% |
![]() |
![]() |
| classic151 | Multilingual greetings 🟢 93.5% |
![]() |
![]() |
| classic152 | Emoji sampler 🟢 91.1% |
![]() |
![]() |
| classic153 | Currency symbols 🟢 98.5% |
![]() |
![]() |
| classic154 | Math symbols 🟢 95.7% |
![]() |
![]() |
| classic155 | Diacritical marks 🟢 99.8% |
![]() |
![]() |
| classic156 | Rtl bidi text 🟡 84.0% |
![]() |
![]() |
| classic157 | Cjk extended 🟢 91.3% |
![]() |
![]() |
| classic158 | Emoji skin tones 🟢 99.3% |
![]() |
![]() |
| classic159 | Zwj emoji 🟢 90.6% |
![]() |
![]() |
| classic160 | Punctuation marks 🟢 94.4% |
![]() |
![]() |
| classic161 | Box drawing 🟢 95.0% |
![]() |
![]() |
| classic162 | Cjk emoji styled 🟡 86.5% |
![]() |
![]() |
| classic163 | Cyrillic alphabets 🟢 99.6% |
![]() |
![]() |
| classic164 | Indic scripts 🟡 87.4% |
![]() |
![]() |
| classic165 | Southeast asian 🟢 96.0% |
![]() |
![]() |
| classic166 | Emoji progress 🟢 98.6% |
![]() |
![]() |
| classic167 | Musical symbols 🟢 90.0% |
![]() |
![]() |
| classic168 | Mixed ltr rtl styled 🟢 94.5% |
![]() |
![]() |
| classic169 | Korean invoice 🟡 88.4% |
![]() |
![]() |
| classic170 | Emoji dashboard 🟢 96.3% |
![]() |
![]() |
| classic171 | Ipa phonetic 🟢 97.6% |
![]() |
![]() |
| classic172 | Emoji timeline 🟢 95.3% |
![]() |
![]() |
| classic173 | African languages 🟢 90.8% |
![]() |
![]() |
| classic174 | Technical symbols 🟢 94.4% |
![]() |
![]() |
| classic175 | Multiscript catalog 🟢 92.6% |
![]() |
![]() |
| classic176 | Combining characters 🟢 94.5% |
![]() |
![]() |
| classic177 | Emoji calendar 🟡 88.4% |
![]() |
![]() |
| classic178 | Caucasus ethiopic 🟢 96.9% |
![]() |
![]() |
| classic179 | Emoji inventory 🟢 91.0% |
![]() |
![]() |
| classic180 | Polyglot paragraph 🟢 93.6% |
![]() |
![]() |
| classic181 | Feedback tracker with images 🟢 99.4% |
| classic182 | Dense long text columns 🟢 96.5% |
![]() |
![]() |
| classic183 | Mixed content grid 🟢 99.4% |
![]() |
![]() |
| classic184 | Wide narrow columns 🟢 98.4% |
![]() |
![]() |
| classic185 | Tall rows vertical align 🟢 99.7% |
![]() |
![]() |
| classic186 | Multi sheet image report 🟢 99.6% |
![]() |
![]() |
| classic187 | Bug report with screenshots 🟢 98.2% |
![]() |
![]() |
| classic188 | Merged header with images 🟢 99.5% |
![]() |
![]() |
| classic189 | Alternating image text rows 🟢 95.3% |
![]() |
![]() |
| classic190 | Dashboard kpi images 🟢 99.5% |
![]() |
![]() |
| classic191 | Payroll calculator 🟡 89.5% |
![]() |
![]() |
DOCX 基準測試
MiniPdf DOCX 的輸出與 MiniExcel 及 Office 365 作為參考渲染器進行對比,涵蓋 180 個經典測試案例。
| 類別 | 數量 | 閾值 |
|---|---|---|
| 🟢 優秀 | 175 | ≥ 90% |
| 🟡 可接受 | 16 | 70% – 90% |
| 🔴 待改進 | 0 | < 70% |
整體平均分: 96.9%(文字相似度 40% + 視覺相似度 40% + 頁數 20%)
DOCX 視覺對比
所有 DOCX 測試案例對比 MiniPdf 輸出與 MiniExcel / Office 365 參考。多頁結果僅顯示第 1 頁。
| MiniPdf | MiniExcel / Office 365 (Reference) |
|---|---|
| classic01 | Basic table with headers 🟢 99.9% |
![]() |
![]() |
| classic02 | Multiple worksheets 🟢 99.8% |
![]() |
![]() |
| classic03 | Empty workbook 🟢 100.0% |
![]() |
![]() |
| classic04 | Single cell 🟢 100.0% |
![]() |
![]() |
| classic05 | Wide table 🟢 99.8% |
![]() |
![]() |
| classic06 | Tall table 🟢 97.8% |
![]() |
![]() |
| classic07 | Numbers only 🟢 100.0% |
![]() |
![]() |
| classic08 | Mixed text and numbers 🟢 99.9% |
![]() |
![]() |
| classic09 | Long text 🟢 98.4% |
![]() |
![]() |
| classic10 | Special xml characters 🟢 99.9% |
![]() |
![]() |
| classic11 | Sparse rows 🟢 100.0% |
![]() |
![]() |
| classic12 | Sparse columns 🟢 99.9% |
![]() |
![]() |
| classic13 | Date strings 🟢 99.9% |
![]() |
![]() |
| classic14 | Decimal numbers 🟢 99.9% |
![]() |
![]() |
| classic15 | Negative numbers 🟢 99.9% |
![]() |
![]() |
| classic16 | Percentage strings 🟢 99.4% |
![]() |
![]() |
| classic17 | Currency strings 🟢 99.9% |
![]() |
![]() |
| classic18 | Large dataset 🟢 95.7% |
![]() |
![]() |
| classic19 | Single column list 🟢 99.9% |
![]() |
![]() |
| classic20 | All empty cells 🟢 100.0% |
![]() |
![]() |
| classic21 | Header only 🟢 99.9% |
![]() |
![]() |
| classic22 | Long sheet name 🟢 99.9% |
![]() |
![]() |
| classic23 | Unicode text 🟢 91.3% |
![]() |
![]() |
| classic24 | Red text 🟢 99.9% |
![]() |
![]() |
| classic25 | Multiple colors 🟢 99.8% |
![]() |
![]() |
| classic26 | Inline strings 🟢 99.9% |
![]() |
![]() |
| classic27 | Single row 🟢 99.9% |
![]() |
![]() |
| classic28 | Duplicate values 🟢 99.9% |
![]() |
![]() |
| classic29 | Formula results 🟢 99.9% |
![]() |
![]() |
| classic30 | Mixed empty and filled sheets 🟢 100.0% |
![]() |
![]() |
| classic31 | Bold header row 🟢 99.9% |
![]() |
![]() |
| classic31 | Bold header row 🟢 99.9% |
![]() |
![]() |
| classic32 | Right aligned numbers 🟢 99.9% |
![]() |
![]() |
| classic32 | Right aligned numbers 🟢 99.9% |
![]() |
![]() |
| classic33 | Centered text 🟢 99.9% |
![]() |
![]() |
| classic33 | Centered text 🟢 99.9% |
![]() |
![]() |
| classic34 | Explicit column widths 🟢 99.9% |
![]() |
![]() |
| classic34 | Explicit column widths 🟢 99.9% |
![]() |
![]() |
| classic35 | Explicit row heights 🟢 99.5% |
![]() |
![]() |
| classic35 | Explicit row heights 🟢 99.5% |
![]() |
![]() |
| classic36 | Merged cells 🟢 99.9% |
![]() |
![]() |
| classic36 | Merged cells 🟢 99.9% |
![]() |
![]() |
| classic37 | Freeze panes 🟢 99.6% |
![]() |
![]() |
| classic37 | Freeze panes 🟢 99.6% |
![]() |
![]() |
| classic38 | Hyperlink cell 🟢 99.9% |
![]() |
![]() |
| classic38 | Hyperlink cell 🟢 99.9% |
![]() |
![]() |
| classic39 | Financial table 🟢 99.8% |
![]() |
![]() |
| classic39 | Financial table 🟢 99.8% |
![]() |
![]() |
| classic40 | Scientific notation 🟢 99.9% |
![]() |
![]() |
| classic40 | Scientific notation 🟢 99.9% |
![]() |
![]() |
| classic41 | Integer vs float 🟢 99.9% |
![]() |
![]() |
| classic41 | Integer vs float 🟢 99.9% |
![]() |
![]() |
| classic42 | Boolean values 🟢 99.6% |
![]() |
![]() |
| classic42 | Boolean values 🟢 99.6% |
![]() |
![]() |
| classic43 | Inventory report 🟢 99.5% |
![]() |
![]() |
| classic43 | Inventory report 🟢 99.5% |
![]() |
![]() |
| classic44 | Employee roster 🟢 98.0% |
![]() |
![]() |
| classic44 | Employee roster 🟢 98.0% |
![]() |
![]() |
| classic45 | Sales by region 🟢 99.9% |
![]() |
![]() |
| classic45 | Sales by region 🟢 99.9% |
![]() |
![]() |
| classic46 | Grade book 🟢 99.6% |
![]() |
![]() |
| classic46 | Grade book 🟢 99.6% |
![]() |
![]() |
| classic47 | Time series 🟢 99.3% |
![]() |
![]() |
| classic47 | Time series 🟢 99.3% |
![]() |
![]() |
| classic48 | Survey results 🟢 99.6% |
![]() |
![]() |
| classic48 | Survey results 🟢 99.6% |
| classic49 | Contact list 🟢 98.5% |
![]() |
![]() |
| classic49 | Contact list 🟢 98.5% |
![]() |
![]() |
| classic50 | Budget vs actuals 🟢 99.6% |
![]() |
![]() |
| classic50 | Budget vs actuals 🟢 99.6% |
![]() |
![]() |
| classic51 | Product catalog 🟢 98.5% |
![]() |
![]() |
| classic51 | Product catalog 🟢 98.5% |
![]() |
![]() |
| classic52 | Pivot summary 🟢 99.6% |
![]() |
![]() |
| classic52 | Pivot summary 🟢 99.6% |
![]() |
![]() |
| classic53 | Invoice 🟢 99.5% |
![]() |
![]() |
| classic53 | Invoice 🟢 99.5% |
![]() |
![]() |
| classic54 | Multi level header 🟢 99.8% |
![]() |
![]() |
| classic54 | Multi level header 🟢 99.8% |
![]() |
![]() |
| classic55 | Error values 🟢 99.8% |
![]() |
![]() |
| classic55 | Error values 🟢 99.8% |
![]() |
![]() |
| classic56 | Alternating row colors 🟢 99.6% |
![]() |
![]() |
| classic56 | Alternating row colors 🟢 99.6% |
![]() |
![]() |
| classic57 | Cjk only 🟢 91.1% |
![]() |
![]() |
| classic57 | Cjk only 🟢 91.1% |
![]() |
![]() |
| classic58 | Mixed numeric formats 🟢 99.5% |
![]() |
![]() |
| classic58 | Mixed numeric formats 🟢 99.5% |
![]() |
![]() |
| classic59 | Multi sheet summary 🟢 99.9% |
![]() |
![]() |
| classic59 | Multi sheet summary 🟢 99.9% |
![]() |
![]() |
| classic60 | Large wide table 🟢 97.4% |
![]() |
![]() |
| classic60 | Large wide table 🟢 97.4% |
![]() |
![]() |
| classic61 | Product card with image 🟢 99.9% |
![]() |
![]() |
| classic62 | Company logo header 🟢 99.6% |
![]() |
![]() |
| classic63 | Two products side by side 🟢 99.8% |
![]() |
![]() |
| classic64 | Employee directory with photo 🟢 99.1% |
![]() |
![]() |
| classic65 | Inventory with product photos 🟢 99.4% |
![]() |
![]() |
| classic66 | Invoice with logo 🟢 99.2% |
![]() |
![]() |
| classic67 | Real estate listing 🟢 99.8% |
![]() |
![]() |
| classic68 | Restaurant menu 🟢 98.6% |
![]() |
![]() |
| classic69 | Image only sheet 🟢 100.0% |
![]() |
![]() |
| classic70 | Product catalog with images 🟢 99.2% |
![]() |
![]() |
| classic71 | Multi sheet with images 🟢 99.8% |
![]() |
![]() |
| classic72 | Bar chart image with data 🟢 99.5% |
![]() |
![]() |
| classic73 | Event flyer with banner 🟢 99.6% |
![]() |
![]() |
| classic74 | Dashboard with kpi image 🟢 97.9% |
![]() |
![]() |
| classic75 | Certificate with seal 🟢 99.5% |
![]() |
![]() |
| classic76 | Product image grid 🟢 99.7% |
![]() |
![]() |
| classic77 | News article with hero image 🟢 99.6% |
![]() |
![]() |
| classic78 | Small icon per row 🟢 99.2% |
![]() |
![]() |
| classic79 | Wide panoramic banner 🟢 99.8% |
![]() |
![]() |
| classic80 | Portrait tall image 🟢 99.8% |
![]() |
![]() |
| classic81 | Step by step with images 🟢 99.7% |
![]() |
![]() |
| classic82 | Before after images 🟢 99.4% |
![]() |
![]() |
| classic83 | Color swatch palette 🟢 99.4% |
![]() |
![]() |
| classic84 | Travel destination cards 🟢 99.6% |
![]() |
![]() |
| classic85 | Lab results with image 🟢 99.2% |
![]() |
![]() |
| classic86 | Software screenshot features 🟢 98.7% |
![]() |
![]() |
| classic87 | Sports results with logos 🟢 99.8% |
![]() |
![]() |
| classic88 | Image after data 🟢 99.7% |
![]() |
![]() |
| classic89 | Nutrition label with image 🟢 99.5% |
![]() |
![]() |
| classic90 | Project status with milestones 🟢 99.0% |
![]() |
![]() |
| classic91 | Simple bar chart 🟢 96.6% |
![]() |
![]() |
| classic92 | Horizontal bar chart 🟢 96.9% |
![]() |
![]() |
| classic93 | Line chart 🟢 93.2% |
![]() |
![]() |
| classic94 | Pie chart 🟢 97.2% |
![]() |
![]() |
| classic95 | Area chart 🟡 76.4% |
![]() |
![]() |
| classic96 | Scatter chart 🟢 94.8% |
![]() |
![]() |
| classic97 | Doughnut chart 🟢 97.5% |
![]() |
![]() |
| classic98 | Radar chart 🟢 95.1% |
![]() |
![]() |
| classic99 | Bubble chart 🟢 92.0% |
![]() |
![]() |
| classic100 | Stacked bar chart 🟢 95.0% |
![]() |
![]() |
| classic101 | Percent stacked bar 🟢 93.6% |
![]() |
![]() |
| classic102 | Line chart with markers 🟢 93.0% |
![]() |
![]() |
| classic103 | Pie chart with labels 🟡 86.9% |
![]() |
![]() |
| classic104 | Combo bar line chart 🟡 81.6% |
![]() |
![]() |
| classic105 | 3d bar chart 🟡 85.8% |
![]() |
![]() |
| classic106 | 3d pie chart 🟢 96.7% |
![]() |
![]() |
| classic107 | Multi series line 🟡 80.6% |
![]() |
![]() |
| classic108 | Stacked area chart 🟢 94.4% |
![]() |
![]() |
| classic109 | Scatter with trendline 🟢 92.3% |
![]() |
![]() |
| classic110 | Chart with legend 🟡 84.7% |
![]() |
![]() |
| classic111 | Chart with axis labels 🟢 92.1% |
![]() |
![]() |
| classic112 | Multiple charts 🟡 85.4% |
![]() |
![]() |
| classic113 | Chart sheet 🟡 86.4% |
![]() |
![]() |
| classic114 | Chart large dataset 🟢 91.6% |
![]() |
![]() |
| classic115 | Chart negative values 🟢 92.1% |
![]() |
![]() |
| classic116 | Percent stacked area 🟢 93.8% |
![]() |
![]() |
| classic117 | Stock ohlc chart 🟡 80.9% |
![]() |
![]() |
| classic118 | Bar chart custom colors 🟢 95.5% |
![]() |
![]() |
| classic119 | Dashboard multi charts 🟢 92.1% |
![]() |
![]() |
| classic120 | Chart with date axis 🟡 76.1% |
![]() |
![]() |
| classic121 | Thin borders 🟢 99.7% |
![]() |
![]() |
| classic122 | Thick outer thin inner 🟢 99.6% |
![]() |
![]() |
| classic123 | Dashed borders 🟢 99.1% |
![]() |
![]() |
| classic124 | Colored borders 🟢 99.7% |
![]() |
![]() |
| classic125 | Solid fills 🟢 99.2% |
![]() |
![]() |
| classic126 | Dark header 🟢 99.5% |
![]() |
![]() |
| classic127 | Font styles 🟢 99.6% |
![]() |
![]() |
| classic128 | Font sizes 🟢 99.0% |
![]() |
![]() |
| classic129 | Alignment combos 🟢 99.8% |
![]() |
![]() |
| classic130 | Wrap and indent 🟢 99.5% |
![]() |
![]() |
| classic131 | Number formats 🟢 99.6% |
![]() |
![]() |
| classic132 | Striped table 🟢 99.0% |
![]() |
![]() |
| classic133 | Gradient rows 🟢 99.6% |
![]() |
![]() |
| classic134 | Heatmap 🟢 98.8% |
![]() |
![]() |
| classic135 | Bottom border only 🟢 99.8% |
![]() |
![]() |
| classic136 | Financial report styled 🟢 99.3% |
![]() |
![]() |
| classic137 | Checkerboard 🟢 98.4% |
![]() |
![]() |
| classic138 | Color grid 🟢 99.4% |
![]() |
![]() |
| classic139 | Pattern fills 🟢 99.2% |
![]() |
![]() |
| classic140 | Rotated text 🟢 98.1% |
![]() |
![]() |
| classic141 | Mixed edge borders 🟢 99.7% |
![]() |
![]() |
| classic142 | Styled invoice 🟢 98.3% |
![]() |
![]() |
| classic143 | Colored tabs 🟢 100.0% |
![]() |
![]() |
| classic144 | Note style cells 🟢 99.6% |
![]() |
![]() |
| classic145 | Status badges 🟢 99.1% |
![]() |
![]() |
| classic146 | Double border table 🟢 99.6% |
![]() |
![]() |
| classic147 | Multi sheet styled 🟢 99.7% |
![]() |
![]() |
| classic148 | Frozen styled grid 🟢 97.3% |
![]() |
![]() |
| classic149 | Merged styled sections 🟢 98.7% |
![]() |
![]() |
| classic150 | Kitchen sink styles 🟢 97.5% |
![]() |
![]() |
| classic181 | Feedback tracker with images 🟢 99.4% |
| classic182 | Dense long text columns 🟢 96.5% |
![]() |
![]() |
| classic183 | Mixed content grid 🟢 99.4% |
![]() |
![]() |
| classic184 | Wide narrow columns 🟢 98.4% |
![]() |
![]() |
| classic185 | Tall rows vertical align 🟢 99.7% |
![]() |
![]() |
| classic186 | Multi sheet image report 🟢 99.6% |
![]() |
![]() |
| classic187 | Bug report with screenshots 🟢 98.2% |
![]() |
![]() |
| classic188 | Merged header with images 🟢 99.5% |
![]() |
![]() |
| classic189 | Alternating image text rows 🟢 95.3% |
![]() |
![]() |
| classic190 | Dashboard kpi images 🟢 99.5% |
![]() |
![]() |
| classic191 | Payroll calculator 🟡 89.5% |
![]() |
![]() |
授權條款
本專案基於 Apache License 2.0 授權。































































































































































































































































































































































































































































































































































































































































































































































