A minimal, zero-dependency .NET library for generating PDF documents from text and Excel files.
$ dotnet add package MiniPdfA minimal, zero-dependency .NET library for converting office files to PDF.
.xlsx files to paginated PDF with automatic column layoutdotnet add package MiniPdfusing MiniSoftware;
// File to file
MiniPdf.ConvertToPdf("data.xlsx", "data.pdf");
// File to byte array
byte[] pdfBytes = MiniPdf.ConvertToPdf("data.xlsx");
// Stream to byte array
using var stream = File.OpenRead("data.xlsx");
byte[] pdfBytes = MiniPdf.ConvertToPdf(stream);MiniPdf output is compared against LibreOffice as the reference renderer across 120 classic test cases (including 30 image-embedding cases and 30 chart cases).
| Category | Count | Threshold |
|---|---|---|
| 🟢 Excellent | 108 | ≥ 90% |
| 🟡 Acceptable | 11 | 70% – 90% |
| 🔴 Needs Improvement | 1 | < 70% |
Average overall score: 96.5% (text similarity 40% + visual similarity 40% + page count 20%)
All test cases comparing MiniPdf output vs LibreOffice reference. Page 1 shown for multi-page results.
| MiniPdf | LibreOffice (Reference) |
|---|---|
| classic01 | Basic table with headers 🟢 99.8% |
![]() | ![]() |
| classic02 | Multiple worksheets 🟢 99.7% |
![]() | ![]() |
| classic03 | Empty workbook 🟢 100.0% |
![]() | ![]() |
| classic04 | Single cell 🟢 100.0% |
![]() | ![]() |
| classic05 | Wide table 🟢 99.6% |
![]() | ![]() |
| classic06 | Tall table 🟢 97.5% |
![]() | ![]() |
| classic07 | Numbers only 🟢 99.9% |
![]() | ![]() |
| classic08 | Mixed text and numbers 🟢 99.8% |
![]() | ![]() |
| classic09 | Long text 🔴 61.0% |
![]() | ![]() |
| classic10 | Special xml characters 🟢 99.8% |
![]() | ![]() |
| classic11 | Sparse rows 🟢 100.0% |
![]() | ![]() |
| classic12 | Sparse columns 🟢 99.9% |
![]() | ![]() |
| classic13 | Date strings 🟢 99.8% |
![]() | ![]() |
| classic14 | Decimal numbers 🟢 99.8% |
![]() | ![]() |
| classic15 | Negative numbers 🟢 99.8% |
![]() | ![]() |
| classic16 | Percentage strings 🟢 99.8% |
![]() | ![]() |
| classic17 | Currency strings 🟢 99.8% |
![]() | ![]() |
| classic18 | Large dataset 🟢 95.2% |
![]() | ![]() |
| classic19 | Single column list 🟢 99.8% |
![]() | ![]() |
| classic20 | All empty cells 🟢 100.0% |
![]() | ![]() |
| classic21 | Header only 🟢 100.0% |
![]() | ![]() |
| classic22 | Long sheet name 🟢 99.9% |
![]() | ![]() |
| classic23 | Unicode text 🟢 91.8% |
![]() | ![]() |
| classic24 | Red text 🟢 99.7% |
![]() | ![]() |
| classic25 | Multiple colors 🟢 99.6% |
![]() | ![]() |
| classic26 | Inline strings 🟢 99.9% |
![]() | ![]() |
| classic27 | Single row 🟢 99.9% |
![]() | ![]() |
| classic28 | Duplicate values 🟢 99.8% |
![]() | ![]() |
| classic29 | Formula results 🟢 99.8% |
![]() | ![]() |
| classic30 | Mixed empty and filled sheets 🟢 100.0% |
![]() | ![]() |
| classic31 | Bold header row 🟢 99.7% |
![]() | ![]() |
| classic32 | Right aligned numbers 🟢 99.8% |
![]() | ![]() |
| classic33 | Centered text 🟢 99.9% |
![]() | ![]() |
| classic34 | Explicit column widths 🟢 99.7% |
![]() | ![]() |
| classic35 | Explicit row heights 🟢 99.3% |
![]() | ![]() |
| classic36 | Merged cells 🟢 99.7% |
![]() | ![]() |
| classic37 | Freeze panes 🟢 99.4% |
![]() | ![]() |
| classic38 | Hyperlink cell 🟢 99.9% |
![]() | ![]() |
| classic39 | Financial table 🟢 99.6% |
![]() | ![]() |
| classic40 | Scientific notation 🟢 99.2% |
![]() | ![]() |
| classic41 | Integer vs float 🟢 99.8% |
![]() | ![]() |
| classic42 | Boolean values 🟢 99.5% |
![]() | ![]() |
| classic43 | Inventory report 🟢 99.3% |
![]() | ![]() |
| classic44 | Employee roster 🟢 97.8% |
![]() | ![]() |
| classic45 | Sales by region 🟢 99.8% |
![]() | ![]() |
| classic46 | Grade book 🟢 99.5% |
![]() | ![]() |
| classic47 | Time series 🟢 99.0% |
![]() | ![]() |
| classic48 | Survey results 🟢 99.2% |
![]() | ![]() |
| classic49 | Contact list 🟢 98.6% |
![]() | ![]() |
| classic50 | Budget vs actuals 🟢 99.3% |
![]() | ![]() |
| classic51 | Product catalog 🟢 98.4% |
![]() | ![]() |
| classic52 | Pivot summary 🟢 99.3% |
![]() | ![]() |
| classic53 | Invoice 🟢 99.3% |
![]() | ![]() |
| classic54 | Multi level header 🟢 99.5% |
![]() | ![]() |
| classic55 | Error values 🟢 99.7% |
![]() | ![]() |
| classic56 | Alternating row colors 🟢 99.5% |
![]() | ![]() |
| classic57 | Cjk only 🟡 85.2% |
![]() | ![]() |
| classic58 | Mixed numeric formats 🟢 99.3% |
![]() | ![]() |
| classic59 | Multi sheet summary 🟢 99.8% |
![]() | ![]() |
| classic60 | Large wide table 🟢 96.9% |
![]() | ![]() |
| classic61 | Product card with image 🟢 99.6% |
![]() | ![]() |
| classic62 | Company logo header 🟢 99.5% |
![]() | ![]() |
| classic63 | Two products side by side 🟢 99.7% |
![]() | ![]() |
| classic64 | Employee directory with photo 🟢 98.2% |
![]() | ![]() |
| classic65 | Inventory with product photos 🟢 98.1% |
![]() | ![]() |
| classic66 | Invoice with logo 🟢 98.8% |
![]() | ![]() |
| classic67 | Real estate listing 🟢 99.7% |
![]() | ![]() |
| classic68 | Restaurant menu 🟢 97.1% |
![]() | ![]() |
| classic69 | Image only sheet 🟢 99.9% |
![]() | ![]() |
| classic70 | Product catalog with images 🟢 97.7% |
![]() | ![]() |
| classic71 | Multi sheet with images 🟢 99.7% |
![]() | ![]() |
| classic72 | Bar chart image with data 🟢 99.3% |
![]() | ![]() |
| classic73 | Event flyer with banner 🟢 99.3% |
![]() | ![]() |
| classic74 | Dashboard with kpi image 🟢 97.7% |
![]() | ![]() |
| classic75 | Certificate with seal 🟢 99.4% |
![]() | ![]() |
| classic76 | Product image grid 🟢 99.4% |
![]() | ![]() |
| classic77 | News article with hero image 🟢 99.1% |
![]() | ![]() |
| classic78 | Small icon per row 🟢 98.8% |
| classic79 | Wide panoramic banner 🟢 99.6% |
![]() | ![]() |
| classic80 | Portrait tall image 🟢 99.6% |
![]() | ![]() |
| classic81 | Step by step with images 🟢 98.3% |
![]() | ![]() |
| classic82 | Before after images 🟢 99.5% |
![]() | ![]() |
| classic83 | Color swatch palette 🟢 98.3% |
![]() | ![]() |
| classic84 | Travel destination cards 🟢 97.4% |
![]() | ![]() |
| classic85 | Lab results with image 🟢 99.2% |
![]() | ![]() |
| classic86 | Software screenshot features 🟢 98.6% |
![]() | ![]() |
| classic87 | Sports results with logos 🟢 99.5% |
![]() | ![]() |
| classic88 | Image after data 🟢 99.5% |
![]() | ![]() |
| classic89 | Nutrition label with image 🟢 99.3% |
![]() | ![]() |
| classic90 | Project status with milestones 🟢 97.3% |
![]() | ![]() |
| classic91 | Simple bar chart 🟢 96.8% |
![]() | ![]() |
| classic92 | Horizontal bar chart 🟢 97.1% |
![]() | ![]() |
| classic93 | Line chart 🟢 94.4% |
![]() | ![]() |
| classic94 | Pie chart 🟢 97.3% |
![]() | ![]() |
| classic95 | Area chart 🟡 77.6% |
![]() | ![]() |
| classic96 | Scatter chart 🟢 91.7% |
![]() | ![]() |
| classic97 | Doughnut chart 🟢 97.5% |
![]() | ![]() |
| classic98 | Radar chart 🟢 95.3% |
![]() | ![]() |
| classic99 | Bubble chart 🟢 91.5% |
![]() | ![]() |
| classic100 | Stacked bar chart 🟢 93.9% |
![]() | ![]() |
| classic101 | Percent stacked bar 🟢 92.2% |
![]() | ![]() |
| classic102 | Line chart with markers 🟢 93.5% |
![]() | ![]() |
| classic103 | Pie chart with labels 🟡 85.6% |
![]() | ![]() |
| classic104 | Combo bar line chart 🟡 81.6% |
![]() | ![]() |
| classic105 | 3d bar chart 🟡 85.0% |
![]() | ![]() |
| classic106 | 3d pie chart 🟢 97.0% |
![]() | ![]() |
| classic107 | Multi series line 🟡 82.7% |
![]() | ![]() |
| classic108 | Stacked area chart 🟢 93.0% |
![]() | ![]() |
| classic109 | Scatter with trendline 🟢 91.0% |
![]() | ![]() |
| classic110 | Chart with legend 🟡 83.2% |
![]() | ![]() |
| classic111 | Chart with axis labels 🟢 92.1% |
![]() | ![]() |
| classic112 | Multiple charts 🟡 85.7% |
![]() | ![]() |
| classic113 | Chart sheet 🟡 86.3% |
![]() | ![]() |
| classic114 | Chart large dataset 🟢 92.3% |
![]() | ![]() |
| classic115 | Chart negative values 🟢 93.4% |
![]() | ![]() |
| classic116 | Percent stacked area 🟢 92.4% |
![]() | ![]() |
| classic117 | Stock ohlc chart 🟡 79.8% |
![]() | ![]() |
| classic118 | Bar chart custom colors 🟢 96.7% |
![]() | ![]() |
| classic119 | Dashboard multi charts 🟢 93.9% |
![]() | ![]() |
| classic120 | Chart with date axis 🟡 76.1% |
![]() | ![]() |
This project is licensed under the Apache License 2.0.