Lightweight Office-to-PDF libraries and command-line tools for .NET and Rust.
MiniPdf converts Office documents directly to PDF without Microsoft Office, LibreOffice, Adobe Acrobat, or COM automation at runtime. Choose the implementation that matches your project.
| .NET | Rust | |
|---|---|---|
| Status | Stable, full implementation | Experimental, under active development |
| Inputs | XLSX, DOCX, PPTX, PDF merge | XLSX, DOCX |
| Interfaces | .NET library, CLI, standalone Native AOT binaries | Rust crate, CLI |
| Content extraction | Markdown, JSON, semantic .NET model | Not yet available |
| Documentation | Open the .NET guide | Open the Rust guide |
For production use and the broadest document support, start with .NET. Choose Rust when you want a native Rust dependency and can work within its current conversion scope.
dotnet add package MiniPdfusing MiniSoftware;
MiniPdf.ConvertToPdf("report.docx", "report.pdf");Prefer a command-line tool?
dotnet tool install --global MiniPdf.Cli
minipdf report.docx -o report.pdfThe .NET guide covers conversion, content extraction, PDF merge, custom fonts, CLI options, and deployment.
cargo add minipdf
cargo install minipdf-climinipdf::convert_to_pdf("report.docx", "report.pdf")?;minipdf report.docx -o report.pdfThe Rust guide documents the crate API, CLI, supported features, known gaps, and development workflow.
- No office suite required: conversion runs inside your application or CLI.
- Small deployment surface: minimal dependencies and no external process.
- Server and CI friendly: works in containers, cloud services, and pipelines.
- Native command-line options: .NET Native AOT releases and a Rust CLI.
- Open development: Apache 2.0 licensed with reproducible visual benchmarks.
MiniPdf targets practical document conversion, not complete Microsoft Office layout compatibility. Complex templates may render differently; use the online demo or benchmark reports to evaluate representative files.
Open a clean fork or clone in GitHub Copilot, Claude Code, Cursor, Codex, or any coding agent that can edit files and run PowerShell. The universal entry point is:
.\scripts\Invoke-MiniPdfContributionLoop.ps1 -Action Start -Implementation dotnet
.\scripts\Invoke-MiniPdfContributionLoop.ps1 -Action Start -Implementation rustThe contribution loop checks the toolchain, installs benchmark Python packages, creates a local branch, and selects the chosen renderer's two lowest-scoring visual differences. The agent gets up to three attempts per case; an attempt that does not improve the score is automatically rolled back before moving on. Accepted changes must pass that implementation's full test suite and XLSX/DOCX visual benchmarks without a meaningful regression before a pull request is allowed.
Both paths require Git, Python 3.10+, and LibreOffice. Choose .NET with the .NET 9 SDK, or Rust with Cargo plus desktop Excel and Word for its current primary visual references. The workflow checks whether authenticated GitHub CLI is available; if it is not, it generates the PR title, body, push command, and browser URL instead. See the contribution guide for Copilot, Claude Code, Cursor, Codex, terminal shortcuts, and safety rules. The workflow never commits, pushes, or opens a PR without your approval.
| Resource | Description |
|---|---|
| Online demo | Try conversion in a browser |
| .NET documentation | Stable library and CLI usage |
| Rust documentation | Experimental crate and CLI usage |
| .NET XLSX benchmark | Visual comparison results for spreadsheets |
| .NET DOCX benchmark | Visual comparison results for documents |
| Rust XLSX benchmark | Rust spreadsheet visual comparison results |
| Rust DOCX benchmark | Rust document visual comparison results |
| Rust benchmark workflow | Generate fixture coverage and comparison reports |
| GitHub releases | Packages and standalone binaries |
| Issues | Bugs, compatibility reports, and feature requests |
Apache License 2.0. Commercial use is welcome; retain the required notices and attribution.