Download Latest Version openpublisher5g_amd64-windows.exe (81.1 MB)
Home / 4.20.3
Name Modified Size InfoDownloads / Week
Parent folder
OpenPublisher_setup.exe 2026-09-12 69.3 MB
OpenPublisher.deb 2026-09-12 96.8 MB
OpenPublisher.AppImage 2026-09-12 125.8 MB
OpenPublisher_Portable.exe 2026-09-12 74.8 MB
OpenPublisher.dmg 2026-09-12 108.1 MB
OpenPublisher.rpm 2026-09-12 128.2 MB
4.20.3_ The Permanent Page Orientation _ Rotation Lock source code.tar.gz 2026-09-12 21.4 MB
4.20.3_ The Permanent Page Orientation _ Rotation Lock source code.zip 2026-09-12 21.7 MB
README.md 2026-09-12 5.4 kB
Totals: 9 Items   646.2 MB 0

πŸš€ Summary

Version 4.20.3 permanently resolves an evil, despised, intermittent, anger inducing issue where saved publications would occasionally reopen with pages flipped between portrait and landscape modes. By introducing explicit, permanent orientation metadata both at the root level of the .opub file format and within each individual page record, OpenPublisher ensures that saved document layout is locked in and immune to legacy auto-orientation guessing.


πŸ› οΈ Enhancements & Fixes

1. Root Cause: Legacy Auto-Rotator & Missing Metadata

In earlier versions, a background helper interval in extensions/system-patches.js inspected canvas elements every 100ms. If it found an image whose width exceeded its height (such as a wide banner on a portrait document), it assumed the entire page should be landscape and flipped the dimensions to 1123px x 794px. Conversely, a tall portrait photo on a landscape document could flip the page to portrait.

While in-memory locks existed to mitigate this, certain loading flows (such as opening recent files from the Dashboard start screen, importing templates, or adding new pages) bypassed the registry. Furthermore, older .opub files lacked an explicit orientation record, relying strictly on raw pixel width and height.


2. Dual-Layer Orientation Metadata in .opub Format

  • Root-Level Orientation (orientation): Every saved .opub file now explicitly records the publication's overall orientation ("portrait" or "landscape") at the top level alongside title, hasMasterPage, and isSpreadMode.
  • Per-Page Orientation (page.orientation): Each individual page object in the pages array now stores its own independent "orientation" tag. This provides complete support for multi-page documents with mixed orientations (for example, portrait text pages combined with landscape charts or foldouts).

3. File Loader, Recent Files & Template Enforcement

  • Native File Loader (io/publisher-file-loader.js): When opening an .opub document, the loader reads both root and page orientation tags. If dimensions do not match the orientation, it corrects them immediately and registers every page ID into the internal lock registry (window._orientedPagesRegistry).
  • Dashboard Recent Files (ui/dashboard.js): Opening recent publications now performs deep page cloning, normalizes aspect ratios against the explicit orientation tag, and immediately locks all page IDs against background mutation.
  • Template System (elements/templates/templates.js): Applying templates now establishes explicit page orientation tags and registers fresh page IDs, preventing templates from shifting on first render.

4. Background Watcher Hard Guard

  • Watcher Bypass (extensions/system-patches.js): Both 100ms background auto-rotation loops now immediately check if (currentPage.orientation) return;. If a page has an explicit orientation tag, the watcher locks the page ID and exits without altering paper dimensions.

5. Ribbon Controls, New Page Creation & History Synchronization

  • Page Serializer (core/history.js): serializeCurrentPage() automatically calculates and records orientation based on current canvas dimensions, guaranteeing undo/redo history snapshots maintain the correct orientation state.
  • Orientation & Sizing Controls (layout/document.js): Toggling orientation (toggleOrientation), switching standard presets (setPageSize), or resizing (changeSize) instantly updates the active page's orientation attribute and re-asserts the registry lock.
  • Page Creation (core/pages.js): addNewPage() and addMasterPage() automatically stamp the correct orientation metadata onto newly created pages.

βœ… Checklist Completed

  • [x] core/history.js: Added explicit orientation serialization in serializeCurrentPage() and reinforced orientation restoration and registry locking in restoreSnapshot().
  • [x] core/pages.js: Added orientation normalization and registry locking in renderPage(); added explicit orientation calculation in addNewPage() and addMasterPage().
  • [x] layout/document.js: Updated toggleOrientation(), setPageSize(), and changeSize() to immediately synchronize page orientation and register locks.
  • [x] io/file-io.js: Updated saveDocument() to write root-level orientation and verify per-page orientation across all saved pages.
  • [x] io/publisher-file-loader.js: Added orientation evaluation, dimension normalization, and complete registry locking on file load.
  • [x] ui/dashboard.js: Added deep page cloning, orientation normalization, and registry locking when opening recent files.
  • [x] elements/templates/templates.js: Added orientation tagging and registry locking in loadTemplate(); bumped template fetch cachebuster to ?v=4.20.3.
  • [x] extensions/system-patches.js: Added hard guards in both auto-rotator intervals to bypass rotation if currentPage.orientation exists.
  • [x] index.html: Synchronized all 74 asset cachebusters to ?v=4.20.3.

v420 Version 4.20.3 - Open Publisher

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