Download Latest Version openpublisher5g_amd64-windows.exe (81.1 MB)
Home / 5.1.4
Name Modified Size InfoDownloads / Week
Parent folder
5.1.4_ Physical Measurement Units, DPI Conversion _ Print Engine Precision source code.tar.gz 2026-09-25 21.5 MB
5.1.4_ Physical Measurement Units, DPI Conversion _ Print Engine Precision source code.zip 2026-09-25 21.7 MB
README.md 2026-09-25 28.6 kB
openpublisher5_amd64-windows-portable.exe 2026-09-25 183.2 MB
openpublisher5_amd64-windows.exe 2026-09-25 165.2 MB
openpublisher5_amd64-macos.dmg 2026-09-25 233.1 MB
openpublisher5_amd64-linux.run 2026-09-25 193.4 MB
openpublisher5_amd64-linux.rpm 2026-09-25 215.4 MB
openpublisher5_amd64-linux.flatpak 2026-09-25 153.6 MB
openpublisher5_amd64-linux.deb 2026-09-25 156.2 MB
openpublisher5_amd64-linux.AppImage 2026-09-25 176.6 MB
openpublisher5_amd64-freebsd.pkg 2026-09-25 185.5 MB
Totals: 12 Items   1.7 GB 0

🚀 Summary

Version 5.1.4 introduces a centralized physical measurement unit (Inches, Centimeters, Millimeters, Pixels) and DPI resolution conversion subsystem across Open Publisher. Users can now design and resize documents using real-world physical print measurements with live unit conversions, customized DPI resolutions, and intelligent format detection.

This update also resolves key printing, asset insertion, and multi-page viewport issues:

  1. Multi-Sheet Print Slicing & Blank Page Elimination: Fixed print dialog spanning single-page documents across multiple sheets (e.g. 3 sheets) when printing at high DPIs (such as 300 DPI) by calculating @page dimensions using active document DPI. Furthermore, eliminated blank pages being injected between pages and at the end of print jobs by preventing sub-pixel rounding overflow, enforcing canonical preset dimensions, and applying strict page-break control.
  2. Image and Clipart Insertion Failure: Fixed crash caused by an undeclared dropCoords variable in extensions/smart-images.js.
  3. Print Spooler Hang: Resolved hangs on "Rendering page 1 of 1..." by adding strict image completion checks, safety timeouts, and scale fallback to extensions/print-engine.js.
  4. DPI-Aware Multi-Page View & Adaptive Zoom: Fixed multi-page view prematurely triggering at 20% zoom on 300 DPI documents (where 20% zoom represents normal single-page fit) by calculating activation threshold dynamically relative to document DPI (0.45 * (96 / dpi) = 14.4% at 300 DPI). Added adaptive fine-grain zoom stepping and scaled multi-page gaps, borders, and labels.

🌟 Special Thanks & Acknowledgements

  • lucastucious: For requesting and defining the physical measurement conversion requirements and workflow concepts.
  • Tallulah95: For the UI design and element positioning choices.
  • Gemini 3.8: For the mathematics, and Playwright verification.

🔍 Root Cause Analysis & Architecture

  1. Multi-Sheet Print Spanning at 300 DPI & Blank Page Insertion:
  2. At 300 DPI, an A4 page canvas has pixel dimensions of 2480px x 3508px (8.267" x 11.693" * 300 DPI).
  3. In extensions/print-engine.js, physical @page dimensions were originally hardcoded to (masterPW / 96) and (masterPH / 96).
  4. When printing a 300 DPI A4 document, the printer was instructed that the page measured 2480 / 96 = 25.833 inches wide by 3508 / 96 = 36.542 inches tall (a giant poster format).
  5. Because 36.542 inches exceeds standard A4 paper height (11.69 inches) by 3.125x, the browser printer paginated the single page across 3 sheets of paper, slicing images in half.
  6. Blank Page Injection: When floating-point round-up produced 11.693in (297.0022mm), it fractionally exceeded exact printer driver A4 height (297.0000mm) by 0.0022mm (sub-pixel overflow). Chromium paginated this tiny fraction into a new blank sheet, and unconditional page-break-after: always; forced another break, resulting in an empty sheet between pages and after the final page.
  7. Fixed 0.45 Multi-Page Activation Threshold:
  8. In canvas/canvas.js, updateMultiPageView(z) hardcoded const THRESHOLD = 0.45; (45% zoom).
  9. At 96 DPI, fitting a single A4 page on screen uses ~60% zoom, so multi-page view correctly activated only when zooming down to 45% or below.
  10. At 300 DPI, an A4 page is 2480px x 3508px, requiring ~18% to 20% zoom just to fit the single page on screen.
  11. Because 20% is less than 45%, multi-page view was immediately triggered when the user was simply viewing their active page!
  12. In addition, zoom controls and fitToPage() were hard-clamped to Math.max(0.2, ...) which prevented smooth overview zooming below 20%.
  13. Fixed-Pixel UI Indicators & Thresholds: Both renderPage() in core/pages.js and initFormatIndicator() in extensions/ui-interactions.js previously relied on rigid pixel-range thresholds rather than ratio-aware and DPI-aware format matching.
  14. Clipart and Image Insertion Failure: In extensions/smart-images.js, window.insertSmartImage did not declare dropCoords in its parameter signature. When img.onload evaluated if (dropCoords && ...), JavaScript threw ReferenceError: dropCoords is not defined, halting DOM insertion.
  15. Print Engine Spooler Hang: In extensions/print-engine.js, img.src = finalSrc was prematurely assigned before loadImageStrict. In Chromium, re-assigning identical data URLs or cached images does not fire onload once img.complete is already true. Because loadImageStrict lacked an img.complete bypass and timeout, the print promise waited indefinitely.

🛠️ Enhancements & Fixes

1. DPI-Aware Print Engine & Blank Page Elimination (extensions/print-engine.js)

  • Replaced hardcoded masterPW / 96 with masterPW / masterDpi.
  • Automatically resolves master page DPI from page.dpi, state.dpi, or canvas aspect heuristics.
  • Integrated canonical preset physical dimensions via UnitConversionService.PRESETS (e.g., A4: 8.268" x 11.692").
  • Height dimension protection: applies calc(${heightInches}in - 1px) to eliminate sub-pixel rounding overflow into blank sheets.
  • Added strict page-break-inside: avoid !important; break-inside: avoid !important; to .page elements and zero font-size / line-height resets.
  • Conditioned inline page breaks so the final page uses page-break-after: avoid; break-after: avoid; rather than unconditionally forcing a page break.
  • Configured .page:last-child with break-after: avoid !important; page-break-after: avoid !important; in the print stylesheet.
  • Physical @page dimensions for an A4 page at 300 DPI now evaluate correctly to standard paper dimensions, fitting exactly onto 1 sheet of paper in the printer dialog without tiling, slicing, or blank pages.
  • Updated html2canvas print capture scale to dynamically target ~300 DPI output (Math.round(300 / pageDpi)), avoiding gigantic 80-megapixel canvases when the document is already designed at 300 DPI.
  • Fixed rotated page dimensions in mixed-orientation documents to use physical inch dimensions.
  • Updated sidebar thumbnail badge in core/pages.js to calculate physical inches based on page.dpi.

2. Centralized Math & Physical Unit Conversion Service (core/units.js)

  • Introduced window.UnitConversionService handling bidirectional conversions between:
  • Inches (in): Pixels = Inches * DPI
  • Centimeters (cm): Pixels = (cm / 2.54) * DPI
  • Millimeters (mm): Pixels = (mm / 25.4) * DPI
  • Pixels (px): direct 1:1 mapping
  • Physical preset dimensions supported:
  • A4: 210mm x 297mm (8.27" x 11.69")
  • Letter: 8.5" x 11" (215.9mm x 279.4mm)
  • A3: 297mm x 420mm (11.69" x 16.54")
  • A5: 148mm x 210mm (5.83" x 8.27")
  • Legal: 8.5" x 14" (215.9mm x 355.6mm)
  • Tabloid: 11" x 17" (279.4mm x 431.8mm)
  • Business Card: 3.5" x 2" (88.9mm x 50.8mm)
  • Square: 210mm x 210mm (8.27" x 8.27")
  • DPI presets: 96 DPI (Standard Web / CSS default), 72 DPI (Draft / Screen), 140 DPI (Medium Resolution), 150 DPI (Medium Print), 300 DPI (High-Resolution Print), plus Custom numerical entry.
  • Added detectFormat(w, h, dpi): DPI-aware and aspect-ratio-aware format classifier that accurately identifies page formats across any chosen DPI or orientation.

3. Multi-DPI Format Detection Fix (core/pages.js & extensions/ui-interactions.js)

  • Replaced the hardcoded pixel threshold checks (shortEdge >= 1100) with UnitConversionService.detectFormat(w, h, dpi).
  • Eliminates the bug where selecting A4, Letter, or other page formats incorrectly flipped the UI indicator to A3.
  • Page format indicator icon on the ribbon now correctly reflects A4, Letter, A3, A5, Legal, Tabloid, Business Card, and Square across all resolutions.

4. Upgraded "New Document" Dialog (core/pages.js)

  • Complete modal setup replacing the simple confirmation prompt:
  • Quick format preset selector buttons (A4, Letter, A3, A5, Legal, Tabloid, Business Card, Square).
  • Orientation toggle (Portrait / Landscape) with automatic dimension swapping.
  • Units dropdown (Inches, Centimeters, Millimeters, Pixels) with live numeric conversion on change without altering physical size.
  • DPI resolution selector with custom numeric input.
  • Real-time canvas pixel preview banner (e.g. Resulting Canvas: 794 x 1123 px at 96 DPI, Portrait).

5. Upgraded "Resize Document" Dialog (layout/document.js)

  • Interactive resizing with physical unit conversion:
  • Preset format buttons for instant standard sizes.
  • Units selector with live on-the-fly dimension recalculation.
  • DPI resolution selector with custom numerical input.
  • Live preview indicator showing resulting canvas pixel dimensions.
  • Updates canvas dimensions, active page DPI, orientation, sidebar thumbnails, and undo/redo history.

6. Custom Margins & Ribbon Margins Integration (layout/document.js & index.html)

  • Custom Margins Dialog: Allows entering margins in physical units or pixels, converts dynamically between units, and calculates absolute canvas pixels based on MarginPixels = MarginInches * DocumentDPI.
  • Ribbon Margin Presets: Normal (0.5"), Narrow (0.25"), Moderate, Wide (1"), and Zero (0") now use setMarginPresetInches() to scale margins dynamically based on active document DPI.

7. Clipart and Image Insertion Reliability (extensions/smart-images.js)

  • Updated window.insertSmartImage signature to (imageSrc, fallbackSrc, dropCoords = null).
  • Eliminates ReferenceError: dropCoords is not defined.
  • Restores Ribbon Picture upload, Drag-and-Drop image insertion, Web Clipart modal imports, and clipboard paste (Ctrl+V).
  • Added immediate img.complete check for synchronously resolved data URLs.
  • Wrapped element creation in a try/catch block to guarantee spinner cleanup.

8. Print Engine Hang Resolution (extensions/print-engine.js & core/pages.js)

  • Overhauled loadImageStrict:
  • Added immediate resolution if imgEl.complete and imgEl.naturalWidth > 0.
  • Added a 2.5-second safety timeout so missing assets never lock the print pipeline.
  • Removed premature img.src = finalSrc call prior to loadImageStrict and bakeImageForPrint.
  • Updated bakeImageForPrint with a 3-second safety timeout and fast-path resolution for data URLs.
  • Added a 2-second timeout to background texture preloading.
  • Added imageTimeout: 4000 and a 12-second Promise.race fallback to scale 2 rendering on html2canvas.
  • Corrected fallback DPI in core/pages.js, io/file-io.js, and io/publisher-file-loader.js to 96 DPI.

9. DPI-Aware Multi-Page View & Adaptive Zoom (canvas/canvas.js & canvas/interaction.js)

  • Replaced the fixed 0.45 zoom threshold with window.getMultiPageThreshold(pageDpi) = 0.45 * (96 / pageDpi).
  • At 96 DPI: activates at <= 45% zoom.
  • At 300 DPI: activates at <= 14.4% zoom. This allows an A4 300 DPI page at 20% zoom to remain in clean single-page editing view without unwanted multi-page triggering.
  • Scaled multi-page layout gaps (30px * dpiRatio), wrapper padding, slot borders, and page labels (13px * dpiRatio) by pageDpi / 96 so multi-page view maintains identical optical proportions on screen across all DPIs.
  • Created zoomStepOut() and zoomStepIn() with adaptive optical step increments:
  • state.zoom < 0.25: 2% step (0.02) for high-precision control on high-DPI canvases.
  • state.zoom < 0.50: 5% step (0.05).
  • Normal zoom: 10% step (0.10).
  • Updated minimum zoom clamp across mouse wheel, Ctrl+-, zoom slider, fitToPage(), and fitToWidth() to Math.max(0.02, 0.2 * (96 / pageDpi)). At 300 DPI, minimum zoom extends down to 6.4%, enabling full-page fit and overview zoom on any display resolution.
  • Updated zoom-slider min to 5% with dynamic bounds.

10. Physical-Scale DPI Rulers & Centimeter Default (canvas/canvas.js, ui/menus.js, layout/document.js, core/pages.js, io/file-io.js, io/publisher-file-loader.js)

  • Metric Centimeter Default:
  • Global state.unit and state.rulerUnit default to Centimeters (cm), matching standard A4 dimensions (21.0 cm x 29.7 cm).
  • Page Setup dialogs (changeSize() and handleNewDocument()) now default to Centimeters (cm) and do not alter state.rulerUnit.
  • The canvas ruler consistently displays centimeters, counting from 0 to 21 cm across an A4 page, up to 29.7 cm (30 cm) vertically, and past 30 cm across the pasteboard regardless of document DPI.
  • DPI-Aware Physical Scaling:
  • Replaced the hardcoded 96 DPI formula (pxPerMm = 37.795275 / 10) with dynamic resolution calculations:
    • Metric (cm / mm): pxPerMm = pageDpi / 25.4
    • Imperial (in): pxPerUnit = pageDpi
    • Screen (px): pxPerUnit = 1
  • An A4 page (210mm x 297mm) at 300 DPI (2480px x 3508px) now accurately aligns at 21.0 cm on the horizontal ruler and 29.7 cm on the vertical ruler, matching the 96 DPI physical readout.
  • Multi-Unit Ruler Support & User Selection:
  • Added window.setRulerUnit(unit) supporting Centimeters (cm), Inches (in), Millimeters (mm), and Pixels (px).
  • Added unit selection options with active checkmarks to the ruler context menu (right-click on horizontal or vertical ruler).
  • The ruler remains in Centimeters by default and only switches units if explicitly selected by the user via the ruler context menu (state._userExplicitRulerUnit).
  • Adaptive Optical Level of Detail (LOD):
  • Scaled tick density and label steps using effectiveZoom = zoom * (pageDpi / 96). At 300 DPI (viewing zoom ~0.15 to 0.25), labels are drawn every 1 cm so every centimeter from 0 to 30 is clearly readable.
  • Automatic Synchronization:
  • Connected window.syncRulers() to renderPage(), setPageSize(), changeSize(), and toggleOrientation().
  • Publication Persistence:
  • Serialized rulerUnit and rulerUnitExplicit into .opub files and restored them during publication load.

11. DPI-Invariant Margins & Resolution Scaling (core/core.js, layout/document.js, core/pages.js, canvas/canvas.js, io/file-io.js, io/publisher-file-loader.js, extensions/system-patches.js)

  • Root Cause:
  • state.margins was previously stored as fixed 48px raw canvas units.
  • At 96 DPI, 48px is 0.5 inches (1.27 cm), or 6.04% of an A4 page width (794px).
  • When changing document resolution to 300 DPI, an A4 page became 2480px wide. Because state.margins was not scaled, it remained 48px (only 0.16 inches / 1.93% of the page width). On screen, the green dotted margin rectangle collapsed inward against the paper edge.
  • Resolution-Aware Scaling & Synchronization:
  • In layout/document.js: When DPI changes in changeSize(), state.margins is scaled proportionally by d / oldDpi (e.g. 48px * 300 / 96 = 150px), state.marginsDpi is updated to d, and both #paper .margin-guides and #margin-guide-overlay are immediately updated.
  • In core/core.js: Initialized margins: { top: 48, right: 48, bottom: 48, left: 48 } and marginsDpi: 96 in global state.
  • In core/pages.js: In renderPage(), if pageDpi !== state.marginsDpi, state.margins is scaled to match pageDpi and updated in the .margin-guides DOM element. In handleNewDocument(), initialized state.margins to Math.round(0.5 * d) (150px at 300 DPI) and state.marginsDpi = d.
  • In canvas/canvas.js: In syncMarginGuideOverlay(), fallback margins calculate dynamically using Math.round(0.5 * curDpi).
  • In layout/document.js: showCustomMarginsModal(), setMarginPreset(), and setPageSize() now record marginsDpi and trigger syncMarginGuideOverlay().
  • Physical Paper Size Invariance:
  • When changing paper size (e.g. A4 to A3) without changing DPI, the physical margin distance (e.g. 0.5 inches / 150px at 300 DPI) remains constant, naturally appearing proportionally smaller on the physically larger paper as expected.
  • Publication Persistence & Legacy Auto-Repair:
  • Saved marginsDpi in io/file-io.js and extensions/system-patches.js.
  • In io/publisher-file-loader.js: restored marginsDpi and automatically repaired legacy publications saved at high DPI with unscaled 48px defaults back to the intended 0.5-inch physical margins (150px at 300 DPI).

12. Zoom-Invariant Drag and Control Handles (style.css, canvas/canvas.js, core/pages.js, extensions/system-patches.js)

  • Root Cause:
  • Control handles (.resize-handle, .rotate-stick, .rotate-handle, .shape-edit-handle) and the .selected-overlay selection bounding box reside inside #paper (which is scaled by transform: scale(zoom)).
  • In CSS, handles had fixed pixel dimensions (e.g. 15px by 15px for .resize-handle, 40px height for .rotate-stick, 16px by 16px for .rotate-handle).
  • At standard 60% zoom (z = 0.60), handles rendered at comfortable screen sizes (~10px visual size, 24px stick length).
  • On high-resolution canvases such as A4 at 300 DPI (2480px by 3508px), viewing the entire page requires zooming out to 15% - 25% zoom (z = 0.15 - 0.25).
  • At z = 0.20, fixed 15px handles shrank on screen to 3px dots, the rotate stick shrank to 8px, and dashed selection outlines became invisible sub-pixel lines, making grabbing handles for resizing and rotation extremely difficult without zooming in.
  • Dynamic CSS Variable Architecture:
  • Defined CSS variables in :root and #paper for handle geometry: --handle-size, --handle-half, --rotate-size, --rotate-half, --rotate-stick-len, --rotate-top, --handle-border-width, --handle-radius, --crop-handle-size, --crop-handle-half, --crop-border-width, and --shape-handle-size.
  • Implemented window.syncHandleScaling(z) in canvas/canvas.js to compute inverse-zoom values calibrated to the standard 60% page zoom appearance:
    • Resize handle optical screen size: constant 10px on screen (10 / zoom in canvas units).
    • Rotate stick optical screen length: constant 24px on screen (24 / zoom in canvas units).
    • Rotate circle optical diameter: constant 11px on screen (11 / zoom in canvas units).
    • Border width: constant 1 physical screen pixel (max(1, 1 / zoom) in canvas units).
    • Crop mode handles: constant 13.3px on screen (13.33 / zoom in canvas units) with bright orange background and white border.
    • Shape edit handles: constant 8.5px on screen (8.5 / zoom in canvas units).
  • Seamless Interaction & Full Lifecycle Sync:
  • Integrated window.syncHandleScaling(z) into setZoom(), renderPage(), renderSelectionOverlays(), and on startup.
  • Updated selection bounding box to var(--handle-border-width, 1px) dashed var(--selection) so selection outlines remain crisp at 1 screen pixel at low zoom.
  • Mouse interaction deltas operate purely in canvas coordinates divided by zoom, maintaining 100% mathematical precision during resizing and rotation.

13. Automatic Content Scaling on Page Resize and DPI Change (layout/document.js, core/history.js)

  • Proportional Element and Typography Scaling:
  • When resizing an existing document to a higher DPI (e.g. from 96 DPI to 300 DPI) or a different page size, page elements (text boxes, typography, cropped images, vector shapes, tables, WordArt, guides, headers, footers) automatically scale proportionally to the new dimensions.
  • Horizontally scales by Sx = finalW / baseOldW and vertically by Sy = finalH / oldH, using average S = (Sx + Sy) / 2 for typography and borders.
  • Explicit User Control in Resize Document Dialog:
  • Added checkbox option: [x] Scale page content automatically to match new size / DPI (enabled by default).
  • When checked, elements, text, and guides scale proportionally. When unchecked, canvas boundaries expand or contract while element coordinates and font sizes remain fixed.
  • Comprehensive Element Coverage:
  • Live DOM elements: scales left, top, width, height, border radius, border width, and data-original-font-size.
  • Typography: scales .element-content font size, line-height, padding, margins, headings H1 to H6, and <font size="..."> tags.
  • Tables: scales column widths, row heights, cell padding, and cell font sizes.
  • Cropped images: scales image pixel offsets and crop bounds.
  • Vector shapes: scales SVG container width/height, stroke widths, and shape stroke attributes.
  • WordArt: invokes syncWordArt() to re-render stretch-to-fit typography at the new scale.
  • Headers and Footers: scales header/footer font sizes and line heights.
  • Guides: scales .custom-guide horizontal and vertical positions.
  • Multi-Page Synchronization & History Preservation:
  • Scales serialized element data across all pages in state.pages, updating dpi and dimensions across the publication.
  • Viewport zoom compensation: smoothly adjusts zoom (zoom * (baseOldW / finalW)) so the page's on-screen visual size remains steady without layout jumps.
  • Preserved dpi in serializeCurrentPage() in core/history.js, ensuring undo and redo cleanly restore original dimensions and unscaled content.

14. Interactive Bottom-Bar DPI Status Badge & Visual Change Feedback (index.html, style.css, layout/document.js, core/pages.js)

  • Unobtrusive Resting & Hover States in Bottom Bar:
  • Added #dpi-status-display to the bottom status bar right next to Page 1 of 1 (in #status-center-group).
  • Styled with background: transparent; border: 1px solid transparent; opacity: 0.85; font-weight: 500; at rest so it blends in naturally without drawing unwanted attention.
  • On mouse hover, smoothly reveals a translucent highlight (background: rgba(255, 255, 255, 0.18); border-color: rgba(255, 255, 255, 0.28); opacity: 1;), signaling that it is clickable.
  • Contextual resolution icon: displays <i class="fas fa-print"></i> for medium and high-resolution print ($\ge 150$ DPI) and <i class="fas fa-desktop"></i> for screen/web resolution ($< 150$ DPI).
  • Quick-action trigger: clicking the badge directly opens the "Page Setup / Resize Document" dialog (changeSize()), turning the label into an interactive shortcut.
  • Informative hover tooltip: reveals full resolution classification (e.g. Document Resolution: 300 DPI (High-Resolution Print) (Click to Resize / Change DPI)).
  • On-Theme Teal & White Notification Toast:
  • When DPI is changed via Size > Custom Size (changeSize()), the user receives three synchronized visual indicators:
    1. Golden Glow & Pulse Animation (.highlight-pulse): The DPI badge in the status bar scales up and pulses with a bright golden-yellow glow (#ffeb3b, scale 1.15) for 2.8 seconds, then fades back to transparent.
    2. Status Bar Confirmation Message: #status-msg in the bottom bar displays a checkmark confirmation with exact dimensions: ✓ DPI set to 300 (2480 × 3508 px) • Content scaled proportionally for 5 seconds before reverting to Ready.
    3. Themed Floating Notification Toast (#dpi-change-toast): Styled with OpenPublisher's signature teal-and-white theme (linear-gradient(135deg, var(--ui-theme-dark, #005a55) 0%, var(--ui-theme-color, #007670) 100%), solid white badge with deep teal checkmark, pure white title, and mint-white typography) sliding up smoothly from the bottom center of the canvas and auto-dismissing after 4 seconds.
  • Dynamic Multi-Page & Lifecycle Integration:
  • Integrated window.updateDpiDisplay() into core/pages.js (renderPage()), setPageSize() in layout/document.js, template loading, and document initialization.
  • Full theme compatibility: high-contrast semi-transparent dark borders and hover states when bright themes are enabled.

✅ Checklist Completed

  • [x] core/units.js: Created window.UnitConversionService with toPixels, fromPixels, convert, formatValue, getPresetDimensions, and detectFormat.
  • [x] core/core.js: Initialized dpi: 96, unit: 'cm', rulerUnit: 'cm', and marginsDpi: 96 in global state.
  • [x] core/pages.js: Upgraded renderPage with DPI-aware detectFormat, scaled margins proportionally on DPI changes, updated addNewPage and sidebar thumbnail badge to use page DPI, overhauled handleNewDocument with full setup modal defaulting to cm and resolution-aware margins, added updateMultiPageView, syncRulers, syncMarginGuideOverlay, syncHandleScaling, and updateDpiDisplay triggers.
  • [x] layout/document.js: Overhauled changeSize() with presets, units defaulting to cm, DPI, live preview, DPI-proportional margin scaling, and automatic proportional content scaling; added window.notifyDpiChanged() and window.updateDpiDisplay(); removed state.rulerUnit overwrite; overhauled showCustomMarginsModal(); added setMarginPresetInches(), updateMultiPageView sync, syncRulers sync, syncMarginGuideOverlay sync, and renderSelectionOverlays refresh.
  • [x] core/history.js: Preserved dpi in serializeCurrentPage() to ensure clean undo and redo of document resizing and scaling.
  • [x] canvas/canvas.js: Implemented DPI-aware getMultiPageThreshold(), proportional multi-page wrapper scaling (gaps, borders, labels), zoomStepOut/zoomStepIn, DPI-scaled fitToPage() / fitToWidth(), DPI-aware physical canvas rulers defaulting to cm with multi-unit support (cm, in, mm, px), dynamic handle scaling via window.syncHandleScaling(z), and DPI-aware fallback margins in syncMarginGuideOverlay.
  • [x] canvas/interaction.js: Connected wheel and keyboard shortcuts to adaptive zoomStepOut() and zoomStepIn().
  • [x] style.css: Configured zoom-invariant handle variables on :root and #paper, updated .resize-handle, .rh-*, .rotate-handle, .rotate-stick, .pub-element.cropping .resize-handle, and .shape-edit-handle to use dynamic CSS custom properties; added #dpi-status-display, .highlight-pulse, @keyframes dpiBadgePulse, and #dpi-change-toast floating banner styles.
  • [x] index.html: Added core/units.js script tag, updated zoom buttons to use zoomStepOut/In, updated margin presets, added #dpi-status-display and #status-center-group to bottom status bar, bumped all cachebusters to ?v=5.1.4.
  • [x] extensions/system-patches.js: Synchronized handle scaling on selection overlay renders, updated dashed bounding box to use --handle-border-width, and serialized dpi, unit, rulerUnit, margins, and marginsDpi in saveDocument.
  • [x] ui/menus.js: Added ruler unit selection (cm, in, mm, px) with active checkmarks to ruler context menu.
  • [x] extensions/print-engine.js: Replaced hardcoded / 96 with / masterDpi, optimized html2canvas print scale for 300 DPI documents, eliminated blank page insertion via sub-pixel height adjustment (calc(height - 1px)) and strict page-break constraints, resolved rotated image styles, and added safety timeouts.
  • [x] extensions/smart-images.js: Added dropCoords = null parameter, wrapped element insertion in try/catch, added synchronous completion handler.
  • [x] extensions/ui-interactions.js: Upgraded template format detection with detectFormat; added square format icon support.
  • [x] ui/dashboard.js: Updated startBlank to handle presets natively.
  • [x] io/file-io.js & io/publisher-file-loader.js: Serialized and restored dpi, unit, rulerUnit, margins, and marginsDpi, with legacy high-DPI margin auto-repair.
  • [x] elements/templates/templates.js: Updated getPageSizeLabel, default DPI fallback, template cachebuster to ?v=5.1.4, and resolution-aware margins in loadTemplate.

👥 Developers and Contributors

  • rmellis: Lead Developer & Architect (Architecture & Core Systems)
  • lucastucious: Core Contributor (Features & Enhancements)
  • Tallulah95: UI Design & Element Positioning Choices
  • Gemini 3.8: Mathematics & Playwright Verification

🎉 Version 5.1.4 - Open Publisher

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