Welcome to PlantUML Q&A, where you can ask questions and receive answers from other members of the community.

You can also submit new features request and vote for them.

Skinparam svgLinkTarget not working for API

0 votes
This is a strange one.

I have specified the option "skinparam svgLinkTarget _parent" in my PUML file (class diagram). When I generate the SVG from the command-line (Homebrew on OS X version 8046), the SVG targets are correct. When I generate it through the API using SourceStringReader class (version 8046 specified in my pom.xml file), it keeps the default _top.

Any ideas?
asked Sep 28, 2016 by anonymous

1 Answer

0 votes

Yes :-)  The svgLinkTarget parameter has been implemented quickly and badly.

If you are using SourceStringReader class, when calling generateImage(), you currently should pass a FileFormatOption argument.

And build this argument this way:

new FileFormatOption(FileFormat.PNG).withSvgLinkTarget("_parent");

We'll try to refactor our code so that this workaround is not need anymore.

Hope it helps!

answered Sep 28, 2016 by plantuml (113,980 points)
Works perfectly! Thank you.
Support This Project Offer 250 Mo! Follow PlantUML on Twitter
...