Skip to content

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.

[0.5.1] - 2026-09-11

Cross-Platform PDF Back Cover Preservation

  • CSS Height Standardizing:
    • Adjusted .markforge-back-cover print media CSS height to calc(100vh - 2px) with overflow: hidden; and page-break-after: avoid; break-after: avoid;, eliminating subpixel page overflow across Windows (DirectWrite / Edge / Chrome) and Linux (FreeType).
  • 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.

[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.TXT or "txt" in to: 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.

[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 explicit pdf-lib page indexing controls watermark rendering.
  • Symmetric & Unified Cover & Back Cover Styling Configuration:
    • Unified configuration property names across CoverPageConfig and BackCoverConfig for complete API consistency.
    • Added support for backgroundColor, bgGradient, textColor, titleColor, subtitleColor, accentColor, badge, badgeColor, badgeTextColor, logo, logoWidth, footerText, copyright, address, email, phone, website, and social across front and back covers in HTML, PDF, and DOCX.
  • Heading Color Harmonization (h1 through h6):
    • 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.
  • Strict Package.json Version Resolution:
    • Removed fallback version constant in version.ts. The engine now resolves version strictly from the nearest @masumdev/markforge package.json at runtime and throws an explicit error if missing or unreadable.
  • 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).
  • Arbitrary Dynamic Metadata & Nested Record Token Interpolation:
    • Enhanced replaceDocumentTokens to dynamically unpack and replace tokens defined in top-level metadata or nested metadata dictionaries (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.
  • 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.
  • 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.

[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) and ownerPassword (master password required to modify document permissions).
    • Granular permissions enforcement: printing, modifying, copying, annotating, fillingForms, contentAccessibility, and documentAssembly.
    • Supports permission-only protection mode when userPassword is left empty.
  • 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.
  • Cover Page Builder with Company Logo Embedding (coverPage):
    • Four enterprise design presets: modern, corporate-split, minimal, and card.
    • 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 :first in PDF.
  • Back Cover / Closing Page Builder (backCover):
    • Four closing design presets: modern, corporate, minimal, and contact-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.
  • 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.
  • Multi-Column Container Directives (:::columns, :::col):
    • Multi-column container syntax with configurable columns count and gap (:::columns 2 or :::columns [cols=3 gap=2rem]).
    • Emitted as CSS Grid layouts in HTML/PDF and native borderless multi-cell table structures in DOCX.
  • 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.
  • 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.
  • 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: true on child processes to eliminate console prompt flashes on Windows.
  • Interactive Live-Reload Preview Server (markforge --serve):
    • Real-time Server-Sent Events (SSE) /events broadcast on file or config changes.
    • Automatic scroll position and reading preservation across live reloads.

[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, and ThemeProps.
      • 4-low-level-ast.ts: Direct in-memory binary Buffer generation (DOCX, PDF, and HTML) without writing to disk.
  • 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'sum and updated GitHub profiles to https://github.com/masumrpg.

[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), and clean (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.CENTER and TabStopType.RIGHT paragraph architecture.
    • Eliminates 100% of table gridline boundaries in LibreOffice Writer, Google Docs, and Microsoft Word when dividers are disabled.
  • Synchronized Header & Footer Divider Lines:
    • Solid horizontal separator lines render cleanly via border.bottom / border.top on Word paragraphs and fixed print dividers (@media print) on Chromium PDF.
  • 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 custom color, fontSize (in points), fontFamily, bold, and italic.
    • Fully implemented across DOCX TextRuns and PDF CSS Paged Media (@top-* and @bottom-*).
  • Flagship Theme.CORPORATE Preset & ThemeProps Interface:
    • Simplified built-in themes to Theme.CORPORATE while providing the typed ThemeProps interface for total custom document theming (backgroundColor, textColor, primaryColor, fontFamily, fontMono, customCss).
  • TypeScript Enums:
    • Full autocompletion and type-safety with OutputFormat, Theme, Orientation, PaperSizeEnum, SyntaxTheme, and WatermarkPosition.
  • Background-Layered Watermark:
    • Watermarks are positioned strictly at the background layer (z-index: 0) under content to avoid obscuring tables, text, or images.

[0.1.0] - 2026-08-28

Initial Release

  • Core markdown parser supporting standard CommonMark and GitHub Flavored Markdown (GFM).
  • Binary DOCX document builder using docx library.
  • 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.