| Name | Modified | Size | Downloads / Week |
|---|---|---|---|
| Parent folder | |||
| 5.21.3_ Per-Page (_Current_) Watermark Persistence _ Independent Multi-Page Stamps source code.tar.gz | 2026-11-15 | 123.1 MB | |
| 5.21.3_ Per-Page (_Current_) Watermark Persistence _ Independent Multi-Page Stamps source code.zip | 2026-11-15 | 123.7 MB | |
| README.md | 2026-11-15 | 6.4 kB | |
| OpenPublisher5-i386-windowsXP.exe | 2026-11-15 | 56.5 MB | |
| openpublisher5g_amd64-windows.exe | 2026-11-15 | 81.1 MB | |
| openpublisher5_amd64-windows-portable.exe | 2026-11-15 | 183.2 MB | |
| openpublisher5_amd64-windows.exe | 2026-11-15 | 165.2 MB | |
| openpublisher5_amd64-macos.dmg | 2026-11-15 | 233.1 MB | |
| openpublisher5_amd64-linux.run | 2026-11-15 | 193.4 MB | |
| openpublisher5_amd64-linux.rpm | 2026-11-15 | 215.4 MB | |
| openpublisher5_amd64-linux.flatpak | 2026-11-15 | 153.6 MB | |
| openpublisher5_amd64-linux.deb | 2026-11-15 | 156.2 MB | |
| openpublisher5_amd64-linux.AppImage | 2026-11-15 | 166.4 MB | |
| openpublisher5_amd64-freebsd.pkg | 2026-11-15 | 185.5 MB | |
| Totals: 14 Items | 2.0 GB | 0 | |
📋 Summary
Version 5.21.3 resolves a document state bug where applying a Current page watermark (scope === 'current') to a second page overwrote and removed the previous Current-page watermark on earlier pages. Watermarks scoped to Current Page Only now persist independently on each page, survive page switching and Undo/Redo history snapshots, and render accurately in multi-page Print and PDF exports.
- Per-Page Watermark Storage (
page.watermark): Applying a watermark with Current scope now stores the configuration directly on that page object (state.pages[pageIndex].watermark) instead of overwriting the shared document-levelstate.watermark. - Scoped Modal Inspection & Removal: Opening the Watermark modal on any page initializes controls from that page's resolved watermark (
WatermarkEngine.getWatermarkForPage()), and removing a per-page watermark clears only the active page without affecting watermarks on other pages. - History, Sidebar, & Print/PDF Sync: Updated page serialization (
serializeCurrentPage) and both Print Engine export passes (print-engine.js) so per-page watermarks persist across page switches, page deletions, Undo/Redo, and vector/raster PDF output.
🛠️ Key Improvements
1. Independent Per-Page Watermarks (extensions/watermark-engine.js)
applyConfigToState(config)&migrateLegacyCurrentWatermark(): Movedscope === 'current'storage ontostate.pages[curIdx].watermarkwhile automatically migrating any legacy single-pagestate.watermarkentries into per-page storage so existing.opubdocuments stay compatible. Document-wide scopes (all,except-first,first-only) continue to usestate.watermarkand clear page-level overrides.WatermarkEngine.getWatermarkForPage(pageIndex, totalPages, pageObj): Added a unified resolver that prioritizes page-specific watermarks (page.watermark, or suppresses an explicit{ removed: true }marker if overriding a document-wide stamp) before falling back to document-wide rules (shouldApplyToPage).- Isolated
remove(silent): Removing a watermark on a page with its owncurrentwatermark now removes only that page's stamp (and displaysWatermark removed from Page N), leaving earlier and later pages untouched. Using silent document reset clears both document-wide and per-page stamps. - Scoped Modal State (
showModal): Opening Watermark settings pre-populates text, style, tiling, and Remove Watermark button visibility fromgetWatermarkForPage(curIdx, totalPages).
2. Page Serialization & Undo/Redo Preservation (core/history.js)
serializeCurrentPage(): PreservedexistingPage.watermarkcleanly when serializing the active canvas page during page switches, thumbnail refreshes,.opubsaves, andpushHistory()snapshots so switching between Page 1 and Page 2 never drops per-page watermark metadata.- Index-Safe Page Reordering/Deletion: Because Current watermarks now live directly on each
pageobject insidestate.pages, inserting or deleting earlier pages keeps each remaining page paired with its watermark automatically.
3. Multi-Page Print & Export Accuracy (extensions/print-engine.js)
- Per-Page Print & Raster Export: Updated both print watermark loops in
extensions/print-engine.jsto resolve each page's watermark viaWatermarkEngine.getWatermarkForPage(...), ensuring multi-page printouts and PDF exports render distinct per-page stamps (e.g.,DRAFTon Page 1,CONFIDENTIALon Page 2, and unwatermarked on Page 3).
🔄 Version Synchronization (v5.21.3)
| Component | Target Version | Updated Reference |
|---|---|---|
| Application Assets & Cache Busting | v5.21.3 |
index.html |
| Service Worker & Cache Store | open-publisher-v5-21-3-1 |
sw.js |
| Watermark Engine | v5.21.3 |
watermark-engine.js |
| Print & PDF Export Engine | v5.21.3 |
print-engine.js |
| AI Assistant Module | v5.21.3 |
ai-assistant.js |
| UI Interactions & About Dialog | v5.21.3 |
ui-interactions.js |
| PWA Registration & Templates | v5.21.3 |
pwa-install.js, templates.js |
| Dashboard, 404 Router, & Badges | v5.21.3 |
dashboard.js, 404.html, README.md |
✅ Checklist Completed
- [x] Fix
"Current"page watermark overwrites by storing per-page stamps onstate.pages[index].watermarkwhile keeping document-wide scopes onstate.watermark - [x] Add
WatermarkEngine.getWatermarkForPage()resolver and legacy single-page migration for backward compatibility - [x] Preserve
page.watermarkacrossserializeCurrentPage(), page switches, Undo/Redo history, and page deletions - [x] Update Watermark modal initialization and
remove()so removing a per-page watermark only clears that page - [x] Update Print Engine loops to render per-page watermarks accurately across multi-page documents
- [x] Live browser E2E verified (
Page 1DRAFT+Page 2CONFIDENTIAL+ unwatermarkedPage 3, per-page removal, Undo restore, and page deletion index persistence with zero console errors) - [x] Synchronize version strings from
5.21.2to5.21.3across core HTML/JS/SW files and README badges
🚀 Version 5.21.3 - Open Publisher