PDFKit 0.11.0 User Guide

A guide for using PDFKit, a JavaScript library for generating PDF documents covering installation and usage.


PDFKit 0.11.0 User Guide - cover page
Brand
PDFKit
Category
Other software
Document type
User Manual
Language
English
Pages
64
File format
PDF
File size
258 KB
Published
16 October, 2026
Updated
16 October, 2026
MD5 checksum
BF8B9F1CCA74E4158C833D223B338C7C

About this manual

This document serves as the user guide for PDFKit version 0.11.0, a JavaScript library designed for generating PDF documents. It details how to install the package using npm and provides examples of creating PDFDocument instances in both Node.js environments and web browsers.

The guide covers fundamental operations such as adding pages with specific layouts and margins, switching between buffered pages to add content retroactively, setting default fonts like Helvetica or Courier, and configuring document metadata including title, author, and keywords.

What's inside

  • Getting Started
  • Installation
  • Creating a Document
  • Using PDFKit in the Browser
  • Adding Pages
  • Switching to Previous Pages
  • Setting Default Font
  • Setting Document Metadata
  • Encryption and Access Privileges
  • Paper Sizes

Specifications

Default FontHelvetica
Version0.11.0

Frequently asked questions

How do I install PDFKit?

Use the npm package manager by typing 'npm install pdfkit'.

Can PDFKit be used in the browser?

Yes, it can be used via module bundlers like Browserify or Webpack.

How do I add page numbers to a document?

Enable bufferPages mode and use doc.switchToPage() to navigate back and add text.

Download PDF (258 KB)