jawira/plantuml-client

Convert PlantUML diagrams into images.

v1.0.1 2021-06-29 20:21 UTC

This package is auto-updated.

Last update: 2021-08-29 20:41:45 UTC


README

PlantUML client

PlantUML client uses a remote server to convert PlantUML diagrams into images.
Now you don't need to install PlantUML locally!

Latest Stable Version Total Downloads composer.lock .gitattributes License

How to use

Generate image:

use Jawira\PlantUmlClient\{Client, Format};

$puml = file_get_contents('path/to/my-diagram.puml'); // loading diagram

$client = new Client();
$svg = $client->generateImage($puml, Format::SVG); // svg image
file_put_contents('path/to/my-diagram.png', $svg);

Generate url:

use Jawira\PlantUmlClient\{Client, Format};

$puml = file_get_contents('path/to/my-diagram.puml'); // loading diagram

$client = new Client();
$url = $client->generateUrl($puml, Format::PNG); // image's url
echo "<img src='$url'>";

How to install

composer require jawira/plantuml-client

Documentation

https://jawira.github.io/plantuml-client/

Contributing

If you liked this project, ⭐ star it on GitHub.

License

This library is licensed under the MIT license.

Packages from jawira

jawira/plantuml GitHub stars
Provides PlantUML executable and plantuml.jar
jawira/plantuml-encoding GitHub stars
PlantUML encoding functions.
more...