Download Latest Version openpublisher5g_amd64-windows.exe (81.1 MB)
Home / 5.7.8
Name Modified Size InfoDownloads / Week
Parent folder
5.7.8_ Client App Margin Compatibility _ Universal Canvas Centering source code.tar.gz 2026-10-12 22.5 MB
5.7.8_ Client App Margin Compatibility _ Universal Canvas Centering source code.zip 2026-10-12 22.8 MB
README.md 2026-10-12 8.1 kB
OpenPublisher-5-x86_64.AppImage 2026-10-12 166.4 MB
openpublisher5_amd64-windows-portable.exe 2026-10-12 183.2 MB
openpublisher5_amd64-windows.exe 2026-10-12 165.2 MB
openpublisher5_amd64-macos.dmg 2026-10-12 233.1 MB
openpublisher5_amd64-linux.run 2026-10-12 193.4 MB
openpublisher5_amd64-linux.rpm 2026-10-12 215.4 MB
openpublisher5_amd64-linux.flatpak 2026-10-12 153.6 MB
openpublisher5_amd64-linux.deb 2026-10-12 156.2 MB
openpublisher5_amd64-freebsd.pkg 2026-10-12 185.5 MB
Totals: 12 Items   1.7 GB 0

🚀 Summary

Version 5.7.8 resolves desktop client alignment and navigation inconsistencies occurring inside the NW.js desktop client (wrapper.html embedding the web app in a <webview> frame), while preserving standard browser flexbox behavior and unifying multi-page mode return navigation:

  1. NW.js Pasteboard Margin Awareness: Automatically detects when desktop container margins are present (paper.style.marginLeft / marginRight) and harmonizes canvas scroll bounds and resting offsets without causing MutationObserver coordinate thrashing.
  2. User 1 Right-Offset Scroll Defect Resolved: Fixed an issue where scrolling down in NW.js and clicking the floating "Return to Page" button reset scrollLeft to 0, stranding the viewport at the far-left pasteboard margin while the document sat far over to the right. The editor now calculates the true visual horizontal center (paper.offsetLeft + paper.offsetWidth / 2) and centers the page symmetrically in the viewport.
  3. User 2 Top-Left Jump Defect Resolved: Fixed an issue where scrolling down and right into scratch space caused updateCanvasScrollBounds() to assign conflicting paper.style.left offsets on top of NW.js margins, triggering coordinate resets to (0, 0) that forced users to manually scroll back down and right. Scroll bounds now accurately calculate the effective right edge as paper.offsetLeft + scaledW + marginRight.
  4. Universal Multi-Page Mode Return: In Multi-Page Overview, clicking "Return to Page" cleanly centers the currently active page slot (slots[state.currentPageIndex]) and resets vertical scrolling to 0, ensuring consistent return navigation across both Single-Page and Multi-Page modes.
  5. Multi-Page Flexbox Alignment Protection: Enforced !important on .viewport.multi-page-mode flex alignment (justify-content: flex-start; align-items: flex-start;) and explicitly synchronized flex properties during view mode transitions, preventing the multi-page wrapper from overflowing into negative coordinates.
  6. Adaptive Fit-to-Page / Fit-to-Width Centering: Enhanced fitToPage() and fitToWidth() to center the document within the available pasteboard scroll area when custom container margins are active.
  7. Complete Version & Cache Synchronization: Synchronized all 82 asset query cachebusters to ?v=5.7.8 in index.html, incremented the Service Worker cache namespace to open-publisher-v5-7-8, and updated all subsystem headers and logs.

🔍 Root Cause Analysis & Technical Implementation

1. The NW.js Guest Frame Pasteboard Architecture

  • Desktop Wrapper Implementation: Inside NW.js desktop builds, wrapper.html hosts the editor within a <webview> frame and injects an asynchronous layout script (updatePaperMargins). This script configures:
  • viewport.style.justifyContent = 'flex-start';
  • paper.style.marginLeft = marginH + 'px';
  • paper.style.marginRight = marginH + 'px'; where marginH represents approximately 80% of the viewport width (e.g. 765px to 960px).
  • Previous Failure Mode (User 1): In previous versions, returnToPage() hardcoded targetLeft = 0 whenever shiftNeeded <= 0. Calling viewport.scrollTo({ left: 0 }) scrolled the viewport to the absolute left edge of the pasteboard margin (scrollLeft = 0), leaving the document resting at marginLeft = 765px far to the right.
  • Previous Failure Mode (User 2): In updateCanvasScrollBounds(), the web app attempted to set paper.style.left = shiftNeeded + 'px' whenever shiftNeeded > 0, conflicting with the desktop margins and causing coordinate oscillation between the wrapper's MutationObserver and internal bounds recalculation.
  • The Solution in 5.7.8:
  • Implemented hasCustomMargin detection (!!(paper.style.marginLeft && paper.style.marginLeft !== '' && paper.style.marginLeft !== '0px')).
  • When hasCustomMargin is active, updateCanvasScrollBounds() skips assigning inline paper.style.left and computes calculatedRightEdge = Math.max(vpW, effectivePaperRight + rightScratch, paper.offsetLeft + scaledW + marginRight).
  • In returnToPage(), single-page mode calculates paperVisualCenter = paper.offsetLeft + (paperW / 2) and targets Math.max(0, Math.min(vp.scrollWidth - vpW, Math.round(paperVisualCenter - (vpW / 2)))).
  • Vertical positioning targets paperVisualTop <= 60 ? 0 : Math.max(0, Math.min(vp.scrollHeight - vpH, Math.round(paperVisualTop - 50))), providing an exact 50px top padding resting spot.

2. Multi-Page Overview Alignment & Center Targeting

  • The Problem: In Multi-Page Mode, if viewport.style.justifyContent = 'center' remained from single-page mode, Flexbox centered the unscaled #multi-page-wrapper box across the container, pushing the left edge into negative coordinates ((1080 - 2562) / 2 = -741px).
  • The Solution:
  • Added !important to .viewport.multi-page-mode in style.css (justify-content: flex-start !important; align-items: flex-start !important;).
  • Updated enterMultiPageView() to explicitly set viewport.style.justifyContent = 'flex-start' and viewport.style.alignItems = 'flex-start'.
  • Updated exitMultiPageView() to restore viewport.style.justifyContent = hasCustomMargin ? 'flex-start' : ''.
  • Updated highlightAndCenterMultiPageSlot() to include wrapper.offsetLeft (accounting for the 50px viewport padding) and reset vertical scroll to 0.
  • Updated returnToPage() to delegate to highlightAndCenterMultiPageSlot(state.currentPageIndex) when in multi-page mode.

📁 Files Modified in 5.7.8

File Changes
canvas/canvas.js Added hasCustomMargin detection in updateCanvasScrollBounds(), unified single-page visual center calculations in returnToPage(), updated highlightAndCenterMultiPageSlot() with wrapper offset and vertical reset, synchronized flex alignment in enterMultiPageView() and exitMultiPageView(), and updated fitToPage() and fitToWidth() centering fallbacks.
style.css Added !important to .viewport.multi-page-mode flex alignment rules. Bumped header comments to (v5.7.8).
index.html Synchronized all 82 asset cachebusters to ?v=5.7.8.
sw.js Bumped Service Worker cache namespace to open-publisher-v5-7-8 and header to (v5.7.8).
extensions/ui-interactions.js Bumped About dialog version to v5.7.8.
extensions/pwa-install.js Bumped header to (v5.7.8) and Service Worker registration query to sw.js?v=5.7.8.
ui/dashboard.js Updated template fetch cachebuster queries to ?v=5.7.8.
extensions/legacy-fixes.js Bumped engine log to v5.7.8.
extensions/print-engine.js Bumped print sequence log string to v5.7.8.
ui/modals/options-modal.js Bumped header comment to (v5.7.8).
ui/sidebar-context.js Bumped header comment to (v5.7.8).
tools/proofing/spellcheck-engine.js Bumped header comment to (v5.7.8).

✅ v5.7.8 Automated Test Verification

Test Suite Environment Scenario Result
Suite 1A NW.js Guest Simulation User 1: Scrolled down 1200px, clicked Return to Page PASSED (centerOffset: 0px, scrollTop: 0px, button hidden)
Suite 1B NW.js Guest Simulation User 2: Scrolled down & right into scratch space, clicked Return to Page PASSED (centerOffset: 0px, scrollTop: 0px, paperTop: 50px, button hidden)
Suite 2 Standard Browser Standard flexbox centering, scrolled down & right into scratch space PASSED (centerOffset: 0px, scrollTop: 0px, button hidden)
Suite 3 Multi-Page Mode Scrolled down 2000px & right 2500px, clicked Return to Page PASSED (centerOffset: 0px, scrollTop: 0px, slot active preserved, button hidden)
Cross-Browser Parity Chromium & Firefox Executed all 4 suites across both browser engines 100% PASSED in both Chromium and Firefox

🎉 Version 5.7.8 - Open Publisher

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