Graphviz: Image not getting imported in SVG Mode

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Graphviz: Image not getting imported in SVG Mode

siddjain
Hello I am trying to use a graphviz diagram in asciidoc in SVG mode. I try to import an image but it does not get imported and rendered in the PDF. The image does get imported if I drop the SVG from the code below and change it to a PNG file. How can I fix this please?

[graphviz, "myimage", svg] // if I drop the svg it works provided.i change the user.svg image to png as well
....
digraph G {    
    size="4,4";
    node [shape=box, fontname=arial];
    layout=dot;
    splines=ortho;
    rankdir=LR;
    user [shape=none, label="", image="user.svg"]; // image does not get imported. there is no error either
}
....
Reply | Threaded
Open this post in threaded view
|

Re: Graphviz: Image not getting imported in SVG Mode

mojavelinux
Administrator
This seems to be an issue with graphviz and/or Asciidoctor Diagram. To my knowledge, importing an image into the diagram doesn't work. That's confirmed by the fact that it is missing from the generated file (myimage.svg). This has nothing to do with Asciidoctor PDF. The SVG has to be complete in order for Asciidoctor PDF to embed it.

Best Regards,

-Dan

On Fri, Oct 23, 2020 at 3:26 PM siddjain [via Asciidoctor :: Discussion] <[hidden email]> wrote:
Hello I am trying to use a graphviz diagram in asciidoc in SVG mode. I try to import an image but it does not get imported and rendered in the PDF. The image does get imported if I drop the SVG from the code below and change it to a PNG file. How can I fix this please?

[graphviz, "myimage", svg] // if I drop the svg it works provided.i change the user.svg image to png as well
....
digraph G {    
    size="4,4";
    node [shape=box, fontname=arial];
    layout=dot;
    splines=ortho;
    rankdir=LR;
    user [shape=none, label="", image="user.svg"]; // image does not get imported. there is no error either
}
....



If you reply to this email, your message will be added to the discussion below:
https://discuss.asciidoctor.org/Graphviz-Image-not-getting-imported-in-SVG-Mode-tp8283.html
To start a new topic under Asciidoctor :: Discussion, email [hidden email]
To unsubscribe from Asciidoctor :: Discussion, click here.
NAML


--
Dan Allen (he, him, his) | @mojavelinux | https://twitter.com/mojavelinux