# What changed in pdfmake

> 66 changes in pdfmake 0.2 to 0.3 from its official release notes, upgrade guides and advisories: 10 breaking, 3 security, 20 new APIs and options. Each one cited. Sources checked 2026-10-26. HTML: https://unstale.sh/npm/pdfmake/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## pdfmake 0.3

### Breaking changes

- Invalid color names now default to black instead of using the last valid color. (0.3.8) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.8)
- SVG validation requires width and height to be specified in the SVG string or element, or in the `svg` node. (0.2.23, 0.3.2) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.2), [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.2.23)
- Support for Internet Explorer 11 was dropped. (0.3.0) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.0)
- The interface for node and browser was unified; this is a breaking change. (0.3.0) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.0)
- Node.js 20 LTS is the minimal supported version. (0.3.0) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.0)
- The parameters of the pageBreakBefore function changed; this is a breaking change. (0.3.0) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.0)
- All methods return promises instead of using callbacks; this is a breaking change. (0.3.0) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.0)
- Virtual font storage is included in the client-side; this is a breaking change. (0.3.0) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.0)

### Security

- Fixed local images embedded in SVG bypassing setLocalAccessPolicy. (0.3.12) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.12)
- URLs are validated before each redirection in Node.js and after the final redirection in browsers. (0.3.8) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.8)
- Adds a custom access policy for external URLs before download, addressing potential server vulnerability CVE-2026-26801. (0.3.6) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.6), [security advisory](https://github.com/advisories/GHSA-WP52-R2FP-4VMR)

### New APIs and options

- Adds horizontal table alignment with left as the default and center or right as alternatives. (0.3.13) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.13)
- Adds a server-side method for defining a custom access policy for local files. (0.3.8) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.8)
- Adds an option on text nodes to include them in bookmarks when set to true. (0.3.5) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.5)
- Adds an optional setting to show a bookmark as expanded or opened when set to true. (0.3.5) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.5)
- Adds an optional parent bookmark id for a text node's bookmark. (0.3.5) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.5)
- Adds a ToC property that adds all items to outlines or bookmarks while respecting existing outline settings on texts. (0.3.5) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.5)
- Adds an optional custom bookmark text value; otherwise the text from the node is used. (0.3.5) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.5)
- Adds a property for columns to enable newspaper-like column flow. (0.3.5) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.5)
- Table cells support vertical alignment with the values top (default), middle, and bottom. (0.3.4) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.4)
- Adds extends to a style, accepting a style name or an array of style names to inherit styles. (0.3.3) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.3)
- Adds decorationThickness to set the width of the text decoration line. (0.3.3) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.3)
- Adds hideEmpty to hide an empty ToC when set to true. (0.3.3) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.3)
- Adds sortBy to sort the ToC by page or title; page is the default. (0.3.3) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.3)
- Adds sortLocale to specify a custom locale for sorting by sortBy. (0.3.3) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.3)
- A custom `markerColor` can be set for each item of `ul` and `ol`. (0.2.23, 0.3.2) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.2), [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.2.23)
- The svg node now supports an SVGElement object, available only in the browser. (0.2.22, 0.3.1) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.1), [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.2.22)
- Attachments embedding was added. (0.3.0) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.0)
- Font files and images can be loaded via HTTP or HTTPS URLs in Node.js, client-side, and server-side. (0.3.0) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.0)
- A section node was added. (0.3.0) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.0)

### Performance

- The browser bundle size was reduced by over 20%. (0.3.12) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.12)

### Behavior and default changes

- Image scaling is supported when only `height` is defined. (0.2.23, 0.3.2) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.2), [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.2.23)
- Added automatic page height for multiple pages in a section or after a custom page break. (0.3.1) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.1)
- Parameters passed to createPdf now receive type validation. (0.3.1) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.1)

### Fixes and other changes

- Sections no longer share the first section's automatic page height, preventing content clipping in subsequent sections. (0.3.13) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.13)
- Fixes a TypeError: Invalid base URL when loading the browser build in React Native. (0.3.13) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.13)
- Adjacent text fragments with different decorationThickness values are rendered with their respective decoration thicknesses. (0.3.13) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.13)
- PDF stream errors now reject promises returned by getBuffer(), getBase64() and getDataUrl(). (0.3.13) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.13)
- Returns an unconsumed stream; subsequent stream access rejects. (0.3.13) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.13)
- Percentage widths now use correct padding and border widths when mixed with auto or star-sized columns. (0.3.13) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.13)
- Vertical alignment is corrected when a table with row-spanned header cells starts on a subsequent page. (0.3.13) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.13)
- Corrects paint order in unbreakable blocks so outer table fills no longer cover nested table fills. (0.3.13) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.13)
- Positioning and automatic thickness for mixed font sizes no longer depend on the order of text fragments. (0.3.13) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.13)
- Attachments loaded from the virtual file system, including downloaded URL attachments, no longer fail with "No src specified". (0.3.13) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.13)
- Clipping height no longer depends incorrectly on the decoration's vertical position on the page. (0.3.13) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.13)
- Reuses buffered PDF data so write() no longer hangs or fails after getBuffer(), getBase64() or getDataUrl(). (0.3.13) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.13)
- RGB JPEGs are no longer embedded as DeviceGray, fixing a bug introduced in pdfkit 0.19.0. (0.3.11) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.11)
- Fixed table cell height handling for rowSpan cells in the last column. (0.3.9) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.9)
- Fixes the rowSpan ending offset across pages. (0.3.8) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.8)
- Fixes an extra blank page when headerRows, dontBreakRows and cell pageBreak are used together. (0.3.8) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.8)
- Adds validation for image height and width values. (0.3.6) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.6)
- Fixed margin inheritance when styles are extended multiple times. (0.3.4) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.4)
- Fixes margin overrides when the override value is 0. (0.3.3) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.3)
- Fixes margin overrides from multiple styles. (0.3.3) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.3)
- Fixes a TypeError caused by t.classList.contains not being a function. (0.3.3) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.3)
- Fixes text decoration for superscript and subscript. (0.3.3) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.3)
- Fixed the non-working browser method. (0.3.2) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.2)
- Fixed the non-working browser method. (0.3.2) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.2)
- Fixed SVG loading. (0.3.1) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.1)
- Fixed rendering SVG without viewBox. (0.2.22, 0.3.1) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.1), [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.2.22)
- The write method now waits for the file write operation to complete. (0.3.1) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.3.1)

## pdfmake 0.2

### Breaking changes

- Parameters passed to createPdf are now validated as objects. (0.2.22) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.2.22)
- Parameters passed to createPdfKitDocument are now validated as objects. (0.2.22) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.2.22)

### New APIs and options

- Adds the wordBreak property for text nodes, supporting normal (the default) and break-all. (0.2.21) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.2.21)

### Fixes and other changes

- Fixes rendering of empty list entries. (0.2.21) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.2.21)
- Updates the Roboto font to version 3.014. (0.2.21) — [release notes](https://github.com/bpampuch/pdfmake/releases/tag/0.2.21)
