Save PlantUML language code as part of the output diagram file

0 votes
asked May 7 in Question / help by dod456 (120 points)
I am using PlantUML and loving  it, I did come across some issue. After I am done with the diagram I export it as an image and use it as part of Word document. What happens if I need to update my diagram, I need to find my PlantUML language file and create a new diagram, which means I need to backup a separate file for every future change I might be interested to perform.

Is there some way to integrate the PlantUML language code into the exported image?

So when I need to update my word file I would just fetch the image, extract from it the PlantUML language code and create a new image.

1 Answer

0 votes
answered May 7 by The-Lu (4,980 points)
selected May 10 by dod456
Best answer


The PlantUML code is already on the output file (png or svg).
You can see metadata on the plantUML doc.:

And use the command:

java -jar plantuml.jar -metadata diagram.png > diagram.puml

If that can help,

commented May 10 by dod456 (120 points)
Great, thanks!