Lightweight Office-to-PDF libraries and command-line tools for .NET and Rust.
English | 简体中文 | 繁體中文 | 日本語 | 한국어 | Italiano | Français
Online Demo · Releases · Report an issue
Your star or donation helps sustain the project.
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 | |
|---|---|---|
| Inputs | XLSX, DOCX, PPTX | XLSX, DOCX |
| Interfaces | .NET library, CLI, standalone Native AOT binaries | Rust crate, CLI |
| Documentation | Open the .NET guide | Open the Rust guide |
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, 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 easiest way to contribute is to paste this prompt into the agent chat:
Read CONTRIBUTING.md and run the MiniPdf contribution loop for dotnet from start to finish. Diagnose and improve the automatically selected benchmark cases, validate all changes, and prepare the pull request. Do not commit, push, fork, or open a pull request without my explicit approval.
Replace dotnet with rust to work on the Rust implementation. The universal
PowerShell entry points are:
.\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 |
| Community governance | Decisions, roles, voting, and maintainer selection |
| Roadmap | Project scope, implementation status, and current priorities |
| Security | Private vulnerability reporting and supported versions |
| Contributing | Development setup, tests, reviews, and provenance requirements |
| 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.