@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
On this page
Latest version 2.11.1, released September 15, 2026. Source repository
Packages on npm run on Node.js. Node.js end of life dates.
@cantoo/pdf-lib 2.11.0 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 - Signature changed
bytesFor
Was const bytesFor: (n: number) => Uint8Array; now const bytesFor: (n: number) => Uint8Array<ArrayBuffer>. npmjs.com - Signature changed
FileEmbedder.getFileData
Was getFileData(): Uint8Array; now getFileData(): Uint8Array<ArrayBufferLike>. npmjs.com - Signature changed
mergeIntoTypedArray
Was const mergeIntoTypedArray: (...arrays: (string | Uint8Array)[]) => Uint8Array; now const mergeIntoTypedArray: (...arrays: (string | Uint8Array)[]) => Uint8Array<ArrayBuffer>. npmjs.com - Signature changed
PDFAcroNonTerminal.normalizedEntries
Was normalizedEntries(): {Kids: import("../objects/PDFArray").default;}; now normalizedEntries(): {Kids: import("..").PDFArray;}. npmjs.com - Signature changed
PDFAcroTerminal.normalizedEntries
Was normalizedEntries(): {Kids: import("../objects/PDFArray").default;}; now normalizedEntries(): {Kids: import("..").PDFArray;}. npmjs.com - Signature changed
PDFDocument.commit
Was commit(options?: IncrementalSaveOptions): Promise<Uint8Array>; now commit(options?: IncrementalSaveOptions): Promise<Uint8Array<ArrayBuffer>>. npmjs.com - Signature changed
PDFDocument.save
Was save(options?: SaveOptions): Promise<Uint8Array>; now save(options?: SaveOptions): Promise<Uint8Array<ArrayBuffer>>. npmjs.com - Signature changed
PDFDocument.saveIncremental
Was saveIncremental(snapshot: DocumentSnapshot, options?: IncrementalSaveOptions): Promise<Uint8Array>; now saveIncremental(snapshot: DocumentSnapshot, options?: IncrementalSaveOptions): Promise<Uint8Array<ArrayBuffer>>. npmjs.com - 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 - Signature changed
PDFWriter.serializeToBuffer
Was serializeToBuffer(): Promise<Uint8Array>; now serializeToBuffer(): Promise<Uint8Array<ArrayBuffer>>. npmjs.com - Signature changed
reverseArray
Was const reverseArray: (array: Uint8Array) => Uint8Array; now const reverseArray: (array: Uint8Array) => Uint8Array<ArrayBufferLike>. npmjs.com - Signature changed
setFillingColor
Was const setFillingColor: (color: Color) => import("../core/operators/PDFOperator").default; now const setFillingColor: (color: Color) => import("..").PDFOperator. npmjs.com - Signature changed
setStrokingColor
Was const setStrokingColor: (color: Color) => import("../core/operators/PDFOperator").default; now const setStrokingColor: (color: Color) => import("..").PDFOperator. npmjs.com
@cantoo/pdf-lib 2.9.1 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 - 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
@cantoo/pdf-lib 2.9.0 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 - Signature changed
PDFSecurity.getEncryptFn
Was getEncryptFn(obj: number, gen: number): (buffer: Uint8Array) => Uint8Array; now getEncryptFn(obj: number, gen: number): EncryptFn. npmjs.com
@cantoo/pdf-lib 2.8.4 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 - 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
Check your code
These are the changes. To see which of them reach your code, scan a public repository, or have your coding agent call check_code with your manifest or lockfile over MCP. The 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.
See how out of date your code is.
Tell your agent what changed since it was trained.
claude mcp add --transport http since https://api.since.dev/mcpCodex, Cursor and any MCP client use https://api.since.dev/mcp.