Download Latest Version openpublisher5g_amd64-windows.exe (81.1 MB)
Home / 5.18.0
Name Modified Size InfoDownloads / Week
Parent folder
OpenPublisher5-i386-windowsXP.exe 2026-11-04 56.5 MB
openpublisher5_amd64-windows-portable.exe 2026-11-04 183.2 MB
openpublisher5_amd64-windows.exe 2026-11-04 165.2 MB
openpublisher5_amd64-macos.dmg 2026-11-04 233.1 MB
openpublisher5_amd64-linux.run 2026-11-04 193.4 MB
openpublisher5_amd64-linux.rpm 2026-11-04 215.4 MB
openpublisher5_amd64-linux.flatpak 2026-11-04 153.6 MB
openpublisher5_amd64-linux.deb 2026-11-04 156.2 MB
openpublisher5_amd64-linux.AppImage 2026-11-04 166.4 MB
openpublisher5_amd64-freebsd.pkg 2026-11-04 185.5 MB
5.18.0_ Desktop Client Save As Overwrite Fix _ File Path Detachment source code.tar.gz 2026-11-04 102.6 MB
5.18.0_ Desktop Client Save As Overwrite Fix _ File Path Detachment source code.zip 2026-11-04 103.2 MB
README.md 2026-11-04 8.9 kB
Totals: 13 Items   1.9 GB 0

πŸ“ Summary

Version 5.18.0 resolves a critical data-preservation issue in the desktop client wrapper where saving an existing publication under a new filename (for instance, when using an existing document as a template) silently overwrote the original file on disk instead of writing to a new file. Because the desktop client wrapper operates in a sandboxed host environment maintaining a single retained file path (activeFilePath), standard save commands previously dispatched document payloads directly to that remembered path regardless of document renaming or Save As invocations. By implementing intelligent path detachment in the web application bridge through an immediate OP_NEW_DOC detachment signal before OP_SAVE_DATA, the desktop wrapper is cleanly decoupled from its prior path, triggering its native OS Save As dialog to prompt the user for a new target location, record the new file in recent files, and rebind all subsequent standard saves (Ctrl+S) exclusively to the newly chosen file while leaving the original template document completely untouched. Furthermore, an intelligent title-tracking safety net has been added across document loading, new document creation, and inline title editing, ensuring that any publication saved with an altered title automatically detaches and routes through the native Save As workflow, with full version synchronization across the Service Worker (open-publisher-v5-18-0-1), UI About dialog, and application asset cachebusters to v5.18.0.

op-DesktopSaveAsPipelineAndDocumentPreservation

πŸš€ Enhancements & Features

πŸ’Ύ Desktop Wrapper Path Detachment & Native Save As Pipeline (extensions/system-patches.js)

  • Root Cause Resolution:
  • The desktop wrapper relies on an internal variable (activeFilePath) to route OP_SAVE_DATA messages directly to disk via atomic writes. When Save As was invoked from the web application, activeFilePath remained bound to the original file, causing the wrapper to overwrite the opened file instead of prompting for a new location.
  • Inspection of the desktop wrapper (wrapper.html) confirmed that the wrapper already includes a complete native Save As implementation using an NW.js native file dialog (<input type="file" nwsaveas>) whenever activeFilePath is null.
  • The wrapper also natively supports an OP_NEW_DOC IPC event that invokes setActiveFilePath(null).
  • masterSaveDocument(isTemplate, forceSaveAs) now detects when a save represents a Save As operation (forceSaveAs === true, isTemplate === true, or an altered document title) and dispatches console.log('OP_IPC:{"type":"OP_NEW_DOC"}') immediately prior to OP_SAVE_DATA.
  • Because webview console messages are processed in strict sequential FIFO order, the wrapper decouples activeFilePath first, allowing the subsequent OP_SAVE_DATA to trigger the native OS file picker where users choose their desired destination folder and file name.

πŸ›‘οΈ Document Renaming Safety Net & File Path Tracking (extensions/system-patches.js, io/publisher-file-loader.js)

  • Title Tracking Baseline (window._wrapperBoundTitle):
  • When an existing publication is loaded via handlePublisherFileLoad / loadPublicationWithProgress / applyDocumentToState, the application records window._wrapperBoundTitle = docTitle.
  • When opening a built-in template or document marked isTemplate: true, window._wrapperBoundTitle is explicitly reset to null to ensure the template source can never be overwritten.
  • When a user starts a new publication (handleNewDocument in core/pages.js or startBlank in ui/dashboard.js), window._wrapperBoundTitle is cleared.
  • Safety Net for Direct Title Editing:
  • If a user opens a document (such as Invoice-Template.opub), clicks into the document title field in the top bar, and renames it to Invoice-101, any subsequent standard save (Ctrl+S or ribbon Save) automatically recognizes that currentTitle !== window._wrapperBoundTitle.
  • The save system detects the rename (isRenamed = true) and promotes the standard save to a Save As action, emitting OP_NEW_DOC to guarantee the original template file remains preserved.
  • Save Completion Title Synchronization (window.finishDesktopSaveAnimation):
  • Implemented window.finishDesktopSaveAnimation to catch the wrapper's post-save callback.
  • Once the native Save As dialog completes and the file is written to the user's selected path, the callback synchronizes window._wrapperBoundTitle with the finalized document title.
  • Subsequent standard Ctrl+S saves proceed silently and atomically against the new file path without showing redundant dialogs.

🌐 Unified Web & Desktop Save As System (extensions/system-patches.js, io/file-io.js)

  • Dedicated masterSaveDocumentAs() Method:
  • Standardized window.saveDocumentAs with a protected getter/setter definition in extensions/system-patches.js.
  • In desktop mode, saveDocumentAs() routes directly to masterSaveDocument(false, true), triggering the native Windows file save dialog immediately without duplicate prompts.
  • In modern web browsers supporting the File System Access API (window.showSaveFilePicker), it invokes the browser native Save As file picker with suggested filename and extension.
  • In legacy web browsers without the File System Access API, it falls back to the in-app naming dialog followed by standard file download generation.
  • Synchronized io/file-io.js:
  • Updated window.saveDocumentAs in io/file-io.js to pass forceSaveAs = true (window.saveDocument(false, true)), guaranteeing consistency across all execution contexts.

πŸ” Desktop Wrapper Investigation & Audit Findings

  • Wrapper Line 16724 Audit:
  • Thoroughly audited wrapper.html around line 16724. Confirmed that line 16724 is exclusively part of logIpcEvent(parsedData, direction), which formats messages for display within the wrapper DevTools and diagnostic log drawer.
  • Confirmed that line 16724 contains no operational file writing or secondary save logic. The sole functional save listener is located at line 10359, which cleanly branches on if (activeFilePath) and responds perfectly to OP_NEW_DOC at line 10518.

πŸ“¦ Version Synchronization (v5.18.0)

Component Target Version Updated Reference
Service Worker v5.18.0 open-publisher-v5-18-0-1 in sw.js
About Dialog v5.18.0 Free Online Desktop Publishing Tool β€’ v5.18.0 in extensions/ui-interactions.js
UI Interactions Header v5.18.0 Header documentation in extensions/ui-interactions.js
Export Template Modal v5.18.0 Package metadata and README in ui/modals/export-template-modal.js
Line Spacing Modal v5.18.0 Header documentation in ui/modals/line-spacing-modal.js
Style Header v5.18.0 Header documentation in style.css
Template Asset Loaders v5.18.0 getTemplateAssetUrl in elements/templates/templates.js and ui/dashboard.js
Application Cachebusters v5.18.0 All 93 script and stylesheet links updated to ?v=5.18.0 in index.html
Context Menus v5.18.0 WordArt icon cachebusters in ui/menus.js

βœ… Checklist Completed

  • [x] Investigate wrapper.html around line 16724 and confirm it is strictly DevTools logging with no secondary save handling
  • [x] Verify wrapper IPC save handler at line 10359 and confirm OP_NEW_DOC handler at line 10518
  • [x] Implement path detachment via OP_NEW_DOC in masterSaveDocument (extensions/system-patches.js)
  • [x] Add forceSaveAs and rename detection (isRenamed) logic in masterSaveDocument
  • [x] Track window._wrapperBoundTitle in io/publisher-file-loader.js on document load
  • [x] Clear window._wrapperBoundTitle for template loading, new document creation (core/pages.js), and dashboard blank starts (ui/dashboard.js)
  • [x] Implement window.finishDesktopSaveAnimation to synchronize bound titles after wrapper saves
  • [x] Define protected masterSaveDocumentAs() in extensions/system-patches.js and update io/file-io.js
  • [x] Bump application version and About dialog to v5.18.0
  • [x] Bump Service Worker cache bucket to open-publisher-v5-18-0-1 in sw.js
  • [x] Synchronize asset cachebusters across index.html, ui/dashboard.js, and ui/menus.js to ?v=5.18.0
  • [x] Verify no em dash characters are present in release notes artifact
  • [x] Ensure untracked wrapper.html is not modified or committed to repository

πŸ“– Version 5.18.0 - Open Publisher

Source: README.md, updated 2026-11-04