Description
pdf-lib is an open-source JavaScript library for creating and changing PDF documents. You can build a document from scratch, draw text, images and vector graphics on its pages, embed your own fonts, and embed pages from other PDFs. It can also modify existing files: add, insert and remove pages, split one PDF into several, merge several into one, and copy pages between documents. Forms are supported too, so you can create new ones, read and fill existing fields including check boxes, radio groups, dropdowns, option lists and text fields, and flatten forms. The library is written in TypeScript and compiled to plain JavaScript with no native dependencies, so it runs in browsers, Node, Deno and React Native. It is installed from npm, and a UMD build is available for loading it directly in a web page. The source code is public on GitHub.…
Highlights
- Create PDFs from scratch or modify existing ones
- Pure JavaScript with no native dependencies
- Split, merge and copy pages
- Create, fill and flatten PDF forms
- Embed PNG, JPEG images and pages from other PDFs
Ratings & Reviews
No ratings yet
Be the first to rate PDF-LIB.
People also visit
SwifDoo PDF
PDF editor/converter for editing, compressing, and password-protecting PDFs
PDF-LIB FAQ
What is pdf-lib?
A code library that creates and edits PDF files. You use it from your own JavaScript or TypeScript project rather than as a finished app.
How do I install it?
Install the npm module in your project, or load the UMD build in a web page. It also works in Deno.
Which environments does it run in?
Browsers, Node, Deno and React Native. It has no native dependencies, so it needs no compiled add-ons.
Can it fill PDF forms?
Yes. It reads and fills existing fields such as text fields, check boxes, radio groups, dropdowns and option lists, and it can flatten a form so the values are fixed.
Is it open source?
Yes. The source code is public on GitHub at Hopding/pdf-lib.
What are the best PDF-LIB alternatives?
Popular alternatives to PDF-LIB include BentoPDF, Every PDF and Orbit PDF. See all PDF-LIB alternatives





