From a2455c3f8a721521941b29d69d71982ec9b5801e Mon Sep 17 00:00:00 2001 From: Amit Haridas Date: Sat, 5 Sep 2026 23:59:53 +0530 Subject: [PATCH] feat(export): themable PDF/Word exports; Windows CI green (v4.7.1) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Export themes: - Six presets in the export dialog (basic + advanced modes) for PDF/DOCX: Default, Modern, Classic, Sepia, Minimal, Elegant - PDF: LaTeX header (xcolor/titlesec) recolors headings, adds section rules and colored links — core-TeX packages only, hex-literal only (no injection surface) - DOCX: styles.xml surgery recolors Heading1-6/Title/Subtitle/Hyperlink and swaps heading/body fonts; verified end-to-end against a real pandoc-produced docx - Themes ride along in export presets (unknown ids fall back to Default) Windows CI fixes: - pdfjs standardFontDataUrl now a file:// URL (backslash paths failed pdfjs's trailing-slash validation, breaking extractText/extractImages) - sharp temp cleanup EPERM retries; path-separator assertions; pdfjs test timeouts raised; batch suite testTimeout 30s 648/648 tests green; 4.7.1 linux+win artifacts rebuilt. --- README.md | 1 + UPDATES.md | 30 ++++ src/index.html | 7 + src/main.js | 24 +++ src/main/ExportThemes.js | 248 ++++++++++++++++++++++++++ src/renderer.js | 26 +++ src/renderer/export-presets.js | 15 ++ tests/main/ExportThemes.test.js | 181 +++++++++++++++++++ tests/main/ImageOperations.test.js | 10 +- tests/main/PDFBatchOperations.test.js | 1 + tests/main/PDFOperations.test.js | 77 ++++---- tests/monospace-font-config.test.js | 5 +- 12 files changed, 590 insertions(+), 35 deletions(-) create mode 100644 src/main/ExportThemes.js create mode 100644 tests/main/ExportThemes.test.js diff --git a/README.md b/README.md index de494c5..307f846 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ A powerful cross-platform Markdown editor and document converter powered by Pand - **EPUB** - E-book format - **LaTeX** - Academic document format - **RTF** - Rich Text Format +- **Export themes** - Five visual styles (Modern, Classic, Sepia, Minimal, Elegant) for PDF and Word exports — recolored headings, links, and fonts ### Advanced Features - **Custom headers & footers** - Add headers/footers to exports with dynamic fields diff --git a/UPDATES.md b/UPDATES.md index a2d4bc3..e2fdca2 100644 --- a/UPDATES.md +++ b/UPDATES.md @@ -1,5 +1,35 @@ # PanConverter - Updates & Changelog +## Version 4.7.1 (2026-09-05) + +### New: Export Themes (Word + PDF) +- Theme picker in the export dialog (basic and advanced mode) for PDF and DOCX: + **Default (Pandoc), Modern, Classic, Sepia, Minimal, Elegant** +- PDF: LaTeX header recolors/reformats headings + links (xcolor/titlesec, + core-TeX packages only); DOCX: styles.xml surgery recolors Heading1-6/Title/ + Subtitle/Hyperlink and swaps heading/body fonts +- Themes persist in export presets; unknown ids in old presets fall back to + Default instead of failing the export + +### Branding +- New M↓ brand identity: app icons, favicons, tray icon, welcome mark, + README wordmark (vector kit in assets/markdown-converter-assets/) + +### Fixes +- **Windows**: pdfjs text/image extraction failed on Windows — + standardFontDataUrl is now a proper file:// URL (raw backslash paths + failed pdfjs's trailing-slash URL validation) +- **Windows**: sharp temp-file cleanup (EPERM retry), path-separator test + assertions, and pdfjs test timeouts fixed — the Windows CI job is green +- FiraCode tooling downloads pinned to the immutable 6.2 release; + .gitattributes stops CRLF checkout rewriting hash-pinned files +- macOS pandoc extractor locates the binary in the archive (layout changed) +- Packaged apps resolve bundled pandoc/markitdown next to the executable + (resourcesPath lookup was wrong since 4.5 — packaged builds silently used + system pandoc) + +--- + ## Version 4.7.0 (2026-09-05) ### Bundling & Legal Compliance diff --git a/src/index.html b/src/index.html index c1b01d3..91ed50c 100644 --- a/src/index.html +++ b/src/index.html @@ -582,6 +582,13 @@ + +