Skip to content

Latest commit

History

2 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

VibePDF.github.io

VibePDF

The safest Rust-native PDF 2.0 toolkit for parsing, validating, extracting, and generating modern PDFs.

VibePDF is a pure-Rust PDF library built from the ground up for safety, correctness, and the modern PDF 2.0 era. No C dependencies. No unsafe code in production crates.

⚠️Status: Pre-alpha (64 passed phases; 169 registered phase specifications; 4840 recorded verified phase tests). The API is still stabilizing and requires evaluation before production use.

These figures are generated from .vibepdf/phase-registry.toml; run cargo xtask docs generate after an approved registry change.


Quick Start

use vibepdf_core::{ObjectId,PdfDocument,PdfObject};fnmain() -> Result<(),Box<dyn std::error::Error>>{letmut document = PdfDocument::new();let title_id = ObjectId::new(1,0);
document.objects.insert(
title_id,PdfObject::LiteralString(b"Hello from VibePDF".to_vec()),);println!("{}", document.get_object(title_id).unwrap().type_name());Ok(())}

The snippet is compile-checked by cargo check -p vibepdf-core --example readme_quickstart. For complete PDF-writing examples, run a phase demo below.

For complete working examples, run any phase demo:

cargo run -p vibepdf-core --example phase_019_demo # View metadata demo
cargo run -p vibepdf-annot --example phase_018_demo # Annotations demo: 28 annotation subtypes (ISO 32000-2 Table 171)
cargo run -p vibepdf-forms --example phase_017_demo # AcroForm fields with appearance streams

Feature Matrix

Core PDF (ISO 32000-2)

FeatureStatusTestsPhase
PdfObject enum + object model (11 variants)148001
Lexer / Tokenizer143002
XRef tables + streams + hybrid96003
Stream filters (Flate, LZW, ASCII85, etc.)63003a
Document parser + page tree47004
PDF writer / serializer61005
Incremental save (append-only)80005a
Content stream operators (90+)163006
Content normalizer + JSON export70006a
Path builder + stroke/fill130007
PDF/A-1b validation🚧023
CCITTFax decode⚠️ (stub)003a
JBIG2 decode⚠️ (stub)003a
Lazy/streaming parser041a
Linearization (Fast Web View)062

Fonts & Text

FeatureStatusTestsPhase
Standard 14 fonts (AFM metrics)122008
TrueType/OpenType table parsing107009
Font subsetting (CIDFont Type2)80010
Text shaping + layout (rustybuzz, cosmic-text)140011
Complex scripts (Arabic, Hebrew, Devanagari, CJK)120012
Text extraction pipeline (6 stages)200012a
Text converters (Markdown/HTML/PlainText)110012b

Graphics & Color

FeatureStatusTestsPhase
12 color spaces + ICC profiles127013
7 shading types + Type 4 functions127013
Image formats (JPEG, PNG, TIFF, WebP, JPEG2000)81014
Image masks + inline images81014
Blend modes + transparency groups183015
SVG→PDF conversion (usvg/resvg)86016

Forms & Annotations

FeatureStatusTestsPhase
AcroForm (text, checkbox, radio, dropdown)145017
FDF/XFDF import/export60017a
Legacy XFA→AcroForm conversion (PDF 2.0 deprecated; read/convert only)68017b
AcroForm JS calculator48017c
28 annotation subtypes (ISO 32000-2 §12.5, Table 171)156018

Metadata & Document Structure

FeatureStatusTestsPhase
Page structure (catalog, pages, page tree)87019
XMP metadata (Dublin Core + PDF + xmp)87019
Legacy DocumentInfo compatibility (deprecated in PDF 2.0 except dates)87019

Current / Future Phases

FeatureStatusPhase
Outlines / Bookmarks020
Tagged PDF / PDF/UA (accessibility)021–022
PDF/A validation (2b, 3b, 4)023–024
PDF/X validation (print)025
Digital signatures (PAdES)026–027
Encryption (AES/R2-R6 compatibility; legacy RC4 read/decrypt)028
Redaction029
Charts (151 types)030–031
Barcodes (QR, DataMatrix, Code128)032
Math typesetting (LaTeX→PDF)033
AI document understanding034–036
HTML→PDF037
DOCX/XLSX/CSV→PDF038
CLI tool044
WASM build046
Python/Node.js bindings047–048
C FFI049

Architecture

VibePDF is organized into 14 component crates:

vibepdf-core — Parser, writer, XRef, filters, content streams, document model
vibepdf-fonts — Font loading, TTF/OTF parsing, text shaping, layout, subsetting
vibepdf-text — Text extraction, CMap resolution, reading order, converters
vibepdf-render — Compositing, blend modes, graphics state, stroke/fill
vibepdf-color — Color spaces, ICC profiles, shading, device-N, functions
vibepdf-images — JPEG/PNG/TIFF/WebP/JPEG2000 decode/encode, masks
vibepdf-forms — AcroForm, FDF/XFDF, legacy XFA conversion, JS calculation engine
vibepdf-annot — 28 annotation types per ISO 32000-2 Table 171 (§12.5)
vibepdf-crypto — PDF encryption/decryption, permissions, crypt filters
vibepdf-meta — Tagged PDF, XMP, structure-tree support
vibepdf-pdfua — PDF/UA-1 and PDF/UA-2 validation helpers
vibepdf-svg — SVG→PDF conversion via usvg/resvg
vibepdf-charts — Chart, diagram, and data-visualization primitives
vibepdf-test-harness — Verification pipeline, vision gates, cross-renderer checks

Crate dependencies flow in one direction: specialized crates depend on vibepdf-core, never the reverse (in production builds).


Development Status

MetricValue
Phase status and test evidenceGenerated from .vibepdf/phase-registry.toml
Rust source files and LOCIntentionally not hand-maintained; inspect the current source tree
Component crates14
Unsafe code blocks0 in production crates
ISO 32000-2 citations740

Verification Pipeline

Every phase demo goes through a 6-layer verification pipeline:

  1. Rust assertions — unit + integration tests
  2. Structural checks — qpdf + pdfcpu validation
  3. Content fidelity — pdftotext, pdfinfo, pdffonts
  4. Cross-renderer — pdfium vs Ghostscript vs pdftocairo
  5. Round-trip — binary comparison + structural reconstruction
  6. Multimodal vision gate — the multimodal model (e.g., MiniMax-M3, MiMo-V2.5-Pro) uses its own native vision via the read tool to analyze rendered screenshots. No paid ai-vision MCP / Gemini API call.

Getting Started

Prerequisites

  • Rust 1.96+
  • For verification: qpdf, pdfcpu (optional, enhances validation)

Build & Test

git clone https://github.com/your-org/vibepdf.git
cd vibepdf
cargo build
cargo test --workspace

Run a Demo

cargo run -p vibepdf-core --example phase_019_demo
# Generates output/phase_019_demo.pdf with metadata

Run Full Verification

cargo test -p vibepdf-test-harness --test render_demos -- --nocapture

Project Status & Roadmap

VibePDF follows a phase-based development plan with 80+ planned phases/sub-phases covering the full ISO 32000-2 (PDF 2.0) specification plus modern additions (AI integration, WASM, language bindings).

QuarterMilestone
Q2 2026Core engine complete (Phases 001–025)
Q3 2026PDF/A, signatures, encryption (Phases 026–040)
Q4 2026Charts, AI, conversion (Phases 041–060)
2027Language bindings, CLI, v1.0 release

Why VibePDF?

LibraryLanguageUnsafe CodePDF 2.0Complex ScriptsFormsSignatures
VibePDFRustNone in prod cratesPartial (pre-alpha; see generated status)Yes (Phase 012)Partial (AcroForm + legacy XFA conversion)Planned (Phase 026–027)
lopdfRustSomePartialNoNoNo
pdf-rsRustSomePartialNoNoNo
MuPDFCYesYesYesYesYes
PopplerC++YesPartialYesYesVerify only
iTextJava/C#N/AYesPartialYesYes

Honest pre-alpha disclaimer: Cells claiming "Yes" or "Partial" for VibePDF reflect completed phase scope, not the full ISO 32000-2 surface. PDF/A, PDF/X, signatures, and many advanced/integration phases are still pending; PDF/UA and encryption need continued hardening and corpus validation.


License

VibePDF is distributed under the VibePDF Community and Commercial License. Community use is free for individuals, nonprofits, open-source projects, education/evaluation, and companies under USD 1,000,000 annual gross revenue. Companies at or above that threshold need a Professional, Enterprise, or Premier commercial license for production use.

VibePDF is source-available commercial software. It is not OSI-approved open source. It is not plain MIT or Apache-2.0 software. Third-party components remain under their own permissive licenses and are listed in THIRD-PARTY-NOTICES.md. GPL/AGPL/LGPL code is not linked into or distributed with production VibePDF.

About

Official website & docs for VibePDF — the clean-room Rust + WASM PDF engine. ISO 32000-2 compliant, zero GPL dependencies, MIT licensed. Created by Surya Code Labs.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Contributors