Graphviz does not display SVG images

Viewed 1705

I am trying to create a Graphviz chart with an SVG image embedded in a node, but the SVG image does not display whereas using a PNG image works fine. For example, I download this test image, and then use the following code

digraph G {
  a [label=<<TABLE><TR><TD><IMG SRC="/full/path/Test.svg"/></TD></TR></TABLE>>];
  a -> b;
}

Executing

dot graph.gv -Tpdf -o graph.pdf

Produces a PDF with a empty spot where Test.svg should be. Graphviz does not report any error message. I am doing this on macOS with Graphviz 2.40.1 installed via Homebrew. I have had no better luck on Windows 7, although on Windows Graphviz reports an error, Warning: No loadimage plugin for "svg:cairo,

1 Answers

I spent hours banging away on this problem on OS X High Sierra. Finally got it working. I had to install graphviz using option --with-librsvg:

$ brew install graphviz --with-librsvg --with-app --with-pango

Related