Skip to content

Latest commit

 

History

449 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MiniPdf

Lightweight Office-to-PDF libraries and command-line tools for .NET, Rust, Java, Python, Node.js, and Go.

NuGet crates.io Maven Central PyPI npm Go Reference GitHub stars DOI License

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.

Choose an implementation

Implementation Inputs Interfaces Maturity Documentation
.NET XLSX, DOCX, PPTX Library, CLI, Native AOT binaries Stable .NET guide
Rust XLSX, DOCX, PPTX Crate, CLI Experimental Rust guide
Java XLSX, DOCX Library, CLI Experimental Java source
Python DOCX Package, CLI Experimental Python guide
Node.js XLSX, DOCX, PPTX Native package Experimental Node.js guide
Go XLSX, DOCX, PPTX Package, CLI Experimental Go guide

Quick start

.NET

dotnet add package MiniPdf
using MiniSoftware;

MiniPdf.ConvertToPdf("report.docx", "report.pdf");

Prefer a command-line tool?

dotnet tool install --global MiniPdf.Cli
minipdf report.docx -o report.pdf

The .NET guide covers conversion, custom fonts, CLI options, and deployment.

Rust

cargo add minipdf
cargo install minipdf-cli
minipdf::convert_to_pdf("report.docx", "report.pdf")?;
minipdf report.docx -o report.pdf

The Rust guide documents the crate API, CLI, supported features, known gaps, and development workflow.

Java

<dependency>
	<groupId>io.github.shps951023</groupId>
	<artifactId>minipdf</artifactId>
	<version>0.1.0</version>
</dependency>
import io.github.minisoftware.minipdf.MiniPdf;
import java.nio.file.Path;

MiniPdf.convertToPdf(Path.of("report.docx"), Path.of("report.pdf"));

Python

pip install minipdf
import minipdf

minipdf.convert_to_pdf("report.docx", "report.pdf")

The Python guide lists the current DOCX feature scope and CLI options.

Node.js

npm install minipdf
const 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

go get github.com/mini-software/MiniPdf/minipdf-go@latest
import 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.

Why MiniPdf

  • 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.

Contribute compute time

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 from start to finish. Detect the installed supported language toolchains, randomly choose one available implementation, 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.

The universal PowerShell entry point detects dotnet and cargo, then randomly chooses one of the installed implementations:

.\scripts\Invoke-MiniPdfContributionLoop.ps1 -Action Start

Pass -Implementation dotnet or -Implementation rust to override the random choice. The selected implementation is stored for every later action in the run.

The 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.

Project resources

Resource Description
Online demo Try conversion in a browser
.NET documentation Stable library and CLI usage
Rust documentation Experimental crate and CLI usage
Java implementation Experimental Maven library and CLI source
Python documentation Experimental package and CLI usage
Node.js documentation Experimental native package usage
Go documentation Experimental package 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

License

Apache License 2.0. Commercial use is welcome; retain the required notices and attribution.

About

Lightweight Office-to-PDF libraries and command-line tools for Rust and .NET.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

434 stars

Watchers

3 watching

Forks

Releases

Sponsor this project

Contributors

Languages