# Hopding/pdf-lib

Create and modify PDF documents in any JavaScript environment

Repository: https://github.com/Hopding/pdf-lib
Canonical: https://ross.abutalabs.com/products/pdf-lib
Homepage: https://pdf-lib.js.org
Language: TypeScript
License: MIT
License Family: permissive
Topics: pdf, document, create, modify, creation, modification, edit, editing, typescript, javascript, library, umd, copy, copying, generation, lib, documents
Last push: 2024-07-17T12:18:51+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 3285, "days_push": 777, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 8605, forks 911 (observed 2026-08-28T04:10:23.771308+00:00)

## What it is
pdf-lib is a pure JavaScript/TypeScript library for creating and modifying PDF documents in any JavaScript runtime, including Node, browsers, Deno, and React Native. It supports drawing text, images, and vector graphics, embedding fonts and pages, splitting/merging documents, and creating, filling, and flattening PDF forms.

## Use cases
- generate pdf invoices from javascript
- merge multiple pdfs into one
- split a pdf into separate pages
- fill pdf form fields programmatically
- add text and images to an existing pdf
- embed custom fonts in a pdf
- flatten pdf forms in the browser
- copy pages between pdf documents

## When to choose
- you need to create or edit PDFs in any JavaScript environment without native dependencies
- you need to fill, create, or flatten PDF forms
- you need to split, merge, or copy pages between PDFs
- you want a pure JS library that works in browser, Node, Deno, or React Native

## When to avoid
- you need to read or extract text content from PDFs (pdf-lib focuses on creation and modification, not text extraction)
- you need to handle encrypted PDFs (support is limited)
- you need server-side rendering of HTML to PDF
- you need advanced layout engines like LaTeX-quality typesetting

## Facets
- artifact type: library
- maturity: maintenance
- function: pdf, parser, serialization
- domain: pdf, files, web-development, developer-tools
- platform: browser, cross-platform, cli
- tags: pdf-generation, pdf-manipulation, form-filling, typescript, no-native-dependencies, react-native, nodejs, deno, web-server

## Member repositories
- Hopding/pdf-lib (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:10:23.771308+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-29T17:26:07.856444+00:00, confidence not recorded.
  - readme: https://github.com/Hopding/pdf-lib (fetched 2026-08-28T04:10:23.771308+00:00, sha ed6c328fb7d2)
  - homepage: https://pdf-lib.js.org (fetched 2026-08-29T08:26:46.415361+00:00, sha 3a567ebd3864)
  - site_page: https://pdf-lib.js.org/docs/api (fetched 2026-08-29T08:26:46.425039+00:00, sha 47a324c10413)
  - site_page: https://pdf-lib.js.org/docs/help (fetched 2026-08-29T08:26:46.428220+00:00, sha 5792fe024b5a)
- Data as of 2026-08-30T08:39:29.467469+00:00.
