1. Products
  2.   PDF
  3.   Rust
  4.   pdfcraft

pdfcraft

 
 

Open Source PDF Reader & Editor in Pure Rust

Read, Organize, Combine, Split & Secure PDFs on macOS, Windows, Linux, FreeBSD & Web.

What is pdfcraft?

PdfCraft is a modern, open-source PDF reader and editor written entirely in pure Rust from the ground up. It delivers a fast, native experience across macOS, Windows, Linux, FreeBSD, and the web via WebAssembly. Designed for reliability and privacy, PdfCraft renders complex PDFs faithfully—supporting world scripts, vertical CJK, color emoji, transparency, and soft masks—while preserving original bytes during edits. Its engine, CLI, and GUI are all open source, with no telemetry, no account, and no cloud processing.

PdfCraft focuses on real-world typography and robustness: every page renders in isolation, damaged documents are repaired, and all operations are atomic with deep undo. It supports full PDF security standards, interactive forms, threaded comments, layers, attachments, and OCR with Tesseract integration. Whether you're reading, annotating, organizing, or scripting workflows, PdfCraft provides a consistent, high-fidelity experience. Built as a layered Cargo workspace, its core crates are reusable and thoroughly tested, ensuring stability and correctness across all frontends.

Previous Next

Getting Started with pdfcraft

Install PdfCraft from the official website or build it from source using Rust 1.95+. Clone the pdfcraft repository, fetch OCR models, and run the desktop app or CLI. The engine, CLI, and GUI are all open source, with no telemetry or account required. For quick testing, use prebuilt binaries for macOS, Windows, Linux (AppImage, Flatpak, .deb, .rpm), FreeBSD, and WebAssembly.

Install PdfCraft via Cargo or Prebuilt Binaries

# Build from source
git clone https://github.com/storytold/pdfcraft
cd pdfcraft
cargo xtask models
cargo run --release -p pdfcraft -- some.pdf

# Or download prebuilt binaries from GitHub Releases
# https://github.com/storytold/pdfcraft/releases

Read Anything, Beautifully

PdfCraft renders PDFs with deep fidelity: real-world typography, world scripts, vertical CJK, color emoji, gradients, soft masks, and blend modes. It renders large pages in tiles for crisp zoom, repairs damaged documents on the fly, and supports multiple layout modes (continuous, single page, two-up, full screen, Read mode). With zero crashes on the 983-file pdf.js test corpus, PdfCraft ensures reliability. Light and dark themes are designed for long sessions, and search, selection, and copy work correctly across columns, RTL, and CJK.

Open a PDF and Enable Two-Page View via CLI

# Open in two-page view (noncontinuous)
pdfcraft --two-paged document.pdf

# Or use the desktop app and toggle layout from View menu

Organize Pages Like Cards on a Table

PdfCraft’s Organize Pages view lets you select, rotate, delete, insert blank pages, insert pages from other files, and reorder pages with drag-and-drop. Changes are undoable with deep history, and saves are incremental and atomic—original bytes remain untouched. The UI supports multi-page selection, undo naming ("Undo Rotate pages"), and autosave every minute. Encrypted documents stay encrypted on disk, and unexpected quits recover unsaved work. Page thumbnails, bookmarks, and page labels (i, ii, 1, 2…) keep you oriented in long documents.

Combine Multiple PDFs into One Document

# Combine files with bookmarks for each source
pdfcraft-cli combine report.pdf appendix.pdf --out combined.pdf

# Or use the desktop UI: File → Combine files

Forms, Comments, Layers & Attachments

PdfCraft fully supports interactive forms: checkboxes, radio buttons, lists, signatures, and field highlighting. Comments appear as threaded conversations with replies, status, and edits. Layers (optional content) toggle instantly, and attachments can be opened or saved. The Inspector panels list all fields, comments, and layers with current values and metadata. Edits to forms regenerate appearances, and Clear form resets all fields. Attachments are preserved during combine, extract, and split operations.

Fill a Form Field and Add a Comment via CLI

# Fill a text field
pdfcraft-cli run --script fill_form.json

# Example fill_form.json:
# {"tool":"form_fill","field":"Name","value":"Alice"}

# Add a highlight comment
pdfcraft-cli run --script comment.json
# {"tool":"comment_add","type":"highlight","find":"total due"}

Built for Agents & Automation

PdfCraft is designed for scripting and AI agents. Every engine feature is exposed through a JSON-Schema tool table accessible via `pdfcraft-cli run`, an MCP server (opt-in, no network port), or the Rust API. The CLI supports inspecting, rendering pages to PNG, extracting text, editing, combining, extracting pages, splitting, and more. With `--root`, file access is confined to one directory. Agents can drive the desktop app itself via a control channel, sending clicks, typing, commands, and screenshots—ideal for testing or integration.

Run a Scripted Workflow with pdfcraft-cli

# List all tools and their schemas
pdfcraft-cli tools

# Run a single tool call
pdfcraft-cli run text_find doc=1 query=invoice

# Run a multi-step script
pdfcraft-cli run --script steps.json --root ./work

# Enable MCP for AI agents (opt-in)
pdfcraft-cli mcp --root /path/to/pdfs
 English