talira

Compare

lopdfpdfium-renderpdf-rspdf-writer
What it isA Rust library for PDF document manipulation.A high-level idiomatic Rust wrapper around Pdfium, the C++ PDF library used by the Google Chromium project.Rust library to read, manipulate and write PDF files.A step-by-step PDF writer.
KindOpen sourceOpen sourceOpen sourceOpen source
Trust0.230.230.150.27
Stars————
Last commit————
LicenceMITMIT OR Apache-2.0MITMIT OR Apache-2.0
PricingFree and open sourceFree and open sourceFree and open sourceFree and open source
Free tierYesYesYesYes
Self-hostableYesYesYesYes
Ways to run it————
SOC 2————
HIPAA————
SSO————
API————
Plugins————
MCP server————
Company———Typst
Features
  • load, edit and save PDF documents as an object model
  • create PDFs from scratch with a dictionary! macro and content operations
  • object streams and cross-reference streams (PDF 1.5+), reading and writing
  • decryption (automatic for empty passwords) and encryption
  • text extraction from pages
  • delete pages, prune and renumber objects, compress and decompress streams
  • bookmarks, outlines, destinations and table of contents
  • incremental updates through IncrementalDocument
  • All 10 features
  • render pages, or portions of pages, to bitmaps and image crate images
  • text and image extraction
  • form field introspection and filling
  • signature, attachment, annotation and link introspection
  • document concatenation and watermarking
  • create documents, pages, and text, path and bitmap page objects
  • custom fonts and custom text shaping inside a text object
  • binds to Pdfium at runtime (dynamic) or links it statically
  • All 11 features
  • typed views of PDF objects: catalog, pages, fonts, XObjects, colour spaces, annotations, forms, structure tree
  • content streams decoded into an Op enum
  • lazy object resolution and stream decoding, with optional caching and memory mapping
  • stream filters and predictors
  • RC4 and AES decryption with the standard security handler
  • strict and tolerant parsing modes, with an object size limit against decompression bombs
  • cross-reference tables and streams, object streams and incremental updates
  • building a document from scratch and importing objects into it
  • All 9 features
  • strongly typed writers for pages, fonts, images, annotations, actions and more
  • content stream builder for PDF drawing and text operators
  • interactive form fields (AcroForm), including signature fields and seed values
  • tagged PDF: structure tree, role maps, marked content and attributes
  • Type 0, CID, Type 1 and Type 3 fonts, CMaps, widths and font descriptors
  • colour spaces: ICC profiles, Separation, DeviceN, shading and tiling patterns, output intents
  • embedded files, outlines, page labels, name and number trees, transitions and renditions
  • chunks that can be written separately and renumbered
  • All 10 features
Limitations
  • Doesn't stream large PDFs: it keeps the whole document in memory as objects until it saves the file
  • May not decrypt every encrypted PDF: some encryption algorithms aren't fully supported, and only empty passwords open automatically
  • Doesn't include or build Pdfium: you supply a prebuilt Pdfium library to bind at runtime or link statically
  • Doesn't speed anything up with threads: every call into Pdfium is serialized behind a mutex, so use separate processes for parallel work
  • Doesn't render PDF pages to images: rendering is in the separate pdf_render crate
  • Doesn't extract text: text extraction is in the separate pdf_text and pdf_render crates
  • Doesn't repair broken PDFs: it can parse damaged files tolerantly but has no repair
  • Can't rewrite an arbitrary existing PDF yet: writing is experimental, and only building from scratch and incremental updates work
  • Doesn't validate the PDF you write: it doesn't allocate object IDs or check that every required field is present, so you follow the PDF spec yourself