mermaid-js / mermaid-cli

Command line tool for the Mermaid library
MIT License
2.31k stars 223 forks source link

White text on flowchart node becomes gray when exporting as pdf #585

Open ciriousjoker opened 1 year ago

ciriousjoker commented 1 year ago

Description

White text on flowchart node becomes gray when exporting as pdf.

On svg, everything looks as it's supposed to.

Steps to reproduce

  1. Paste sample code into flowchart-demo.mmd
  2. Run npx mmdc --input ./flowchart-demo.mmd --configFile config-demo.json --outputFormat pdf
  3. Run npx mmdc --input ./flowchart-demo.mmd --configFile config-demo.json --outputFormat svg

Screenshots

pdf: flowchart-demo.mmd.pdf

screenshot of pdf: CleanShot 2023-08-19 at 06 00 16@2x

png (svg looks identical): flowchart-demo mmd

Code Sample

config-demo.json

{
  "theme": "base",
  "themeVariables":{
    "primaryColor": "#d54008ff",
    "primaryTextColor": "#ffffff"
  }
}

flowchart-demo.mmd

flowchart TD
    SomeNode([Some Node])

Setup

I'm on mac os. No idea which chromium version puppeteer uses under the hood.

Suggested Solutions

no idea

Additional Context

frederikstroem commented 11 months ago

I am having the same issue, using https://ghcr.io/mermaid-js/mermaid-cli/mermaid-cli docker image.