You can use PlantUML using the online web service to generate images on-the-fly. A online demonstration is available at http://www.plantuml.com/plantuml, but you can also install it on your own JEE web application server. If you don't want to install a full JEE application server, you may also choose to run PlantUML PicoWeb Server locally.
@startxxx
keyword.
When you validate the diagram, you are redirected to an encoded URL encoding your diagram. The encoded form is a convenient way to share your diagrams with others because it's shorter than the many lines of a diagram and it can be easily displayed in a browser using the online PlantUML Server.
For example, SyfFKj2rKt3CoKnELR1Io4ZDoSa70000
is the encoded form of:
@startuml
Bob -> Alice : hello
@enduml
Bob -> Alice
sample but it's easy to invoke it with an other diagram using its encoded form.
Just append /uml/ENCODED
to the URL.
For example, this link http://www.plantuml.com/plantuml/uml/Aov9B2hXil98pSd9LoZFByf9iUOgBial0000 opens the PlantUML Server with a simple Hello World activity diagram.
metadata
, giving it some image URL.
For example, if you want to retrieve the diagram source of the image http://i.stack.imgur.com/HJvKF.png
use the following server request: http://www.plantuml.com/plantuml/?metadata=http://i.stack.imgur.com/HJvKF.png
.
Sounds like magic! No, merely clever engineering :-)
Note that not all diagrams can be produced in SVG. For example, ditaa diagrams are only available in PNG format.
<area>
tags, each line matching a link present in the diagram description.
For example, the following diagram:
@startuml
participant Bob [[http://plantuml.com]]
Bob -> Alice : [[http://forum.plantuml.net]] hello
@enduml
produces the following output:
<map id="plantuml_map" name="plantuml_map">
<area shape="rect" id="id1" href="http://forum.plantuml.net" title="http://forum.plantuml.net" alt="" coords="38,50,199,65"/>
<area shape="rect" id="id2" href="http://plantuml.com" title="http://plantuml.com" alt="" coords="8,3,50,116"/>
</map>
Note that you need to include these
<area...
tags inside a <map...
html tag to make the complete image map.
/plantuml/proxy?src=RESOURCE&idx=INDEX&fmt=FORMAT
@startxxx
and @endxxx
tags), it could be a .html
or a .txt
file.png
, svg
, eps
, epstext
and txt
. Default is png
,javax.*
to jakarta.*
, the PlantUML Server does not work on Tomcat 6/7/8/9 anymore. You have to use Tomcat 10.