| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| openpublisher5_amd64-windows-portable.exe | 2026-09-28 | 183.2 MB | |
| openpublisher5_amd64-windows.exe | 2026-09-28 | 165.2 MB | |
| openpublisher5_amd64-macos.dmg | 2026-09-28 | 233.1 MB | |
| openpublisher5_amd64-linux.run | 2026-09-28 | 193.4 MB | |
| openpublisher5_amd64-linux.rpm | 2026-09-28 | 215.4 MB | |
| openpublisher5_amd64-linux.flatpak | 2026-09-28 | 153.6 MB | |
| 5.1.9_ Spreads Mode Saved as Document Metadata source code.tar.gz | 2026-09-28 | 21.5 MB | |
| 5.1.9_ Spreads Mode Saved as Document Metadata source code.zip | 2026-09-28 | 21.7 MB | |
| README.md | 2026-09-28 | 4.0 kB | |
| openpublisher5_amd64-linux.deb | 2026-09-28 | 156.2 MB | |
| openpublisher5_amd64-linux.AppImage | 2026-09-28 | 176.6 MB | |
| openpublisher5_amd64-freebsd.pkg | 2026-09-28 | 185.5 MB | |
| Totals: 12 Items | 1.7 GB | 0 | |
๐ Summary
Version 5.1.9 resolves a bug where documents would sometimes open with Spreads mode enabled unexpectedly, most often when the document had been saved at a non-standard DPI (such as 150 DPI or 300 DPI print resolution). Spreads mode is now driven entirely by the saved document metadata - if a document was saved with spreads on, it opens with spreads on; if not, it never opens with spreads regardless of the page dimensions or DPI.
๐ Root Cause Analysis
The file loader (io/publisher-file-loader.js) contained a legacy "inference" fallback for old .opub files that predated the isSpreadMode metadata field. When isSpreadMode was absent from the saved file, it guessed the spreads state from the page pixel width:
:::js
// OLD - broken legacy inference
} else if (data.pages && data.pages.length > 0) {
const w = parseInt(data.pages[0].width) || 0;
state.isSpreadMode = w >= 1500; // Infer spreads if width is double standard
}
Why this caused random spreads activation:
The threshold of >= 1500px was originally designed to detect doubled-width spread pages (e.g. 2x A4 at 96 DPI = 1588px). However, any document saved at a higher DPI also has wide page pixel dimensions:
| Format | DPI | Page width (px) | Spreads incorrectly triggered? |
|---|---|---|---|
| A4 | 96 | 794px | No |
| A4 | 150 | 1240px | No |
| A4 | 200 | 1654px | Yes |
| A4 | 300 | 2480px | Yes |
| Letter | 150 | 1275px | No |
| Letter | 200 | 1700px | Yes |
| Letter | 300 | 2550px | Yes |
Because the width threshold was based on pixel count rather than document intent, any file saved at 200 DPI or higher would silently open in spreads mode - even single-page documents. The issue was inconsistent because:
- Files saved by the current version of Open Publisher already include
isSpreadModeexplicitly in their metadata, so those would be read correctly. - Files that were re-saved after a DPI change went through paths that could strip or omit the field, causing the inference to run on the next load.
๐ ๏ธ Fix
The width-based inference is removed entirely. isSpreadMode is always saved explicitly in modern .opub files by io/file-io.js. For any legacy file that truly predates the field, the correct safe default is false - the user can toggle spreads manually from the Layout menu if needed.
:::js
// NEW - metadata-driven, no inference
if (data.isSpreadMode !== undefined) {
state.isSpreadMode = !!data.isSpreadMode;
} else {
// Legacy file with no isSpreadMode field: always default to false.
// The user can toggle spreads manually if the document requires it.
state.isSpreadMode = false;
}
The !! coercion on data.isSpreadMode is also added to guard against any edge case where the field was saved as a truthy non-boolean value.
๐ All Load Paths Reviewed
| Load path | Spreads handling | Status |
|---|---|---|
io/publisher-file-loader.js - open .opub file |
Was using width inference - fixed | Fixed |
ui/dashboard.js - load from Recent files |
Uses !!fileData.isSpreadMode - no inference |
Already correct |
core/history.js - undo/redo |
Uses snap.isSpreadMode \|\| false - no inference |
Already correct |
io/file-io.js - save |
Saves state.isSpreadMode \|\| false explicitly |
Already correct |
โ Checklist Completed
- [x]
io/publisher-file-loader.js: Removed thew >= 1500width-based spread inference. Spreads state is now read exclusively fromdata.isSpreadMode, defaulting tofalsefor legacy files that predate the field. - [x]
index.html: Bumped all script, stylesheet, and asset cachebusters from?v=5.1.8to?v=5.1.9. - [x]
ui/dashboard.js: Bumped template index fetch from?v=5.1.8to?v=5.1.9.
๐ Version 5.1.9 - Open Publisher