npm
npmjs.com › package › pdf-lib
pdf-lib - npm
Create and modify PDF files with JavaScript. Latest version: 1.17.1, last published: 4 years ago. Start using pdf-lib in your project by running `npm i pdf-lib`. There are 1017 other projects in the npm registry using pdf-lib.
» npm install pdf-lib
Published Nov 06, 2021
Version 1.17.1
Author Andrew Dillon
Repository https://github.com/Hopding/pdf-lib
Homepage https://pdf-lib.js.org/
PDF-LIB
pdf-lib.js.org
PDF-LIB · Create and modify PDF documents in any JavaScript environment.
# With npm npm install --save pdf-lib # With yarn yarn add pdf-lib · If you aren't using a package manager, UMD modules are available on the unpkg and jsDelivr CDNs: ... NOTE: if you are using the CDN scripts in production, you should include ...
Videos
03:28
✨ Generate PDFs Dynamically in Node.js with PDF-Lib 📄 Full ...
14:59
Using PDF-lib and Node.js to populate PDF form - YouTube
18:07
Node.js PDF-LIB Example to Create PDF File and Add Text ...
18:28
Node.js PDF-LIB Project to Automate Filling Forms in PDF Document ...
12:46
Node.js Express jsPDF & PDF-LIB Project to Merge,Edit,Split ...
Snyk
snyk.io › advisor › pdf-lib › pdf-lib code examples
Top 5 pdf-lib Code Examples | Snyk
Mogztter / asciidoctor-pdf.js / lib / converter.js View on Github
LogRocket
blog.logrocket.com › home › managing pdfs in node with pdf-lib
Managing PDFs in Node with pdf-lib - LogRocket Blog
June 4, 2024 - Like in the above example, you may have a letter with the same content, but you want to address it to different people. You can query your database and modify the document dynamically as we did. Unfortunately, as illustrated above, you need to get the exact location on the document to add the text. The pdf-lib package comes with the functionality you can use to merge PDF documents.
HayaGeek
hayageek.com › home › pdf-lib tutorial – generate pdf in node.js
Pdf-lib tutorial - Generate PDF in Node.js
November 29, 2023 - Throughout this tutorial, we’ve explored the capabilities of the pdf-lib npm package for creating and modifying PDF files with JavaScript. We’ve covered how to install the package, create a new PDF, add text and images, as well as modify an existing PDF. By now, you should be comfortable using pdf-lib in your projects.
GitHub
github.com › Hopding › pdf-lib
GitHub - Hopding/pdf-lib: Create and modify PDF documents in any JavaScript environment
You must add the @pdf-lib/fontkit module to your project and register it using pdfDoc.registerFontkit(...) before embedding custom fonts (see the font embedding example). This module is not included by default because not all users need it, and it increases bundle size. Installing this module is easy. Just like pdf-lib itself, @pdf-lib/fontkit can be installed with npm/yarn or as a UMD module.
Starred by 8.1K users
Forked by 827 users
Languages TypeScript 80.9% | HTML 9.9% | JavaScript 8.5% | Objective-C 0.3% | CSS 0.2% | Starlark 0.1% | Java 0.1%
Nutrient
nutrient.io › blog › sdk › how to build a nodejs pdf editor with pdflib
How to build a Node.js PDF editor with pdf-lib
August 20, 2023 - Another powerful feature of the pdf-lib library is the ability to extract pages from different PDF documents and combine them into a new document: ... In this example, you fetch two PDF documents (with_update_sections.pdf and with_large_page_count.pdf) from remote URLs using axios.
npm
npmjs.com › search
keywords:pdf-lib - npm search
Add incremental save functionality to pdf-lib. ... remdra• 1.17.4 • 2 years ago • 3 dependents • MITpublished version 1.17.4, 2 years ago3 dependents licensed under $MIT ... registered• 1.19.0 • 10 months ago • 0 dependents • MITpublished version 1.19.0, 10 months ago0 dependents licensed under $MIT ... Self-contained client-side PDF compressor. Uses npm ...
npm
npmjs.com › package › @cantoo › pdf-lib
@cantoo/pdf-lib - npm
Create and modify PDF files with JavaScript. Latest version: 2.5.3, last published: 25 days ago. Start using @cantoo/pdf-lib in your project by running `npm i @cantoo/pdf-lib`. There are 15 other projects in the npm registry using @cantoo/pdf-lib.
» npm install @cantoo/pdf-lib
Published Sep 28, 2025
Version 2.5.3
Author Andrew Dillon
Repository https://github.com/cantoo-scribe/pdf-lib
Homepage https://pdf-lib.js.org
npm
npmjs.com › package › pdf-lib-incremental-save
pdf-lib-incremental-save - npm
This example produces this PDF (when this PDF is used for the existingPdfBytes variable). import { PDFDocument, StandardFonts } from 'pdf-lib'; // This should be a Uint8Array or ArrayBuffer // This data can be obtained in a number of different ...
» npm install pdf-lib-incremental-save
Published Jan 29, 2024
Version 1.17.4
Author Remus DRAICA
GitHub
github.com › coconitro › node-pdflib
GitHub - coconitro/node-pdflib: This is a ffi wrapper for pdflib (http://pdflib.com) for use with node.js.
var lib = require('pdflib'); var pdflib = lib.pdflib; var PDFLIB = lib.DEFINES; var pdf = pdflib.PDF_new(); pdflib.PDF_set_option(pdf, "errorpolicy=return"); if (pdflib.PDF_begin_document(pdf, "hello.pdf", 0, "") == -1) { console.log("Error: "+pdflib.PDF_get_errmsg(pdf)); return(2); } // Set some options pdflib.PDF_set_option(pdf, "hypertextencoding=host"); pdflib.PDF_set_info(pdf, "Creator", "hello.c"); pdflib.PDF_set_info(pdf, "Author", "Foo bar"); pdflib.PDF_set_info(pdf, "Title", "Hello, world (C)!"); pdflib.PDF_begin_page_ext(pdf, PDFLIB.a4_width, PDFLIB.a4_height, ""); // Write something var font = pdflib.PDF_load_font(pdf, "Helvetica-Bold", 0, "host", ""); if (font == -1) { console.log("Error: "+pdflib.PDF_get_errmsg(pdf)); pdflib.PDF_delete(pdf); return(2); } pdflib.PDF_setfont(pdf, font, 24); pdflib.PDF_set_text_pos(pdf, 50, 700); pdflib.PDF_show(pdf, "Hello, world!
Starred by 9 users
Forked by 3 users
Languages JavaScript
npm
npmjs.com › package › pdfkit
pdfkit - npm
A PDF generation library for Node.js. Latest version: 0.17.2, last published: 3 months ago. Start using pdfkit in your project by running `npm i pdfkit`. There are 872 other projects in the npm registry using pdfkit.
» npm install pdfkit
Published Aug 30, 2025
Version 0.17.2
Author Devon Govett
Repository https://github.com/foliojs/pdfkit
Homepage http://pdfkit.org/
Top answer 1 of 3
9
Yes I guess the most common used library is pdf-lib. Take a look at the official page.
2 of 3
1
I suggest you to try HummusPDF. Specifically take a look at the Hummus - Modification page, that explains how to edit existing PDF documents. In your case you could try to use the feature that allows to draw shapes.
Stack Overflow
stackoverflow.com › questions › 71603667 › how-to-use-pdf-lib-in-angular
node.js - How to use pdf-lib in Angular? - Stack Overflow
I found this pdf-lib library that I want to use in my angular project but I couldn't find any docs on how to import it in angular and I don't know the procedure of achieving this. Can someone please help with me with importing this library (or any other npm library in general) to an angular project