Lightweight Office-to-PDF libraries and command-line tools for .NET, Rust, Java, Python, Node.js, and Go.
English | 简体中文 | 繁體中文 | 日本語 | 한국어 | Italiano | Français
Online Demo · Releases · Report an issue
Your star or donation helps sustain the project.
🤝 Looking for co-developers: Quick contribution
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.
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.
<dependency>
<groupId>io.github.mini-software</groupId>
<artifactId>minipdf</artifactId>
<version>0.2.0</version>
</dependency>Maven group IDs may contain hyphens, but Java package names may not. Therefore,
the dependency uses io.github.mini-software, while imports use
io.github.minisoftware.minipdf.
import io.github.minisoftware.minipdf.MiniPdf;
import java.nio.file.Files;
import java.nio.file.Path;
try {
MiniPdf.registerFont(
"Noto Sans",
Files.readAllBytes(Path.of("fonts/NotoSans-Regular.ttf")));
MiniPdf.convertToPdf(Path.of("report.docx"), Path.of("report.pdf"));
} finally {
MiniPdf.clearRegisteredFonts();
}Registered fonts are used by DOCX, XLSX, and PPTX conversion. Registrations are process-wide; clear them before configuring a different font set.
pip install minipdfimport minipdf
minipdf.convert_to_pdf("report.docx", "report.pdf")The Python guide lists the current DOCX feature scope and CLI options.
npm install minipdfconst minipdf = require('minipdf')
minipdf.convertToPdf('report.docx', 'report.pdf')The Node.js guide covers in-memory conversion, page sizing, font registration, and supported native platforms.
go get github.com/mini-software/MiniPdf/minipdf-go@latestimport minipdf "github.com/mini-software/MiniPdf/minipdf-go"
if err := minipdf.ConvertToPDF("report.docx", "report.pdf"); err != nil {
panic(err)
}The Go guide documents the package, native CLI, current rendering scope, and release tags.
- 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.
- Multiple language options: use MiniPdf from .NET, Rust, Java, Python, Node.js, or Go.
- Native command-line options: available for .NET, Rust, Java, Python, and Go.
- 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 any coding agent, then paste this prompt into the agent chat:
Run the minipdf-contribution skill.
Apache License 2.0. Commercial use is welcome; retain the required notices and attribution.