Download Latest Version openpublisher5g_amd64-windows.exe (81.1 MB)
Home / 5.9.4
Name Modified Size InfoDownloads / Week
Parent folder
OpenPublisher5-i386-windowsXP.exe 2026-10-17 56.5 MB
openpublisher5_amd64-windows-portable.exe 2026-10-17 183.2 MB
5.9.4_ Printed Text Background Word-Wrap Prevention _ Width Ceiling Lock source code.tar.gz 2026-10-17 23.3 MB
5.9.4_ Printed Text Background Word-Wrap Prevention _ Width Ceiling Lock source code.zip 2026-10-17 23.6 MB
README.md 2026-10-17 5.6 kB
openpublisher5_amd64-windows.exe 2026-10-17 165.2 MB
openpublisher5_amd64-macos.dmg 2026-10-17 233.1 MB
openpublisher5_amd64-linux.run 2026-10-17 193.4 MB
openpublisher5_amd64-linux.rpm 2026-10-17 215.4 MB
openpublisher5_amd64-linux.flatpak 2026-10-17 153.6 MB
openpublisher5_amd64-linux.deb 2026-10-17 156.2 MB
openpublisher5_amd64-linux.AppImage 2026-10-17 166.4 MB
openpublisher5_amd64-freebsd.pkg 2026-10-17 185.5 MB
Totals: 13 Items   1.8 GB 0

πŸš€ Summary

Version 5.9.4 resolves a regression introduced in v5.9.3 where trailing words on multi-word lines inside segmented inline text backgrounds (such as "street" in "17 Paynter street" or "gardens" in "Orange gardens") disappeared during print and PDF export while their dark background strip remained full-width.

Open Publisher v5.9.4 enforces single-line whitespace locking (white-space: nowrap or white-space: pre) on every segmented line element and restores integer ceiling rounding (Math.ceil) when freezing pixel widths onto line.style.width, ensuring that trailing words never wrap behind subsequent background strips while preserving the exact 1-2px inter-line gap, sharp 90-degree corners, and zero cumulative vertical offset established in v5.9.3.


πŸ” Root Cause Analysis & Architecture Solution

1. Why Trailing Words Vanished on Multi-Word Lines in v5.9.3

  • In v5.9.3, after segmenting a multi-line inline <span> into per-line block elements, each line's width was locked using finalW.toFixed(2) + 'px' without setting white-space: nowrap.
  • Whenever a line's sub-pixel width had a third decimal digit between 1 and 4 (for example, 128.344px), .toFixed(2) rounded the locked width down to 128.34px (0.004px narrower than the text's actual advance width).
  • Because the box width remained 128.34px, the dark background strip still rendered at the full width of "17 Paynter street". However, because 128.34px was 0.004px narrower than the text and wrapping was still enabled, Chromium's line breaker wrapped the trailing word ("street" on Line 1, "gardens" on Line 2) onto a second line inside the fixed-height block (height: stripHeight).
  • When html2canvas rendered the subsequent sibling line ("Orange" on Line 2, "Pembroke" on Line 3), that sibling's opaque dark #313338 background painted directly over the wrapped word from the line above, making "street" and "gardens" appear completely invisible. Single-word lines ("Pembroke", "Pembrokeshire", "Sa714ed") had no spaces and therefore could not wrap.

2. Single-Line Whitespace Enforcement & Ceiling Width Locking

  • Strict Single-Line Whitespace (noWrapMode): Because every element in linesCreated has already been segmented at both explicit <br> breaks and soft-wrap boundaries so that each element represents strictly one visual line, formatLineElement now sets el.style.whiteSpace = noWrapMode ('pre' when the source element uses pre, pre-wrap, or break-spaces, and 'nowrap' otherwise) and el.style.maxWidth = 'none'. This forbids the browser from ever breaking a segmented line across multiple lines.
  • Ceiling Pixel Width Locking (Math.ceil): splitInlineBackgroundAtBr measures textRect.width and lineRect.width prior to applying height constraints and rounds textW, rectW, and finalW upward via Math.ceil(...). This guarantees that the locked pixel width is always greater than or equal to the exact sub-pixel glyph advance width.

πŸ“ Files Modified in 5.9.4

File Changes
extensions/print-engine.js Updated splitInlineBackgroundAtBr to apply whiteSpace: noWrapMode (nowrap or pre), maxWidth: none, and Math.ceil width locking on segmented line elements prior to height locking. Bumped header to (v5.9.4).
index.html Updated all script, stylesheet, and asset cachebuster queries in <head> and <body> from ?v=5.9.3 to ?v=5.9.4.
sw.js Updated Service Worker cache namespace to open-publisher-v5-9-4 and header to (v5.9.4).
elements/text/text.js Bumped header comment to (v5.9.4).
core/core.js Bumped header comment to (v5.9.4).
core/boot.js Bumped header comment to (v5.9.4).
extensions/legacy-fixes.js Bumped header comment to (v5.9.4).
extensions/ui-interactions.js Bumped header comment and initialization log to (v5.9.4).
extensions/pwa-install.js Bumped header comment to (v5.9.4).
ui/menus.js Bumped header comment to (v5.9.4).
ui/sidebar-context.js Bumped header comment to (v5.9.4).
ui/modals/card-sheet-modal.js Bumped header comment to (v5.9.4).
ui/modals/options-modal.js Bumped header comment to (v5.9.4).
tools/proofing/spellcheck-engine.js Bumped header comment to (v5.9.4).

wrapper.html was not modified.


βœ… v5.9.4 Verification Checklist

  • [x] No Disappearing Trailing Words: Verified that multi-word lines ("17 Paynter street", "Orange gardens", "Hope you're both ok") retain all words on their single line without wrapping behind adjacent background strips.
  • [x] Single-Line Whitespace Lock: Confirmed white-space: nowrap (or pre for preformatted text) is applied to each segmented line element.
  • [x] Ceiling Width Rounding: Confirmed Math.ceil is used for textW, rectW, and finalW so locked widths never round down below sub-pixel glyph advance widths.
  • [x] 1-2px Inter-Line Gap & Zero Vertical Offset Preserved: Verified that the 1-2px gap (lineGap), sharp 90-degree corners (0px radius), and stripHeight + lineGap === lineStride vertical parity from v5.9.3 remain completely intact.
  • [x] Service Worker & Cachebuster Sync: Verified sw.js cache name is open-publisher-v5-9-4 and asset queries across index.html reference ?v=5.9.4.
  • [x] Subsystem Version Consistency: Confirmed all modified subsystems and modules reflect version 5.9.4.

πŸŽ‰ Version 5.9.4: Open Publisher

Source: README.md, updated 2026-10-17