-
Added server-side method
setLocalAccessPolicy()for defining a custom access policy for local fileExample:
pdfmake.setLocalAccessPolicy((path) => { // check allowed local file path return path.startsWith("fonts/"); });
-
Fixed extra blank page when using headerRows, dontBreakRows and cell pageBreak together
-
Fixed rendering of an invalid color name - previously it used the last valid color; now it defaults to black
-
Fixed dontBreakRows rowSpan ending offset across pages
- Updated pdfkit to 0.18.0
-
Added
setUrlAccessPolicy()for defining a custom access policy for external URLs before download (addresses a potential server vulnerability CVE-2026-26801)Example:
pdfmake.setUrlAccessPolicy((url) => { // check allowed domain return url.startsWith("https://example.com/"); });
For details see documentation
-
Added validation for image height and width values
- Added
snakingColumnsproperty for columns to enable newspaper-like column flow - Added outlines / bookmarks for
textnodeoutline- set totruefor add to bookmarksoutlineText(optional) - set custom bookmark text, otherwise text from nodeoutlineExpanded(optional) - set totruefor expanded/opened bookmarkoutlineParentId(optional) - parent bookmarkid
- Added property
outlinesfor ToC, which adds all items to outlines / bookmarks (any existing outline settings on texts are respected)
- Added vertical alignment for table cells via
verticalAlignmentproperty, values:top(default),middle,bottom - Fixed margin inheritance when styles are extended multiple times
- Added properties for ToC:
hideEmpty- set totrueif you can hide an empty ToCsortBy-'page'(default) or'title'sortLocale- custom locale to sort by propertysortBy
- Added property
decorationThicknessfortextto set width of the decoration line - Added inherited/extends styles, use property
extendsin style with style name or array of string with style names - Fixed margin override with 0 value
- Fixed margin override from multiple styles
- Fixed text decoration for superscript and subscript
- Fixed svg-to-pdfkit - TypeError: t.classList.contains is not a function
- Fixed non-working
open()andprint()methods in browser - Added SVG validation: width and height must be specified (in SVG string/element or
svgnode) - Added support for image scaling with only
heightdefined - Added custom
markerColorfor each item ofulandol
- Added auto page height for multiple pages (for
sectionor after custom page break) - Added type validation for parameters in method
createPdf - Added support
SVGElementobject forsvgnode (SVGElementobject is available only in browser) - Updated svg-to-pdfkit library to the latest GitHub master commit
- Fixed a bug in the write method where it did not wait for the file write operation to complete
- Fixed SVG loading
- Fixed rendering SVG without viewBox
- Reverted to the original
pdfkitpackage, moving away from@foliojs-fork - Drop support Internet Explorer 11 (Microsoft will not support from 2022)
- Minimal supported version Node.js 20 LTS
- Port code base to ES6+
- Unify interface for node and browser (breaking change)
- All methods return promise instead of using callback (breaking change)
- Change including virtual font storage in client-side (breaking change)
- Change parameters of
pageBreakBeforefunction (breaking change) - Support for loading font files and images via URL addresses (https:// or http:// protocol) in Node.js (client and server side now)
- Used fetch API for downloading fonts and images
- Attachments embedding
- Added
sectionnode