Changelog
[0.5.2] - 2026-09-11
OS-Specific PDF Page Normalization
- Platform-Aware Blank Page Pruning:
- Implemented platform-aware handling for Chromium headless print. On Windows (
win32), DirectWrite renders page bounds with subpixel precision without trailing pages, while on Linux/Unix, trailing overflow blank pages after 100vh sections are cleanly pruned, ensuring exact and consistent page counts across all operating systems.
- Implemented platform-aware handling for Chromium headless print. On Windows (
[0.5.1] - 2026-09-11
Cross-Platform PDF Back Cover Preservation
- CSS Height Standardizing:
- Adjusted
.markforge-back-coverprint media CSS height tocalc(100vh - 2px)withoverflow: hidden;andpage-break-after: avoid; break-after: avoid;, eliminating subpixel page overflow across Windows (DirectWrite / Edge / Chrome) and Linux (FreeType).
- Adjusted
- Eliminated Blind Page Truncation:
- Removed trailing page deletion (
pdfDoc.removePage) in the PDF builder pipeline that previously led to the back cover closing card being inadvertently deleted on Windows multi-page documents.
- Removed trailing page deletion (
[0.5.0] - 2026-09-03
Plain Text (.txt) Document Publishing Engine
- Plain Text (.txt) Output Format:
- Added native support for compiling Markdown documents into structured plain text files (
OutputFormat.TXTor"txt"into:array /--to txt). - Structured document rendering with centered title banner, Table of Contents, double (
=) and single (-) divider rules, callout tags (| [NOTE]), blockquotes (> text), code blocks with language annotations, and task item checkboxes ([x]/[ ]). - ASCII grid-aligned tables with dynamic column width calculation and text padding.
- Complete support for footnotes (
[1] text), approval signatures, and back cover closing card with dynamic metadata token replacement. - Terminal CLI and Ink UI integration with green badge color highlighting for
[TXT]documents in the compilation summary table.
- Added native support for compiling Markdown documents into structured plain text files (
[0.4.1] - 2026-08-30
Enhancements, Security, CLI, and Configuration Refinements
- Watermark Suppression on Front & Back Covers:
- Excluded the vector/PNG watermark overlay from both the Front Cover Page (page 0) and the Back Cover Closing Page (final page) in PDF generation.
- Suppressed the HTML fixed canvas watermark in print media (
@media print { .document-watermark { display: none !important; } }) to ensure only explicitpdf-libpage indexing controls watermark rendering.
- Symmetric & Unified Cover & Back Cover Styling Configuration:
- Unified configuration property names across
CoverPageConfigandBackCoverConfigfor complete API consistency. - Added support for
backgroundColor,bgGradient,textColor,titleColor,subtitleColor,accentColor,badge,badgeColor,badgeTextColor,logo,logoWidth,footerText,copyright,address,email,phone,website, andsocialacross front and back covers in HTML, PDF, and DOCX.
- Unified configuration property names across
- Heading Color Harmonization (
h1throughh6):- Unified all heading levels (
h1,h2,h3,h4,h5,h6) to use brand primary dark styling (var(--mf-primary-dark)) across HTML, PDF, and DOCX for visual consistency. h1: 2.5px solid primary border underline;h2: 1px subtle teal border underline.
- Unified all heading levels (
- Strict Package.json Version Resolution:
- Removed fallback version constant in
version.ts. The engine now resolves version strictly from the nearest@masumdev/markforgepackage.jsonat runtime and throws an explicit error if missing or unreadable.
- Removed fallback version constant in
- Comprehensive Terminal CLI Parameter & Configuration Banner:
- Ink CLI header box and Live Preview banner (
--serve) now display all resolved configuration details: source path, config path, visual theme, syntax highlighter, layout, output directory, and active module list (TOC, Numbering, Cover, BackCover, Watermark, Security, Math, Syntax).
- Ink CLI header box and Live Preview banner (
- Arbitrary Dynamic Metadata & Nested Record Token Interpolation:
- Enhanced
replaceDocumentTokensto dynamically unpack and replace tokens defined in top-levelmetadataor nestedmetadatadictionaries (e.g.{metakuda}or{custom_key}). - Fixed AST parser inline text chunking to merge adjacent plain text spans, ensuring token names containing underscores (
_) or hyphens are not split across separate tokens.
- Enhanced
- Table of Contents (TOC) Page Break Isolation:
- Table of Contents is now fully isolated from subsequent document body content via
page-break-after: always; break-after: page;in PDF/HTML and a dedicated section break in Microsoft Word DOCX.
- Table of Contents is now fully isolated from subsequent document body content via
- Academic & Enterprise Page Numbering Schema:
- Front Cover: Unnumbered, running headers/footers suppressed.
- Table of Contents: Formal lowercase Roman numerals (
i,ii, …). - Main Document Body: Counter reset (
counter-reset: page 1;) with standard decimal numbers (1, 2, ...). - Back Cover: Unnumbered, isolated final closing section.
- Config-Driven Section Numbering (
numberHeadings):- Propagated top-level configuration options (
numberHeadings: { enabled, depth, skipH1, prefix }) directly into AST parsing and compilation across HTML, PDF, and DOCX.
- Propagated top-level configuration options (
[0.4.0] - 2026-08-29
Major Enterprise Features & Security Release
- ISO 32000-2 AES-256 PDF Security & Password Encryption (
security):- Native standard PDF encryption with independent
userPassword(password required to open the document) andownerPassword(master password required to modify document permissions). - Granular permissions enforcement:
printing,modifying,copying,annotating,fillingForms,contentAccessibility, anddocumentAssembly. - Supports permission-only protection mode when
userPasswordis left empty.
- Native standard PDF encryption with independent
- 100% Unselectable Image XObject Watermark:
- Replaced live text glyphs with transparent Chromium-rendered PNG buffers embedded via
pdfDoc.drawImage()as PDF Image XObjects. - Eliminates 100% of selectable text stream tokens (
Tj/TJ), preventing any cursor interference or unwanted text highlights during document review. - Automatically centered diagonally (
rotate: -45) across content pages and excluded from Front Cover and Back Cover.
- Replaced live text glyphs with transparent Chromium-rendered PNG buffers embedded via
- Cover Page Builder with Company Logo Embedding (
coverPage):- Four enterprise design presets:
modern,corporate-split,minimal, andcard. - Native image embedding for brand logos across DOCX, PDF, and HTML with configurable
logoWidth. - Generates dedicated unnumbered first sections in Microsoft Word DOCX and suppresses running headers/footers via CSS
@page :firstin PDF.
- Four enterprise design presets:
- Back Cover / Closing Page Builder (
backCover):- Four closing design presets:
modern,corporate,minimal, andcontact-card. - Full-bleed edge-to-edge dark closing card in PDF and isolated final section in DOCX.
- Company profile grid including address, email, phone, website, and social links.
- Four closing design presets:
- Math & LaTeX Equation Rendering (
math):- Native KaTeX in-memory math parsing for inline formulas (
$E=mc^2$) and display block equations ($$\int e^x dx$$). - Self-contained inlined KaTeX CSS for zero-network HTML and PDF generation.
- Cambria Math typography and shaded equation containers in Microsoft Word DOCX.
- Native KaTeX in-memory math parsing for inline formulas (
- Multi-Column Container Directives (
:::columns,:::col):- Multi-column container syntax with configurable columns count and gap (
:::columns 2or:::columns [cols=3 gap=2rem]). - Emitted as CSS Grid layouts in HTML/PDF and native borderless multi-cell table structures in DOCX.
- Multi-column container syntax with configurable columns count and gap (
- Hierarchical Section Numbering (
numberHeadings):- Automated decimal heading prefixes (
1.,1.1.,1.1.1.) with configurable depth and optional H1 skip. - Synchronized Table of Contents entries and anchor slugs.
- Automated decimal heading prefixes (
- Footnotes & Endnotes (
[^1],[^1]: text):- Markdown footnote references (
[^id]) and bottom definition parsing. - Formatted as superscripts with return links in HTML/PDF and dedicated numbered sections in Word DOCX.
- Markdown footnote references (
- Windows Enterprise & Strict Corporate Policy Compliance:
- Prioritizes Microsoft Edge (
msedge.exe) with AppLocker and GPO whitelist compatibility. - Isolated process arguments without suspicious flags (
--disable-sync, isolated temp profile). - Added
windowsHide: trueon child processes to eliminate console prompt flashes on Windows.
- Prioritizes Microsoft Edge (
- Interactive Live-Reload Preview Server (
markforge --serve):- Real-time Server-Sent Events (SSE)
/eventsbroadcast on file or config changes. - Automatic scroll position and reading preservation across live reloads.
- Real-time Server-Sent Events (SSE)
[0.3.0] - 2026-08-29
Features & Enhancements
- Comprehensive Programmatic API Suite:
- Added full programmatic compilation examples in
apps/cli/markforge/examples/:1-minimal.ts: Zero-configuration Markdown-to-MultiFormat execution.2-intermediate.ts: Themes, syntax palettes, TOC, and live progress callbacks.3-full-custom.ts: 100% feature utilization including dynamic tokens, per-zone header/footer slots, watermarks, signatures, andThemeProps.4-low-level-ast.ts: Direct in-memory binaryBuffergeneration (DOCX,PDF, andHTML) without writing to disk.
- Added full programmatic compilation examples in
- Terminal CLI ASCII Redesign & Author Branding:
- Modernized Ink CLI layout with clean ASCII borders and tree-style file summaries.
- Added author attribution (
Author: Ma'sum (@masumrpg)) and direct repository links. - Removed all emojis across CLI terminal outputs for maximum shell compatibility.
- Author Identity & Workspace Normalization:
- Normalized author identity to
Ma'sumand updated GitHub profiles tohttps://github.com/masumrpg.
- Normalized author identity to
[0.2.5] - 2026-08-29
Features & Enhancements
- Document Signatures & Approval Blocks (
signatures):- Add formal approval and sign-off blocks with 1 to 4 signatory slots.
- Multi-alignment support (
left,center,right,space-between). - Multiple visual styles:
line(classic underline divider),box(bordered card), andclean(borderless). - Dynamic token interpolation (
{author},{company},{date}) and optional digital signature image/seal embedding.
- Native Word Paragraph TabStops for Running Headers & Footers:
- Replaced 3-column table headers and footers with native Microsoft Word OpenXML
TabStopType.CENTERandTabStopType.RIGHTparagraph architecture. - Eliminates 100% of table gridline boundaries in LibreOffice Writer, Google Docs, and Microsoft Word when dividers are disabled.
- Replaced 3-column table headers and footers with native Microsoft Word OpenXML
- Synchronized Header & Footer Divider Lines:
- Solid horizontal separator lines render cleanly via
border.bottom/border.topon Word paragraphs and fixed print dividers (@media print) on Chromium PDF.
- Solid horizontal separator lines render cleanly via
- DOCX Visual & Typography Overhaul:
- Enhanced title area with 22pt bold title, 12pt subtitle, and bottom border.
- Auto-generated Table of Contents card with shaded container (
#F8FAFC, border#E2E8F0). - Shaded zebra table rows with alternating fills.
[0.2.4] - 2026-08-29
Features & Enhancements
- Granular Header & Footer Slot Customization (
HeaderFooterSlot):- Each running header and footer zone (
left,center,right) can now be individually styled with customcolor,fontSize(in points),fontFamily,bold, anditalic. - Fully implemented across DOCX TextRuns and PDF CSS Paged Media (
@top-*and@bottom-*).
- Each running header and footer zone (
- Flagship
Theme.CORPORATEPreset &ThemePropsInterface:- Simplified built-in themes to
Theme.CORPORATEwhile providing the typedThemePropsinterface for total custom document theming (backgroundColor,textColor,primaryColor,fontFamily,fontMono,customCss).
- Simplified built-in themes to
- TypeScript Enums:
- Full autocompletion and type-safety with
OutputFormat,Theme,Orientation,PaperSizeEnum,SyntaxTheme, andWatermarkPosition.
- Full autocompletion and type-safety with
- Background-Layered Watermark:
- Watermarks are positioned strictly at the background layer (
z-index: 0) under content to avoid obscuring tables, text, or images.
- Watermarks are positioned strictly at the background layer (
[0.1.0] - 2026-08-28
Initial Release
- Core markdown parser supporting standard CommonMark and GitHub Flavored Markdown (GFM).
- Binary DOCX document builder using
docxlibrary. - Pixel-perfect PDF generation via headless Chromium.
- Standalone HTML document generator with embedded CSS tokens.
- Syntax highlighting engine with customizable palettes.
- Mermaid diagram parser and image renderer.