Is there a way to use multiple output formats with -pipe

0 votes
asked Feb 6 in Wanted features by Brandon
With the -pipe and -pipedelimitor options is is easy to start a server in another programming language and render images by piping them though a forked process.

It would be nice to have some directive to send down the pipe to change the output format so one -pipe process could serve back svg or png .

Something like:

%outputformat png
@startuml
@enduml

1 Answer

+1 vote
answered Feb 6 by plantuml (226,800 points)
We really like the idea !

It's really a beta version, but with last beta http://beta.plantuml.net/plantuml.jar you can now have :

@@@format svg
@startuml
Alice -> Bob
@enduml

or

@@@format png
@startuml
Alice -> Bob
@enduml

This way, you should be able to switch between png and svg. It's only working with -pipe.

Tell us if it's working for you. Right now, only png and svg are supported. Latter we could add more directive.
commented Feb 14 by coxley
This is awesome!
commented Mar 19 by coxley

Is there an ETA on which release this will be included with? I don't see it in 1.2020.3. Thanks for all your work!

https://plantuml.com/changes

commented Mar 19 by plantuml (226,800 points)
It's not in the changes page, but it should work.

Could you confirm ?

Thanks
...