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

0 votes
asked Feb 6, 2020 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, 2020 by plantuml (294,660 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, 2020 by coxley
This is awesome!
commented Mar 19, 2020 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, 2020 by plantuml (294,660 points)
It's not in the changes page, but it should work.

Could you confirm ?

Thanks
commented Sep 28, 2023 by anonymous
Found this ticket on Multiple Outputs. I'm wondering if actual multiple outputs could be declared.

Such as:

@@@format svg;png

Or with the command line option:

-t svg;png
...