npm / pdfmake
pdfmake
What changed in pdfmake 0.2 to 0.3, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-26.
10 breaking3 security20 new APIs and options1 performance3 behavior and defaults29 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initpdfmake 0.361 changes
Breaking changes 8
Invalid color names now default to black instead of using the last valid color.
SVG validation requires width and height to be specified in the SVG string or element, or in the
svgnode.Support for Internet Explorer 11 was dropped.
The interface for node and browser was unified; this is a breaking change.
Node.js 20 LTS is the minimal supported version.
The parameters of the pageBreakBefore function changed; this is a breaking change.
All methods return promises instead of using callbacks; this is a breaking change.
Virtual font storage is included in the client-side; this is a breaking change.
Security 3
Fixed local images embedded in SVG bypassing setLocalAccessPolicy.
URLs are validated before each redirection in Node.js and after the final redirection in browsers.
Adds a custom access policy for external URLs before download, addressing potential server vulnerability CVE-2026-26801.
New APIs and options 19
Adds horizontal table alignment with left as the default and center or right as alternatives.
Adds a server-side method for defining a custom access policy for local files.
Adds an option on text nodes to include them in bookmarks when set to true.
Adds an optional setting to show a bookmark as expanded or opened when set to true.
Adds an optional parent bookmark id for a text node's bookmark.
Adds a ToC property that adds all items to outlines or bookmarks while respecting existing outline settings on texts.
Adds an optional custom bookmark text value; otherwise the text from the node is used.
Adds a property for columns to enable newspaper-like column flow.
Table cells support vertical alignment with the values top (default), middle, and bottom.
Adds extends to a style, accepting a style name or an array of style names to inherit styles.
Adds decorationThickness to set the width of the text decoration line.
Adds hideEmpty to hide an empty ToC when set to true.
Adds sortBy to sort the ToC by page or title; page is the default.
Adds sortLocale to specify a custom locale for sorting by sortBy.
A custom
markerColorcan be set for each item ofulandol.The svg node now supports an SVGElement object, available only in the browser.
Attachments embedding was added.
Font files and images can be loaded via HTTP or HTTPS URLs in Node.js, client-side, and server-side.
A section node was added.
Performance 1
The browser bundle size was reduced by over 20%.
Behavior and default changes 3
Image scaling is supported when only
heightis defined.Added automatic page height for multiple pages in a section or after a custom page break.
Parameters passed to createPdf now receive type validation.
Fixes and other changes 27
Sections no longer share the first section's automatic page height, preventing content clipping in subsequent sections.
Fixes a TypeError: Invalid base URL when loading the browser build in React Native.
Adjacent text fragments with different decorationThickness values are rendered with their respective decoration thicknesses.
PDF stream errors now reject promises returned by getBuffer(), getBase64() and getDataUrl().
Returns an unconsumed stream; subsequent stream access rejects.
Percentage widths now use correct padding and border widths when mixed with auto or star-sized columns.
Vertical alignment is corrected when a table with row-spanned header cells starts on a subsequent page.
Corrects paint order in unbreakable blocks so outer table fills no longer cover nested table fills.
Positioning and automatic thickness for mixed font sizes no longer depend on the order of text fragments.
Attachments loaded from the virtual file system, including downloaded URL attachments, no longer fail with "No src specified".
Clipping height no longer depends incorrectly on the decoration's vertical position on the page.
Reuses buffered PDF data so write() no longer hangs or fails after getBuffer(), getBase64() or getDataUrl().
RGB JPEGs are no longer embedded as DeviceGray, fixing a bug introduced in pdfkit 0.19.0.
Fixed table cell height handling for rowSpan cells in the last column.
Fixes the rowSpan ending offset across pages.
Fixes an extra blank page when headerRows, dontBreakRows and cell pageBreak are used together.
Adds validation for image height and width values.
Fixed margin inheritance when styles are extended multiple times.
Fixes margin overrides when the override value is 0.
Fixes margin overrides from multiple styles.
Fixes a TypeError caused by t.classList.contains not being a function.
Fixes text decoration for superscript and subscript.
Fixed the non-working browser method.
Fixed the non-working browser method.
Fixed SVG loading.
Fixed rendering SVG without viewBox.
The write method now waits for the file write operation to complete.
pdfmake 0.25 changes
Breaking changes 2
Parameters passed to createPdf are now validated as objects.
Parameters passed to createPdfKitDocument are now validated as objects.
New APIs and options 1
Adds the wordBreak property for text nodes, supporting normal (the default) and break-all.
Fixes and other changes 2
Fixes rendering of empty list entries.
Updates the Roboto font to version 3.014.