---
title: "@cantoo/pdf-lib 2.11.0 Breaking Changes on npm | Since.dev"
description: "What each @cantoo/pdf-lib release removed, renamed or changed: 20 breaking changes in 4 versions on npm, each with its source."
canonical_url: https://since.dev/packages/npm/@cantoo/pdf-lib
last_updated: 2026-12-04
---

# @cantoo/pdf-lib breaking changes

@cantoo/pdf-lib 2.11.0 (September 11, 2026) is its newest release with breaking changes, 14 of them. The first: html-entities becomes a peer dependency instead of a regular dependency in @cantoo/pdf-lib 2.11.0. Every breaking API change we have recorded in @cantoo/pdf-lib on npm: 20 breaking changes in 4 versions. Below, its 4 versions with breaking changes, newest first, removals and renames first, each with its source.

Updated December 4, 2026

Latest version `2.11.1`, released September 15, 2026. [Source repository](https://github.com/cantoo-scribe/pdf-lib)

Packages on npm run on Node.js. [Node.js end of life dates](https://since.dev/calendar/nodejs.md).

- From [2.8.4](#v-2-8-4) to [2.11.0](#v-2-11-0): 18 breaking changes in 3 versions.

## @cantoo/pdf-lib 2.11.0 breaking changes

@cantoo/pdf-lib 2.11.0, released September 11, 2026: 14 breaking changes.

- **Configuration changed**  

html-entities is no longer installed automatically with the package. Projects that rely on it must install it themselves. [github.com](https://github.com/cantoo-scribe/pdf-lib/blob/v2.11.0/CHANGELOG.md)
- **Signature changed** `bytesFor`  

Was const bytesFor: (n: number) => Uint8Array; now const bytesFor: (n: number) => Uint8Array\<ArrayBuffer>. [npmjs.com](https://www.npmjs.com/package/@cantoo/pdf-lib/v/2.11.0)
- **Signature changed** `FileEmbedder.getFileData`  

Was getFileData(): Uint8Array; now getFileData(): Uint8Array\<ArrayBufferLike>. [npmjs.com](https://www.npmjs.com/package/@cantoo/pdf-lib/v/2.11.0)
- **Signature changed** `mergeIntoTypedArray`  

Was const mergeIntoTypedArray: (...arrays: (string | Uint8Array)\[\]) => Uint8Array; now const mergeIntoTypedArray: (...arrays: (string | Uint8Array)\[\]) => Uint8Array\<ArrayBuffer>. [npmjs.com](https://www.npmjs.com/package/@cantoo/pdf-lib/v/2.11.0)
- **Signature changed** `PDFAcroNonTerminal.normalizedEntries`  

Was normalizedEntries(): {Kids: import("../objects/PDFArray").default;}; now normalizedEntries(): {Kids: import("..").PDFArray;}. [npmjs.com](https://www.npmjs.com/package/@cantoo/pdf-lib/v/2.11.0)
- **Signature changed** `PDFAcroTerminal.normalizedEntries`  

Was normalizedEntries(): {Kids: import("../objects/PDFArray").default;}; now normalizedEntries(): {Kids: import("..").PDFArray;}. [npmjs.com](https://www.npmjs.com/package/@cantoo/pdf-lib/v/2.11.0)
- **Signature changed** `PDFDocument.commit`  

Was commit(options?: IncrementalSaveOptions): Promise\<Uint8Array>; now commit(options?: IncrementalSaveOptions): Promise\<Uint8Array\<ArrayBuffer>>. [npmjs.com](https://www.npmjs.com/package/@cantoo/pdf-lib/v/2.11.0)
- **Signature changed** `PDFDocument.save`  

Was save(options?: SaveOptions): Promise\<Uint8Array>; now save(options?: SaveOptions): Promise\<Uint8Array\<ArrayBuffer>>. [npmjs.com](https://www.npmjs.com/package/@cantoo/pdf-lib/v/2.11.0)
- **Signature changed** `PDFDocument.saveIncremental`  

Was saveIncremental(snapshot: DocumentSnapshot, options?: IncrementalSaveOptions): Promise\<Uint8Array>; now saveIncremental(snapshot: DocumentSnapshot, options?: IncrementalSaveOptions): Promise\<Uint8Array\<ArrayBuffer>>. [npmjs.com](https://www.npmjs.com/package/@cantoo/pdf-lib/v/2.11.0)
- **Signature changed** `PDFStreamWriter.computeBufferSize`  

Was protected computeBufferSize(incremental: boolean): Promise<{size: number; header: import("../document/PDFHeader").default; indirectObjects: \[PDFRef, PDFObject\]\[\]; trailer: PDFTrailer;}>; now protected computeBufferSize(incremental... [npmjs.com](https://www.npmjs.com/package/@cantoo/pdf-lib/v/2.11.0)
- **Signature changed** `PDFWriter.serializeToBuffer`  

Was serializeToBuffer(): Promise\<Uint8Array>; now serializeToBuffer(): Promise\<Uint8Array\<ArrayBuffer>>. [npmjs.com](https://www.npmjs.com/package/@cantoo/pdf-lib/v/2.11.0)
- **Signature changed** `reverseArray`  

Was const reverseArray: (array: Uint8Array) => Uint8Array; now const reverseArray: (array: Uint8Array) => Uint8Array\<ArrayBufferLike>. [npmjs.com](https://www.npmjs.com/package/@cantoo/pdf-lib/v/2.11.0)
- **Signature changed** `setFillingColor`  

Was const setFillingColor: (color: Color) => import("../core/operators/PDFOperator").default; now const setFillingColor: (color: Color) => import("..").PDFOperator. [npmjs.com](https://www.npmjs.com/package/@cantoo/pdf-lib/v/2.11.0)
- **Signature changed** `setStrokingColor`  

Was const setStrokingColor: (color: Color) => import("../core/operators/PDFOperator").default; now const setStrokingColor: (color: Color) => import("..").PDFOperator. [npmjs.com](https://www.npmjs.com/package/@cantoo/pdf-lib/v/2.11.0)

## @cantoo/pdf-lib 2.9.1 breaking changes

@cantoo/pdf-lib 2.9.1, released August 18, 2026: 2 breaking changes.

- **Behavior changed** `PDFDocument.encrypt`  

RC4 ciphers now require allowWeakCryptography: true to be used with encrypt(). Existing code relying on RC4 must add this flag. [github.com](https://github.com/cantoo-scribe/pdf-lib/blob/v2.9.1/CHANGELOG.md)
- **Default changed** `PDFDocument.encrypt`  

encrypt() always defaults to AES-256 revision 6 and no longer picks the cipher from the PDF header version. Pass the algorithm option to keep using the older handlers. [github.com](https://github.com/cantoo-scribe/pdf-lib/blob/v2.9.1/CHANGELOG.md)

## @cantoo/pdf-lib 2.9.0 breaking changes

@cantoo/pdf-lib 2.9.0, released August 18, 2026: 2 breaking changes.

- **Signature changed** `FacturXConformanceLevel`  

Was type FacturXConformanceLevel = 'MINIMUM' | 'BASIC_WL' | 'BASIC' | 'EN 16931' | 'EXTENDED' | 'XRECHNUNG'; now type FacturXConformanceLevel = 'MINIMUM' | 'BASIC WL' | 'BASIC_WL' | 'BASIC' | 'EN 16931' | 'EXTENDED' | 'XRECHNUNG'. [npmjs.com](https://www.npmjs.com/package/@cantoo/pdf-lib/v/2.9.0)
- **Signature changed** `PDFSecurity.getEncryptFn`  

Was getEncryptFn(obj: number, gen: number): (buffer: Uint8Array) => Uint8Array; now getEncryptFn(obj: number, gen: number): EncryptFn. [npmjs.com](https://www.npmjs.com/package/@cantoo/pdf-lib/v/2.9.0)

## @cantoo/pdf-lib 2.8.4 breaking changes

@cantoo/pdf-lib 2.8.4, released August 16, 2026: 2 breaking changes.

- **Signature changed** `CustomFontEmbedder.for`  

Was static for(fontkit: Fontkit, fontData: Uint8Array, customName?: string, fontFeatures?: TypeFeatures): Promise\<CustomFontEmbedder>; now static for(fontkit: Fontkit, fontData: Uint8Array, customName?: string, fontFeatures?: TypeFeatures... [npmjs.com](https://www.npmjs.com/package/@cantoo/pdf-lib/v/2.8.4)
- **Signature changed** `CustomFontSubsetEmbedder.for`  

Was static for(fontkit: Fontkit, fontData: Uint8Array, customFontName?: string, fontFeatures?: TypeFeatures): Promise\<CustomFontSubsetEmbedder>; now static for(fontkit: Fontkit, fontData: Uint8Array, customFontName?: string, fontFeatures?... [npmjs.com](https://www.npmjs.com/package/@cantoo/pdf-lib/v/2.8.4)

## Check your code

These are the changes. To see which of them reach your code, [scan a public repository](https://since.dev/scan.md), or have your coding agent call `check_code` with your manifest or lockfile over [MCP](https://since.dev/docs.md#mcp). [The API](https://since.dev/docs.md#api) reads every change in every version. A fix pull request opens for the changes that reach a connected repository. Nothing merges or deploys.

## Put your code on continuous maintenance.

Scan a public repository now, or give your agent one line.

[Scan a repository](https://since.dev/scan.md). Any public GitHub repository. No sign-in.

### Tell your agent what changed since it was trained.

`claude mcp add --transport http since https://api.since.dev/mcp`

[Get an API key](https://app.since.dev/login?mode=signup)

Codex, Cursor and any MCP client use https://api.since.dev/mcp.

---

Every page on this site as Markdown: https://since.dev/sitemap.md. For agents: https://since.dev/llms.txt.
