NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm
npm, #4973 most downloaded on npm
An advanced text layout framework
Latest stable
7.0.1
Last release 3 months ago
24 Aug 2026
Release timing varies
gaps range from 2 weeks to 10 months
Some releases are documented
notes for 26 of 47 stable releases
Nothing withdrawn
no release was ever pulled
9 years old
47 releases · first in 2018
Drag across the ruler to compare, or tap a release to open it.
### Patch Changes - #3524 `df39d4cf2f18ee234b4f6c7674d94bdfc4742489` Thanks @diegomura! - perf: merge run attributes lazily in flatten, only when a se
#3524 df39d4cf2f18ee234b4f6c7674d94bdfc4742489 Thanks @diegomura! - perf: merge run attributes lazily in flatten, only when a segment is emitted
#3527 6dc0901c26354dc5a38ed302ef76d371d74d8d61 Thanks @diegomura! - perf: drop the omit('font') preprocessing pass, skip attachment purging when no attachment is set, reduce allocations in the Knuth-Plass main loop, and cache standard font AFM glyph-name lookups
#3523 a291d4fb45b6260861868b973b24e9a49915f6a0 Thanks @diegomura! - perf: reduce allocation churn in text layout hot paths (~15% faster layout of text-heavy documents)
Your coding agent can read these notes before it upgrades. Set up the MCP server →
### Major Changes - #3511 `d3c4667617c1b97c638a6e89e638879e902c9c52` Thanks @diegomura! - Support ellipse and polygon exclusion shapes for text wrappi
d3c4667617c1b97c638a6e89e638879e902c9c52 Thanks @diegomura! - Support ellipse and polygon exclusion shapes for text wrapping, groundwork for CSS shape-outside. Breaking: the Container.excludeRects prop is renamed to exclusions and now accepts ExclusionShape[] (rect, ellipse, or polygon, each with an optional extend side)06dfada8630d00005752eec711219cf290ce76ea Thanks @manuelmeister! - Add support for fontFeatureSettings to customize ligatures, tabular number display, and other font features.533340e6ae0908732612d4e5350a69dcb70e76db Thanks @diegomura! - fix: line widths misaligned with line rects when exclusions are present, causing the first line after a float to break at the previous line's width### Patch Changes - #3495 `cb445c063adf87c2f250d11f7c36a71c7695bc61` Thanks @diegomura! - Use @react-pdf/hyphenate for text layout, and skip whitespac
cb445c063adf87c2f250d11f7c36a71c7695bc61 Thanks @diegomura! - Use @react-pdf/hyphenate for text layout, and skip whitespace when splitting words into syllables.### Patch Changes - #3489 `6f94a82ea4306b0fd9c7c161f9c44609be7f6f39` Thanks @wojtekmaj! - Improve Knuth-Plass line breaking performance for long parag
6f94a82ea4306b0fd9c7c161f9c44609be7f6f39 Thanks @wojtekmaj! - Improve Knuth-Plass line breaking performance for long paragraphs.### Minor Changes - #3423 `06c188bd` Thanks @exoego! - fix(textkit): treat surrogate pairs as single code points in font substitution ### Patch Change
Updated dependencies [`06dfada8630d00005752eec711219cf290ce76ea`]:
#3440 06dfada8630d00005752eec711219cf290ce76ea Thanks @manuelmeister! - Add support for fontFeatureSettings to customize ligatures, tabular number display, and other font features.
#3514 ab80c0a2e1200ac6d4fd63e911e9c676d6e22f09 Thanks @diegomura! - feat: shape-outside support for floats (circle, ellipse, polygon, inset)
#3286 a56871451b3161f96c53e5ced866ac1b0a288ff1 Thanks @exoego! - feat: wrapping text around image and view (float)
06dfada8630d00005752eec711219cf290ce76ea]:
143af597 Thanks @diegomura! - Fix NFD decomposition breaking Latin diacritics rendering by only decomposing complex scripts (Bengali, Devanagari, etc.) that need it for glyph mapping### Minor Changes - #3358 `7b37bc8c` Thanks @diegomura! - feat(textkit): glyph indices resolution - #3355 `b28b61cf` Thanks @diegomura! - feat(textkit
#3358 7b37bc8c Thanks @diegomura! - feat(textkit): glyph indices resolution
#3355 b28b61cf Thanks @diegomura! - feat(textkit): decompose unicode step
#3357 f30cf001 Thanks @diegomura! - fix(textkit): string indices resolution
#3354 7fa9c06e Thanks @diegomura! - refactor(textkit): rename glyphIndices to stringIndices
Updated dependencies \[`c40bfdec`, `5b6a6a4a`]:
#3273 16cf5bd7 Thanks @diegomura! - feat(textkit): various improvements
#3240 2ca8ae83 Thanks @Pasquale007! - fix: cannot read units for Em
Updated dependencies [c40bfdec, 5b6a6a4a]:
Caution: If you have been using a custom hyphenation callback - which hasn't been working properly since at least version 2.0.21 - then you will need
#3188 f034491b Thanks @carlobeltrame! - Fix and rework the hyphenation algorithm, and allow custom word hyphenation algorithms to specify whether a hyphen should be inserted in case the word is wrapped.
Caution: If you have been using a custom hyphenation callback - which hasn't been working properly since at least version 2.0.21 - then you will need to change your implementation to leave a soft hyphen character ('\u00AD') at the end of syllables where you want react-pdf to insert a hyphen when wrapping lines. Syllables without a final soft hyphen character will still be able to break, but will not produce a hyphen character at the end of the line.
This allows you to break correctly on normal hyphens or other special characters in your text. For example, to use the default english-language syllable breaking built into react-pdf, but also break after hyphens naturally occurring in your text (such as is often present in hyperlinks), you could use the following hyphenation callback:
import { Font } from "@react-pdf/renderer";
Font.registerHyphenationCallback((word, originalHyphenationCallback) => {
return originalHyphenationCallback(word).flatMap((w) => w.split(/(?<=-)/));
});
(flatMap requires at least ES2019)
f89f75c1 Thanks @diegomura! - feat: add xLinkHref, gradientTransform and gradientUnits supportf89f75c1]:
Spot color names are now escaped as PDF Name objects, so names containing spaces or delimiters (e.g. PANTONE 123 C) no longer emit a malformed Separat
4c4e7a1a Thanks @diegomura! - Use generated AFM font data instead of parsing raw font definitions, and split the node and browser entry points, aligning with upstream pdfkit#3468 78ca6aa8 Thanks @diegomura! - Align structure_element.js with upstream pdfkit
#3410 87911560 Thanks @exoego! - refactor: align mulptiles filesWith upstream
#3476 62c97745 Thanks @diegomura! - refactor(pdfkit): align annotations.js, attachments.js and spotcolor.js with upstream
Spot color names are now escaped as PDF Name objects, so names containing
spaces or delimiters (e.g. PANTONE 123 C) no longer emit a malformed
Separation color space.
#3453 6098e648 Thanks @afonsojramos! - Declare the pako runtime dependency externalized by the browser build so it resolves with strict package managers.
#3431 59aa9aea Thanks @5000164! - fix(pdfkit): deflate decoded PNG pixels as Buffer
#3401 d41a8207 Thanks @diegomura! - refactor(pdfkit): replace events import in line_wrapper.js with inline emitter
#3470 b2acd72b Thanks @diegomura! - refactor(pdfkit): align page.js and document.js with upstream
#3400 c2da5098 Thanks @diegomura! - refactor(pdfkit): use byte-level PNG magic check in image.js
#3398 30dc2a47 Thanks @diegomura! - refactor(pdfkit): remove Buffer dependency from EXIF orientation parser
#3469 6e0102db Thanks @diegomura! - refactor(pdfkit): align line_wrapper.js with upstream
ddfa3675 Thanks @diegomura! - feat(textkit): expect font array#3102 24690f52 Thanks @diegomura! - feat: handle standard fonts in fonts package
#3103 b06d3a0f Thanks @diegomura! - refactor: unify font substitution engines
c7b74963 Thanks @diegomura! - fix: resolve attachments
#3098 bfb51ec0 Thanks @diegomura! - refactor: convert render package to TS
#3092 481b536f Thanks @diegomura! - refactor: convert layout package to TS
Updated dependencies [481b536f]:
24fe4bf8 Thanks @diegomura! - feat: rework and type stylesheet package#3534 049168536480c4216c0a8c4832cf9230feef12e9 Thanks @diegomura! - Fix diagrams failing to render inside a Web Worker.
Fix the theme prop being ignored.
Updated dependencies [10d8365e2eb8fc3987cf94d4d61a7559f4ba1dfb]:
10d8365e2eb8fc3987cf94d4d61a7559f4ba1dfb]:
Updated dependencies \[`24fe4bf8`, `442ce355`, `3007d34a`]:
Updated dependencies \[`d36ace66`]:
d36ace66]:
### Patch Changes - #2975 `00bfdc1e` Thanks @daslaf! - fix issue with indentation shrinking all lines
77e480cd Thanks @diegomura! - feat: accept commas between transformationsUpdated dependencies \[`70f29a04`]:
70f29a04 Thanks @diegomura! - feat!: drop cjs support70f29a04]:
37a7a9fac92d670dd13fd9e88f9a4d9c21efdefd]:
#3500 572cedc23493e4a3085e259bf129ceec458418bd Thanks @diegomura! - Move render-prop element conversion from layout to the renderer
Render props are now wrapped at the reconciler boundary: by the time layout
calls them they return internal instances, not React elements. Layout's
createInstances is deleted and resolvePagination consumes instances
directly.
Breaking (layout): anyone calling @react-pdf/layout directly with
trees whose render props return React elements must convert the result
before handing it to layout — the contract is now instance arrays. Users of
@react-pdf/renderer are unaffected: the renderer performs the conversion.
#3505 ae9a9983e8bd8b63c3873000531a8307e22c7bae Thanks @diegomura! - Experimental pagination engine, opt-in per page
A new pagination engine ships alongside the current one: content is measured once and packed into pages instead of relayouting on every split, making long documents paginate orders of magnitude faster (a 300-page document drops from ~40s to ~200ms).
Opt in with <Page experimentalPagination> — any page opting in switches
the whole document. The default behavior is unchanged.
Under the new engine:
<Page layout={Layout}> renders per-page chrome (headers, footers,
sidebars) around the content. The layout component receives
{ pageNumber, totalPages, subPageNumber, subPageTotalPages } and the
page content as children, and runs once per output page. Using layout
implies experimentalPagination.fixed semantic: in-flow fixed elements repeat at the top of every
page they span; footers are the layout's job.minPresenceAhead is supported, with one refinement: a trailing element
with nothing after it stays in place instead of moving to its own page.The current engine remains the default until the next major, when the new engine takes over.
d38d17759b3856ab64c69101bd359aace4b532fc, ae9a9983e8bd8b63c3873000531a8307e22c7bae, 482d7cd600ffa28c60b5db46e7eb1466398feb7b, cb445c063adf87c2f250d11f7c36a71c7695bc61, cf1348df7bfbc8091ff495320a3ae798569ccc4e]:
Updated dependencies \[`e585e352`]:
#3351 e585e352 Thanks @diegomura! - fix(render): border rendering + tests
Updated dependencies [e585e352]:
#3152 beaffd3d Thanks @Namchee! - chore: replace emoji-regex with emoji-regex-xs
#3190 a99d10fb Thanks @carlobeltrame! - Fix yoga error Invalid array length at Array.push(<anonymous>)
Fix infinite loop while wrapping pages
#3203 ec063bec Thanks @100Gyeon! - fix: prevent unhandled promise rejections when loading emoji images
Updated dependencies []:
#2605 f7505ed Thanks @wojtekmaj! - fix: fix CJS compatibility
Updated dependencies [f7505ed]:
Updated dependencies \[`f89f75c1`]:
f89f75c1 Thanks @diegomura! - feat: add xLinkHref, gradientTransform and gradientUnits supportf89f75c1]:
8350154 Thanks @diegomura! - feat: bidi support8350154]:
#3505 ae9a9983e8bd8b63c3873000531a8307e22c7bae Thanks @diegomura! - Experimental pagination engine, opt-in per page
A new pagination engine ships alongside the current one: content is measured once and packed into pages instead of relayouting on every split, making long documents paginate orders of magnitude faster (a 300-page document drops from ~40s to ~200ms).
Opt in with <Page experimentalPagination> — any page opting in switches
the whole document. The default behavior is unchanged.
Under the new engine:
<Page layout={Layout}> renders per-page chrome (headers, footers,
sidebars) around the content. The layout component receives
{ pageNumber, totalPages, subPageNumber, subPageTotalPages } and the
page content as children, and runs once per output page. Using layout
implies experimentalPagination.fixed semantic: in-flow fixed elements repeat at the top of every
page they span; footers are the layout's job.minPresenceAhead is supported, with one refinement: a trailing element
with nothing after it stays in place instead of moving to its own page.The current engine remains the default until the next major, when the new engine takes over.
`01b4ff5c` Thanks @diegomura! - fix: debug prop
f89f75c1 Thanks @diegomura! - feat: add xLinkHref, gradientTransform and gradientUnits support01b4ff5c Thanks @diegomura! - fix: debug prop
Updated dependencies [01b4ff5c, f89f75c1, 106699e8]:
#3100 a9ef6416 Thanks @diegomura! - feat: support percentage gap
#3102 24690f52 Thanks @diegomura! - feat: handle standard fonts in fonts package
#3092 481b536f Thanks @diegomura! - refactor: convert layout package to TS
#3103 b06d3a0f Thanks @diegomura! - refactor: unify font substitution engines
#3104 ddfa3675 Thanks @diegomura! - feat(textkit): expect font array
#3098 bfb51ec0 Thanks @diegomura! - refactor: convert render package to TS
#3101 fce45ea5 Thanks @diegomura! - fix: layout package types
Updated dependencies [2a4f1bfc, 7cd66e4f, ddfa3675, 3fb01a90, c7b74963, bfb51ec0, 24690f52, 481b536f, b06d3a0f]:
b6a14fd Thanks @wojtekmaj! - Add support for native ESMb6a14fd]:
### Patch Changes - Updated dependencies \[]: - @react-pdf/types@2.8.2
45b2bd3 Thanks @diegomura! - fix lintingUpdated dependencies \[`7cd66e4f`, `ddfa3675`, `c7b74963`, `bfb51ec0`, `24690f52`, `481b536f`, `b06d3a0f`]:
#3098 bfb51ec0 Thanks @diegomura! - refactor: convert render package to TS
#3102 24690f52 Thanks @diegomura! - feat: handle standard fonts in fonts package
18834efa Thanks @nikischin! - Changed unit behavior according to PDF spec. Please note that all unitless values are considered as user unit which is a 72dpi equality of the value. This is according to PDF spec and ensures a consistent layout independent of the dpi setting.18834efa]:
7cd71714 Thanks @diegomura! - feat: added Form Annotation support#3014 685890bd Thanks @islam-kamel! - fix: PDFDownloadLinkProps Type Error
Updated dependencies [7cd71714, fabecc56, 01944231, 6d875056, 49daae8f, 5cc47319, aa0f6725]:
b6a14fd Thanks @wojtekmaj! - Add support for native ESM#2498 6bfe7e8 Thanks @diegomura! - fix: color parse error
Updated dependencies [b6a14fd]:
2db67a3 Thanks @KODIKAS-NL! - added base support for verticalAlign "super" and "sub"eff1ff0]:
### Patch Changes - #3067 `96c2464d` Thanks @diegomura! - refactor: convert primitives package to TS
96c2464d Thanks @diegomura! - refactor: convert primitives package to TSd36ace66]:
#2947 ed562b9b Thanks @diegomura! - feat: remove cross-fetch
Updated dependencies [ed562b9b, 77e480cd]:
82192b3a]:
#3527 6dc0901c26354dc5a38ed302ef76d371d74d8d61 Thanks @diegomura! - perf: drop the omit('font') preprocessing pass, skip attachment purging when no attachment is set, reduce allocations in the Knuth-Plass main loop, and cache standard font AFM glyph-name lookups
Updated dependencies []:
Caution: If you have been using a custom hyphenation callback - which hasn't been working properly since at least version 2.0.21 - then you will need
#3188 f034491b Thanks @carlobeltrame! - Fix and rework the hyphenation algorithm, and allow custom word hyphenation algorithms to specify whether a hyphen should be inserted in case the word is wrapped.
Caution: If you have been using a custom hyphenation callback - which hasn't been working properly since at least version 2.0.21 - then you will need to change your implementation to leave a soft hyphen character ('\u00AD') at the end of syllables where you want react-pdf to insert a hyphen when wrapping lines. Syllables without a final soft hyphen character will still be able to break, but will not produce a hyphen character at the end of the line.
This allows you to break correctly on normal hyphens or other special characters in your text. For example, to use the default english-language syllable breaking built into react-pdf, but also break after hyphens naturally occurring in your text (such as is often present in hyperlinks), you could use the following hyphenation callback:
import { Font } from "@react-pdf/renderer";
Font.registerHyphenationCallback((word, originalHyphenationCallback) => {
return originalHyphenationCallback(word).flatMap((w) => w.split(/(?<=-)/));
});
(flatMap requires at least ES2019)
7cd71714 Thanks @diegomura! - feat: added Form Annotation support#3062 5cc47319 Thanks @diegomura! - refactor: unify pdfkit image mixin
Updated dependencies [7cd71714, 01944231]:
52b2f253 Thanks @diegomura! - feat: add React 19 support52b2f253]:
37a7a9fac92d670dd13fd9e88f9a4d9c21efdefd Thanks @diegomura! - Replace the @react-pdf/pdfkit fork with upstream pdfkit (v0.20.1)06dfada8630d00005752eec711219cf290ce76ea]:
a5a933c Thanks @carlobeltrame! - feat: compatibility with modern web bundlers and browsers#1917 4bb97c3 Thanks @carlobeltrame! - fix: console error when text overflows the last available rect
Updated dependencies [a5a933c]:
Updated dependencies \[`7cd66e4f`]:
24690f52 Thanks @diegomura! - feat: handle standard fonts in fonts package#3087 7cd66e4f Thanks @diegomura! - fix: font exported types
#3093 a2de2685 Thanks @diegomura! - refactor: font strict type checking
#3092 481b536f Thanks @diegomura! - refactor: convert layout package to TS
Updated dependencies [7cd66e4f]:
70f29a04 Thanks @diegomura! - feat!: drop cjs supportafe4bcfe Thanks @diegomura! - feat: add gap percentage support70f29a04 Thanks @diegomura! - feat!: drop cjs support#2877 fdcef566 Thanks @Friendseeker! - chore: bump jay-peg
Updated dependencies [70f29a04]:
#2711 42570321 Thanks @wojtekmaj! - Update Yoga to 3.0
#2871 70f29a04 Thanks @diegomura! - feat!: drop cjs support
#2876 afe4bcfe Thanks @diegomura! - feat: add gap percentage support
#2875 46c3047d Thanks @diegomura! - feat: add position: static support
#2874 55973278 Thanks @diegomura! - feat: add align-content: space-evenly support
ae9a9983e8bd8b63c3873000531a8307e22c7bae, 572cedc23493e4a3085e259bf129ceec458418bd]:
884695b Thanks @diegomura! - feat: build textkit with rollup & define public api37a9a74 Thanks @diegomura! - feat: exclude rects on textkit layout container0fcc594 Thanks @diegomura! - chore: use unicode-properties mainline repoUpdated dependencies [`627acbe0`]:
#3464 8c723cca Thanks @diegomura! - Declare @react-pdf/primitives dependency.
Updated dependencies [627acbe0]:
70f29a04 Thanks @diegomura! - feat!: drop cjs support70f29a04 Thanks @diegomura! - feat!: drop cjs support#2877 fdcef566 Thanks @Friendseeker! - chore: bump jay-peg
Updated dependencies [70f29a04]:
9a2b935 Thanks @diegomura! - refactor: remove ramda from textkit package#1838 9bdb5c9 Thanks @diegomura! - feat: create fns package
Updated dependencies [434df31, 9bdb5c9]:
### Minor Changes - #2409 `b6a14fd` Thanks @wojtekmaj! - Add support for native ESM
b6a14fd Thanks @wojtekmaj! - Add support for native ESM#1567 5d2d688 Thanks @hayoung0Lee! - fixed line breaks for the case when the word in a text is bigger than the given width
Updated dependencies [4c5d527, 04449ab]:
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
### Major Changes - #3224 `fafbcb12` Thanks @ZandercraftGames! - feat: add React 19.2.X support ### Patch Changes - #3261 `2eba70bd` Thanks @Nukem154!
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
Nothing published for this version
### Minor Changes - #3531 `b768f01e862cd56987f046c117919191ef810646` Thanks @diegomura! - Reintroduce @react-pdf/svgkit: a pdfkit-shaped drawing conte
b768f01e862cd56987f046c117919191ef810646 Thanks @diegomura! - Reintroduce @react-pdf/svgkit: a pdfkit-shaped drawing context that renders documents to SVG strings. @react-pdf/render gains an optional ctx.glyphs capability seam so non-PDF backends receive raw glyphs; pdf output is unchanged.One column per quarter.