talira

Compare

@pdfme/pdf-lib@cantoo/pdf-libpdf-lib
What it isThis version is forked from Hopding/pdf-lib, with several bug fixes and additional featuresAn actively maintained fork of pdf-lib: create and modify PDF documents in any JavaScript environmentCreate and modify PDF documents in any JavaScript environment.
KindOpen sourceOpen sourceOpen source
Trust0.670.480.14
Stars50863648678
Last commit2026-11-202026-11-182024-07-17
LicenceMITMITMIT
PricingFree and open sourceFree and open sourceFree and open source
Free tierYesYesYes
Self-hostableYesYesYes
Ways to run it———
SOC 2———
HIPAA———
SSO———
API——No
Plugins——No
MCP server——No
CompanypdfmeCantoo—
Features
  • pdf-lib's API: create and modify PDFs, pages, fonts, images
  • AcroForm classes: PDFForm, PDFTextField, PDFCheckBox, PDFDropdown, PDFRadioGroup, flatten()
  • radius option on drawRectangle for rounded corners
  • drawSvg from @cantoo/pdf-lib
  • works with foliojs/fontkit v2
  • released with pdfme's versions
  • pdf-lib's API and docs: create and modify PDFs, add, remove, copy and merge pages
  • create, fill, read and flatten AcroForm fields; flatten() also flattens orphaned widget annotations
  • open encrypted PDFs with a password; encrypt() with AES-256 (default), AES-128 or RC4
  • incremental updates: append changes without rewriting the file
  • full SVG drawing (drawSvg, embedSvg) as well as SVG paths
  • PDFPage.extractContents(): text, images and approximate vector graphics from content streams
  • XFA helpers: preserveXFA, read and modify XFA JavaScript, signature-field discovery
  • document-level JavaScript extraction
  • All 15 features
  • Create PDFs from scratch or modify existing ones
  • Draw text, images and SVG paths
  • Embed TrueType/OpenType fonts and PNG/JPEG images; measure text
  • Embed and draw pages from other PDFs
  • Add, insert, remove, split and merge pages
  • Create, fill, read and flatten AcroForm fields (text, checkbox, radio, dropdown, option list)
  • File attachments and document metadata
  • No native dependencies
Limitations
    • Doesn't extract plain text from a page outside form fields: it reads the values of text fields only
    • Doesn't add HTML or CSS content to a PDF: its README points to Puppeteer for that
    • Doesn't handle dynamic XFA forms: its XFA helpers target static government and tax XFA layouts
    • Doesn't make files fully PDF/A compliant: convertToPDFA() adds the structure but doesn't rewrite fonts, transparency or JavaScript
    • Doesn't open or edit encrypted PDFs: PDFDocument.load throws an EncryptedPDFError
    • Doesn't extract plain text from a page outside form fields: it reads the values of text fields only