Frequently Asked Questions (FAQ)

Cuál es el objetivo de PlantUML?

PlantUML es usado para graficar diagramas UML, usando una descripción de texto simple y fácil de leer por humanos.
Ten cuidado, porque no te previene de graficar diagramas inconsistentes (por ejemplo tener dos clases que hereden entre si). Entonces es más una herramienta de dibujo que una de modelado.

Hay varias razones por las que PlantUML puede ser una buena opción para crear diagramas:

  • PlantUML es una herramienta basada en texto, lo que significa que puede crear diagramas escribiendo frases en un lenguaje sencillo y legible por humanos. Esto facilita la comprensión y edición de la estructura de tus diagramas, incluso si no eres un experto en herramientas de diagramación.

  • PlantUML es de código abierto y está disponible de forma gratuita, lo que significa que puede utilizarlo sin tener que pagar ningún tipo de licencia o suscripción.

  • PlantUML utiliza algoritmos de diseño inteligentes para organizar los elementos de sus diagramas de una manera clara y fácil de entender, ahorrándole el tiempo y el esfuerzo de posicionar y alinear manualmente los elementos individuales.

  • PlantUML es un generador, lo que significa que crea automáticamente diagramas basados en el texto que usted le proporciona. Esto facilita la rápida creación y actualización de diagramas, y le permite centrarse en expresar la estructura y las relaciones de sus diagramas en lugar de preocuparse por su apariencia.

  • PlantUML es altamente personalizable, y proporciona muchas opciones para personalizar la apariencia de sus diagramas. También puede aprovechar los conocimientos y la experiencia de la comunidad Plant UML para encontrar soluciones a problemas comunes de diseño.

En general, PlantUML es una herramienta potente y versátil para crear diagramas de aspecto profesional de forma rápida y sencilla. Es especialmente adecuada para los usuarios que prefieren un enfoque simple, basado en texto, para crear diagramas, y que desean una herramienta que pueda manejar automáticamente el diseño y la apariencia de sus diagramas.

In essence, PlantUML emerges as a potent and adaptable tool, facilitating the swift and effortless creation of professional diagrams. It caters especially to individuals who favor a text-based methodology for diagram creation, offering automated assistance in managing the layout and visualization of the diagrams.
WARNING
 This translation need to be updated. 
WARNING

No me gusta el aspecto de los diagramas generados por PlantUML.

Puede * utilizar temas con PlantUML

Puede utilizar temas con PlantUML para personalizar la apariencia de sus diagramas. PlantUML proporciona varios temas incorporados que puede utilizar, y también puede crear sus propios temas personalizados definiendo sus propios colores y estilos.

  • PlantUML hace gran parte del trabajo de diseño por usted

PlantUML se encarga de gran parte del trabajo de diseño por usted, para que pueda centrarse en expresar las relaciones y la estructura de su diagrama. Utiliza algoritmos de diseño inteligentes para organizar los elementos de su diagrama de una manera clara y fácil de entender, ahorrándole el tiempo y el esfuerzo de posicionar y alinear manualmente los elementos individuales. Esto lo convierte en una gran herramienta para crear rápidamente diagramas de aspecto profesional sin mucho esfuerzo manual.

  • PlantUML es un generador, no una herramienta de posicionamiento de elementos

PlantUML es un generador, lo que significa que crea automáticamente diagramas basados en el texto que usted le proporciona. Esto es diferente de otras herramientas de diagramación, que le permiten posicionar y organizar manualmente elementos individuales en su diagrama.

La principal ventaja de este enfoque es que permite crear diagramas de forma rápida y sencilla, sin tener que preocuparse por la colocación específica de elementos individuales. También facilita la actualización de sus diagramas, ya que puede simplemente modificar el texto que representa su diagrama, y PlantUML actualizará automáticamente el diagrama para reflejar sus cambios.

Una posible desventaja de utilizar un generador como PlantUML es que puede que no tenga tanto control sobre el diseño exacto de su diagrama como lo tendría con una herramienta que le permita colocar los elementos manualmente. Sin embargo, para muchos usuarios, el ahorro de tiempo y esfuerzo que supone el uso de un generador compensa con creces esta limitación.

Además, el foro de la comunidad PlantUML es un gran recurso para encontrar soluciones a problemas comunes de diseño y compartir consejos y trucos para personalizar la apariencia de sus diagramas.

For those seeking advice or solutions to common layout issues, the [PlantUML community forum](https://forum.plantuml.net/) stands as a vibrant platform to exchange tips and procure answers to your dilemmas, enhancing your mastery over customizing your diagrams.
WARNING
 This translation need to be updated. 
WARNING

¿Por cuánto tiempo se guardan las imágenes generadas por PlantUML Server?

Enlaces a png o svg generados por PlantUML Server están activos por siempre (eso es siempre y cuando el servidor esté arriba).
Sin emargo, nosotros no almacenamos ningún diagrama en nuestros servidores.

Esto puede sonar contradictorio. No es así: El diagrama completo es comprimido en la misma URL . Cuando el servidor recibe la URL, descomprime la URL para recuperar el texto del diagrama y generar la imagen. No hay necesidad de almacenar nada. Incluso cuando el servidor está abajo, tú puedes recuperar el diagrama usando el flag -decodeurl con la linea de comando. Adicionalmente, los datos del diagrama son alamcenados in metadata PNG, así puedes buscarlos incluso desde una imagen descargada.

Ocasionalmente podemos activar trazas HTTP en nuestro servidor. Esto es principalmente por problemas de rendimiento (cuando tenemos alguno) para entender el trafico que tenemos. Una vez el problema se resuelve, desactivamos las trazas HTTP y removemos los logs.

Observa que también contamos el numero de diagramas generados (impresos en el home page) para medir la capacidad del servidor.

Respecto a contenido sensible: incluso si no almacenamos diagramas generados, por favor ten en cuenta que todo el tráfico va a través de HTTP, por lo tanto es fácil de capturar.

Por lo tanto, tal vez deberías instalar un servidor local en tu propia red si planeas generar diagramas con información sensible.

WARNING
 This translation need to be updated. 
WARNING

¡No funciona con mi configuración!

PlantUML ha sido instalado en varios sistemas, y algunos usuarios reportaron problemas menores cuando lo instalaron.
Puedes mirar en esta pagina que te aconsejará si algo está mal.

¿Qué versión de Graphviz debo usar?

Tienes más información sobre Graphviz sobre Graphviz aquí.

Las siguientes versiones han sido probadas, y se sabe que funcionan:

  • 2.26.3
  • 2.28
  • 2.30.1
  • 2.34
  • 2.36
  • 2.38
  • 2.44
  • 9.0.0
  • 10.0.1

Tenga en cuenta que las versiones 2.39 a 2.42 no funcionan muy bien con PlantUML.

Con la versión 2.44, en Windows, puede que tenga que ejecutar dot -c en una línea de comandos para finalizar la instalación. Puede que tenga que ejecutar dot -c con derechos de administrador.

Si compila Graphviz usted mismo, tiene que compilarlo con libexpat para que funcione con PlantUML.

Is this mature? I don't see any new release?

Google Trends are somehow positive. And there are few books that mention PlantUML. So yes, it's mature.

Note that PlantUML is developed with continuous integration in mind. That means that there are new releases quite often, with (hopefully!) backward compatibility. So the file PlantUML.jar may changed over time, while keeping the same name.

If you want to know the exact version you are using, you can type in the command line:

java -jar plantuml.jar -version

or use the following small special diagram description:

@startuml
version
@enduml

How to know if a new release is available?

To check if a newer version is available for download, you can go to the download page.

You can also subscribe to the following rss flows:

Or you can use the command line:

java -jar plantuml.jar -version

Or use the following small special diagram description:

@startuml
version
@enduml

I want to generate huge diagrams!

PlantUML limits image width and height to 4096. There is an environment variable that you can set to override this limit: PLANTUML_LIMIT_SIZE. You have to define this variable before launching PlantUML, something like:

set PLANTUML_LIMIT_SIZE=8192

or

setenv PLANTUML_LIMIT_SIZE 8192

Another way is an option in the command line:

java -DPLANTUML_LIMIT_SIZE=8192 -jar /path/to/plantuml.jar ...

Note that if you generate very big diagrams, (for example, something like 20 000 x 10 000 pixels), you can have some memory issues. The solution is to add this parameter to the java vm : -Xmx1024m.

I have issues with accented characters.

Characters encoding is a subtle thing... By default, PlantUML use the default charset of your platform, which may or may not be UTF-8 . If you want to know which charset you are using, you can type the following command:

java -jar plantuml.jar -help

...
-charset XYZ To use a specific charset (default is windows-1252)
...

If you want to use a different charset, for example UTF-8, you can use the -charset flag :

java -jar plantuml.jar -charset UTF-8 ...

You can also find here information about unicode . Note that even if Java does not support B.O.M. (Byte Order Mark) in UTF-8 format file, a workaround has been put into PlantUML, so this should not be an issue.

I have issues with Asian characters.

Some Japanese users reported that they have to set the LANG variable to ja_JP.UTF-8 in their shell before launching PlantUML.

export LANG = ja_JP.UTF-8

Since the new architecture, it should simply work, because Java knows how to draw East Asian characters.

How to generate EPS?

You can use the -teps flag in the command line, or format="eps" in the ANT task.

Under which license is PlantUML distributed?

PlantUML is distributed under the GPL license.
You can print the license using the command line option:

java -jar plantuml.jar -license

Or you can use the special diagram:

@startuml
license
@enduml

I don't like GPL!

You can also use:

Those versions miss few features (DITAA for example), but are 100% able to generate UML diagrams.

You can print the license of these versions using the command line option:

java -jar plantuml.jar -license

Or you can use the special diagram:

@startuml
license
@enduml

Are images generated by PlantUML covered by the GPL/LGPL/ASL/EPL/MIT license?

No, they are not.

Images (whatever their format : PNG, SVG...) generated by the execution of PlantUML are owned by the author of their corresponding sources code (that is, their textual description in PlantUML language).

Images generated by the execution of PlantUML are not considered as covered work. You can do whatever you want with them.

The generated images can then be used without any reference to the GPL/LGPL/ASL/EPL/MIT license. It is not even necessary to stipulate that they have been generated with PlantUML, although this will be appreciated by PlantUML team.

There is an exception : if the textual description in PlantUML language is also covered by some license (like the GPL/LGPL/ASL/EPL/MIT), then the generated images are logically covered by this license.

Can I redistribute the LGPL binary file PlantUML.jar and if there any constraints about it?

As long as you do not modify the Java source code and the jar file, you can integrate PlantUML.jar in your own closed source software.

The only constraint is that you have to mention somewhere in your own license or in your documentation that you are using PlantUML and that PlantUML is distributed under LGPL.

You can then even sell your software and earn money, without any other constraints (although donation will be appreciate in that case :-)

What is the license of the PlantUML syntax?

There are no license for the PlantUML syntax itself : this means that everybody can use it.

So you can use PlantUML comments into your own code : those comments are owned by yourself, and are not considered as covered work, and are not covered by the GPL/LGPL/APL/EPL/MIT license.

Only the current implementation (that is, PlantUML program) is licensed under GPL, LGPL, ASL, EPL or MIT. On the other hand note that the documentation (examples, notices, ...) published in the PlantUML website is copyrighted. But you can still write your own documentation.

What does EmptySvgException mean?

PlantUML is using Graphviz to generate some diagrams. So PlantUML is launching dot program and retrieve the information generated by dot as a SVG flow.

This message means that PlantUML is getting an empty flow from dot execution, and therefore cannot generate UML diagrams. There may be several reasons why this happens:

  • There is an issue with your Graphviz installation. Try a very simple diagram, with only one class for example.
  • Your version of Graphviz is too old and is crashing with information provided by PlantUML. Check your version with testdot
  • Your diagram is too complex.
  • There is a bug in PlantUML and/or in dot.

Could not initialize class net.sourceforge.plantuml.ugraphic.UFont

If you have the error message java.lang.NoClassDefFoundError: Could not initialize class net.sourceforge.plantuml.ugraphic.UFont, it probably means that there are no fonts installed on your server.

You can solve it by adding fontconfig on your system:

sudo yum install fontconfig

or

sudo apt-get install fontconfig

You may also need to install

ttf-droid

I have a message complaining about X11 or headless on MacOS Ventura !

If you get this exception on MacOS Ventura from plantuml with no arguments, adding -gui might work around the problem. This is a known issue but does not appear to indicate a problem since sub-commands (like -gui) do work. If this is not enough, see the next section.

I have a message complaining about X11 or headless!

If you are running PlantUML on a linux server without graphical capability, you may have some error message:

  • Can't connect to X11 window
  • X11 connection rejected because of wrong authentication.
  • HeadlessException

Basically, this is because PlantUML needs to have access to some graphical resources (more information here). You can turn PlantUML to headless mode, using the flag -Djava.awt.headless=true. For example:

/usr/bin/java -Djava.awt.headless=true -jar /data/PlantUml/plantuml.jar ...

I have an UnsatisfiedLinkError under Mac OS X!

Under Mac OS X, if you have some error message like:

Error java.lang.UnsatisfiedLinkError / liblwawt.dylib /libosxapp.dylib

You need to follow the instructions on http://stackoverflow.com/questions/25914757/osx-yosemite-jvm-shared-library-does-not-contain-the-jni-createjavavm-symbol:

  1. Download and install the package: JavaForOSX.
  2. Found the file AptanaStidio3.ini, the file by default located under the directory here: /Applications/Aptana Studio 3/AptanaStudio3.app/Contents/MacOS
  3. Add -vm argument to specify the java which will be used to lunch Aptana Studio: -vm /Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/bin/java

This seems to work only under Java 6, so you may define the following alias to be used in your scripts.

alias java6="export JAVA_HOME=$(/usr/libexec/java_home -v 1.6.0)"

PlantUML scripts are grabbing keyboard/window focus!

Depending on your configuration, you can try the flag -Djava.awt.headless=true.
For example:

/usr/bin/java -Djava.awt.headless=true -jar /path/to/plantuml.jar ...

Is @startuml needed in with -pipe flag?

Short answer: You do have to use @startuml (or @startditaa/@startjcckit...) when starting a diagram.

Long answer:

The @startuml/@startditaa/@startjcckit is useful to determine the type of diagram (uml, ditaa, jcckit...), and because you can optionally put a filename after the @startXYZ. This also allows to have several diagrams inside the same file.

Earlier versions of PlantUML were not supporting ditaa or jcckit. When you use -pipe flag, since the diagram is generated to standard output, there could be only one diagram in the standard input. And there is no need to specify a filename. For all those reasons, @startuml was not needed when using -pipe flag at that time.

Later, it has been decided to normalize this, and to impose @startXYZ everywhere, even with -pipe flag, because it was confusing for users. Unfortunately, since some existing scripts were already using the fact that @startuml is not needed in -pipe flag, it has been decided to keep this as a deprecated option, just to allow older scripts to run. We indeed do pay attention of ascending compatibility.

For newer scripts, you should not rely on this, and use @startXYZ/@endXYZ with the -pipe flag.

What about XMI?

Work is in progress.

I found an issue, but I cannot provide my diagram showing the issue because my diagram contains confidential data

There is a -cypher option with the command line that generates a .preproc file instead of regular image file.

The .preproc generated file looks like the input diagram expect that all words (except PlantUML language keywords) have been replaced by a random set of letters.

You can double check this by running several time the -cypher option (you will get a different text each time). You may also look at the Cypher.java class used to execute this transformation to be sure that there are no backdoor there to retrieve back your original diagram.

If there is an issue in your original diagram, the same issue is likely to also occur with the cyphered one. Since the cyphered text is really meaningless, you can safely share it with us : there will be no way for us to guess what you are really working on.

But we will be able to reproduce the issue and fix it so that you can have your original (and confidential) diagram working.

I have a question that is not here!

You can use the forum facility.

Someone will try to answer your question there.


Privacy Policy      Advertise