Willem van den Ende 7f1f1aeeb0 Fix PDF diagram text rendering with format-optimized generation
Problem: SVG diagrams had missing text in PDFs due to Inkscape conversion
issues with foreignObject elements used by Mermaid for HTML text rendering.

Solution: Implement format-specific optimal generation:
- HTML: SVG files for perfect vector scaling and text rendering
- PDF: High-resolution PNG files (3x scale) for sharp images with readable text

Changes:
- Generate SVG for HTML output using standard mmdc command
- Generate PNG for PDF output using mmdc with --scale 3 for high resolution
- Remove SVG LaTeX package dependency and Inkscape requirement
- Update documentation to reflect the dual-format approach

Results:
- HTML: Crisp, scalable vector diagrams with perfect text
- PDF: Sharp, high-resolution raster diagrams with clear text
- No external dependencies beyond mermaid-cli

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-29 19:20:13 +02:00

Docster

A self-contained CLI tool that converts Markdown with Mermaid diagrams into PDF or HTML using Pandoc and Mermaid CLI.

Usage

docster -pdf path/to/file.md
docster -html path/to/file.md

Mermaid code blocks (```mermaid) will be rendered to SVG and embedded.

Requirements

  • GHC + Cabal (via ghcup)
  • Pandoc
  • TeX Live (for PDF)
  • Mermaid CLI (npm install -g @mermaid-js/mermaid-cli)

specific versions

source ~/.ghcup/env && ghcup install ghc 9.12.2 source ~/.ghcup/env && ghcup install cabal 3.16.0.0 source ~/.ghcup/env && ghcup install hls 2.11.0.0

Description
Markdown + Mermaid to PDF with Pandoc
Readme 88 KiB
Languages
Haskell 99.2%
Shell 0.8%