minpdf
Ultra fast, zero depedency, portable pdf engine written in C for JS/TS, client browser, Python, Golang and more.
Documentation · Installation · API · Roadmap · Contributing
The bindings use the same PDF engine and follow the same API. The library has no third-party runtime dependencies.
Installation
JavaScript and TypeScript
npm install minpdf
Node.js 18+, Bun, modern browsers, workers, and ESM bundlers are supported.
Python
python -m pip install minpdf-core
Go
go get github.com/actiledev/minpdf
The Go package uses cgo and requires CGO_ENABLED=1 and a C compiler.
C and C++
Copy include/minpdf.h into your project and define MINPDF_IMPLEMENTATION in one C translation unit, or compile core.c as a library.
cc -std=c11 -O2 app.c -o app
See the installation guide for more details.
Example
import { PDF, SIZES, rgb } from "minpdf";
const doc = await PDF.create(SIZES.A4);
try {
doc
.metadata({ title: "Hello minpdf", author: "minpdf" })
.text("Hello, PDF!", 50, 55, { size: 24, weight: "bold" })
.rect(50, 85, 240, 70, {
fill: rgb(52, 152, 219),
radius: 10,
});
await doc.save("hello.pdf");
} finally {
doc.close();
}
Examples for other targets:
Features
- PDF 1.4 output
- A3, A4, A5, Letter, and custom page sizes
- Text alignment and word wrapping
- Built-in Helvetica fonts and embedded TrueType fonts
- UTF-8 text with searchable Unicode maps
- Rectangles, circles, lines, and simple tables
- JPEG and non-interlaced 8-bit PNG images
- Links, metadata, and multiple pages
- File output, in-memory bytes, browser blobs, and downloads
minpdf creates new PDFs. It does not read, edit, merge, encrypt, sign, or render existing PDFs. See the roadmap for planned work.
Documentation
- Documentation index
- Core concepts
- Shared API
- Text and fonts
- Images
- Tables
- Output and errors
- Performance and development
Contributing
Read CONTRIBUTING.md before opening a pull request. This project uses the Contributor Covenant. Report vulnerabilities as described in SECURITY.md.
Licensed under the MIT License.
Metadata
Release files for minpdf-core 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| minpdf_core-0.1.0.tar.gz | 22.5 kB | Without provenance | Details for minpdf_core-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| minpdf_core-0.1.0-cp39-abi3-macosx_10_15_universal2.whl | CPython 3.9 | abi3 | macOS 10.15+ universal2 (ARM64, x86-64) | Details for minpdf_core-0.1.0-cp39-abi3-macosx_10_15_universal2.whl |
Total release size: 84.9 kB
Release files / minpdf_core-0.1.0.tar.gz
| Download URL | minpdf_core-0.1.0.tar.gz |
|---|---|
| Size | 22.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
34c0f769b5aebdec33c2087ce11c37e5ff00f79eb736428f17d8a58c687bf690
|
|
BLAKE2b-256 checksum How to use checksums |
e1cb3c899b634b0be3cf3b0640ea833cfa79d4891b1cac379ce862efd5fe5b69
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Release files / minpdf_core-0.1.0-cp39-abi3-macosx_10_15_universal2.whl
| Download URL | minpdf_core-0.1.0-cp39-abi3-macosx_10_15_universal2.whl |
|---|---|
| Size | 62.3 kB |
| Tags | CPython 3.9 abi3 macOS 10.15+ universal2 (ARM64, x86-64) |
|
SHA-256 checksum How to use checksums |
154b1d4471183712d8c438f16318c9e0a595f5f94dd781934605313cc4428733
|
|
BLAKE2b-256 checksum How to use checksums |
9ba1f9401533cceb9309baaeb3e0b234c8b18f2d59614876b6cb4cb1db711914
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.6
|
Security for minpdf-core 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.