Skip to content

v0.10.3

Choose a tag to compare

@danmolitor danmolitor released this 28 May 18:38
· 586 commits to main since this release

Forme 0.10.3

Bug-fix release. If you're on 0.10.2, upgrade - it shipped a silent text-layout regression that caused right-aligned text to render off-page.


Fixed

<Text style={{ width }}> inside a flex row now renders at the correct width

A 0.10.2 regression caused text elements with an explicit width inside a flex row to be sized to the full row width instead. With textAlign: 'right', glyphs were aligned to the right edge of the oversized box and pushed off the page — clipped by PDF viewers and effectively invisible.

The bug was easy to miss: PDF bytes were deterministic, so byte-hash snapshot tests still passed. The corruption only appeared when opening the file.

// Broken on 0.10.2 — "$10.00" rendered off-page
// Correct again on 0.10.3
<View style={{ flexDirection: 'row', justifyContent: 'flex-end' }}>
  <Text style={{ width: 120, textAlign: 'right' }}>Tax:</Text>
  <Text style={{ width: 80,  textAlign: 'right' }}>$10.00</Text>
</View>

layout_text and the text branch of measure_node_height now honor a resolved fixed style.width, matching how <View> and <Image> already behaved. The <View style={{ width: N }}> wrapper workaround is no longer needed.

The 0.10.2 flex-percentage and grid-page-break fixes are unaffected.


Upgrade

npm install @formepdf/core@0.10.3 @formepdf/react@0.10.3
# plus any of: cli renderer hono next mcp resend sdk tailwind templates

Other consumers:

  • Rust: cargo add forme-pdf@0.10.3
  • Python: pip install formepdf==0.10.3
  • Go: go get github.com/formepdf/forme-go@v0.10.3
  • Docker: docker pull formepdf/forme:0.10.3
    docker pull formepdf/rasterizer:0.10.3
  • VS Code: update "Forme PDF Preview" in the
    Extensions panel

Full changelog: engine/CHANGELOG.md