🌐
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
🌐
PDF-LIB
pdf-lib.js.org
PDF-LIB · Create and modify PDF documents in any ...
# With npm npm install --save pdf-lib # With yarn yarn add pdf-lib
Discussions

NPM Library For PDF Creating
Hi! Recently i’ve tried to add PDF creation functonality into my Weweb project. I’ve found a couple of npm libraries that can help me with that and installed them in NPM plugin. One of them was html2pdf. When i’m trying to use it’s functions in workflow custom js action i can see that ... More on community.weweb.io
🌐 community.weweb.io
0
November 13, 2023
Working with Multiple Checkboxes in PDF Form - using PDF-LIB npm
Make sure that your checkboxes have different names. Adobe Acrobat has an option, "Prepare a form", located in the "All tools" menu. Clicking on this will reveal all of the form field names. If you see "dodJaNein#0" and "dodJaNein#1", rename them so that PDF-LIB can recognize these fields. More on stackoverflow.com
🌐 stackoverflow.com
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 More on stackoverflow.com
🌐 stackoverflow.com
pdf lib.js - How to use Hopding / pdf-lib with pure javascript? (Without using a package manager) - Stack Overflow
How can I use Hopding/pdf-lib with pure javascript without using node or any other package manager? I have noticed that they have mentioned supporting pure JavaScript. But not mentioned how? I sear... More on stackoverflow.com
🌐 stackoverflow.com
🌐
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
Homepage   http://pdfkit.org/
🌐
npm
npmjs.com › search
keywords:pdf-lib - npm search
This project extends the capabilities of the pdf-lib JavaScript library by providing a set of helper functions that simplify common PDF manipulation tasks. It includes utilities for drawing and formatting text, images, and shapes within PDF ...
🌐
Honeybadger
honeybadger.io › blog › pdf-node
Managing PDFs in Node.js with pdf-lib - Honeybadger Developer Blog
November 16, 2023 - This command will download the pdf-lib package from the npm registry and add it to your project's node_modules directory.
🌐
WeWeb Community
community.weweb.io › ask us anything
NPM Library For PDF Creating - Ask us anything - WeWeb Community
Hi! Recently i’ve tried to add PDF creation functonality into my Weweb project. I’ve found a couple of npm libraries that can help me with that and installed them in NPM plugin. One of them was html2pdf. When i’m trying to use it’s functions in workflow custom js action i can see that ...
Published   November 13, 2023
Find elsewhere
🌐
LogRocket
blog.logrocket.com › home › managing pdfs in node with pdf-lib
Managing PDFs in Node with pdf-lib - LogRocket Blog
June 4, 2024 - Take control of your PDFs in Node.js with pdf-lib, a useful tool for creating and modifying PDFs, designed to work in any JavaScript runtime.
🌐
npm
npmjs.com › package › pdf-lib-incremental-save
pdf-lib-incremental-save - npm
// Load a PDFDocument from the existing PDF bytes const pdfDoc = await PDFDocument.load(existingPdfBytes) // Take a snapshot of the document const snapshot = pdfDoc.takeSnapshot(); // Get the first page of the document const pages = pdfDoc.getPages() const firstPage = pages[0] // Mark the page as modified snapshot.markRefForSave(firstPage.ref) // Draw a string of text diagonally across the first page firstPage.drawText('Incremental saving is also awesome!', { x: 50, y: 4 * fontSize, size: fontSize }) // Serialize the PDFDocument to bytes (a Uint8Array) const pdfIncrementalBytes = await pdfDoc.saveIncremental(snapshot) const pdfBytes = Buffer.concatenate([ existingPdfBytes, pdfIncrementalBytes ]) // For example, `pdfBytes` can be: // • Written to a file in Node // • Downloaded from the browser // • Rendered in an <iframe>
      » npm install pdf-lib-incremental-save
    
Published   Jan 29, 2024
Version   1.17.4
Author   Remus DRAICA
🌐
Stack Overflow
stackoverflow.com › questions › 76488079 › working-with-multiple-checkboxes-in-pdf-form-using-pdf-lib-npm
Working with Multiple Checkboxes in PDF Form - using PDF-LIB npm
I have two checkboxes in my PDF. They are "Ja" & "Nei". But when I use const fields = form.getFields() this property to get checkbox names im getting only name===> PDFChe...
🌐
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
🌐
jsDelivr
jsdelivr.com › package › npm › pdf-lib-extended
pdf-lib-extended CDN by jsDelivr - A CDN for npm and GitHub
August 21, 2024 - A free, fast, and reliable CDN for pdf-lib-extended. This project extends the capabilities of the pdf-lib JavaScript library by providing a set of helper functions that simplify common PDF manipulation tasks.
Published   Aug 21, 2024
🌐
npm
npmjs.com › search
keywords:pdf-lib-plus-encrypt - npm search
npm · Sign UpSign In · Sort by: Default · Default · Most downloaded this week · Most downloaded this month · Most dependents · Recently published · Create and modify and encrypt PDF files with JavaScript · pdf-lib · pdf-lib-plus-encrypt ...
🌐
GitHub
github.com › topics › pdf-lib
pdf-lib · GitHub Topics · GitHub
javascript pdf typescript pwa nextjs pdf-merge pdf-merger pdf-tools pdf-lib ... A NPM Package built on top of pdf-lib that provides functonalities like merge, rotate, split,download pdf to disk and many more...
🌐
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.
Top answer
1 of 1
2

You can use the UMD Module as mentioned in their GitHub page. Here are some of the useful information I extracted from their GitHub page.

UMD Module

You can also download pdf-lib as a UMD module from unpkg or jsDelivr. The UMD builds have been compiled to ES5, so they should work in any modern browser. UMD builds are useful if you aren't using a package manager or module bundler. For example, you can use them directly in the tag of an HTML page.

The following builds are available:

  • https://unpkg.com/pdf-lib/dist/pdf-lib.js
  • https://unpkg.com/pdf-lib/dist/pdf-lib.min.js
  • https://cdn.jsdelivr.net/npm/pdf-lib/dist/pdf-lib.js
  • https://cdn.jsdelivr.net/npm/pdf-lib/dist/pdf-lib.min.js

NOTE: if you are using the CDN scripts in production, you should include a specific version number in the URL, for example:

  • https://unpkg.com/[email protected]/dist/pdf-lib.min.js
  • https://cdn.jsdelivr.net/npm/[email protected]/dist/pdf-lib.min.js

Example:

<html>
  <head>
    <meta charset="utf-8" />
    <script src="https://unpkg.com/pdf-lib"></script>
  </head>

  <body>
    <div style="display: flex; width: 100%; height: 100%; flex-direction: column; overflow: hidden;">
        <iframe id="pdf" style="flex-grow: 1; border: none; margin: 0; padding: 0;"></iframe>
    </div>
  </body>
  <script type="text/javascript" src="https://unpkg.com/[email protected]/dist/pdf-lib.min.js"></script>
  <script>
    createPdf();
    async function createPdf() {
      const pdfDoc = await PDFLib.PDFDocument.create();
      const page = pdfDoc.addPage([350, 400]);
      page.moveTo(110, 200);
      page.drawText('Hello World!');
      const pdfDataUri = await pdfDoc.saveAsBase64({ dataUri: true
     });
      document.getElementById('pdf').src = pdfDataUri;
    }
  </script>
</html>
🌐
Form.io
mindbowser.com › home › blogs › unlocking the potential of pdfs: a guide to pdf-lib.js
Unlocking the Potential of PDFs: A Guide to PDF-lib.js
July 10, 2023 - Discover PDF-lib.js, a versatile JavaScript library that empowers developers to create, modify, and manipulate PDF documents effortlessly.
🌐
DEV Community
dev.to › xeshan6981 › the-5-nodejs-pdf-libraries-every-developer-must-know-4b39
The 5 Node.js PDF Libraries Every Developer Must Know - DEV Community
October 14, 2024 - Possible use cases: We'll take a look at some possible real-world use cases to show how this library can be used. IronPDF is a Node.JS PDF library that offers a comprehensive set of features for creating, manipulating, and reading PDF files from HTML file, string, and URL.
🌐
Mozilla
mozilla.github.io › pdf.js
PDF.js - Home
A general-purpose, web standards-based platform for parsing and rendering PDFs.