Remove diagram margin

0 votes
asked Feb 12, 2020 in Wanted features by fkleedorfer (120 points)
I generate 4 diagrams with plantuml -> png, then I combine them in latex. I can control their spacing in latex, so I would prefer to have 0 margin around the plantuml output for maximum flexibility, but I can't seem to achieve that. `skinparam PageMargin 0` does not do it, and I have run out of ideas.

If this is indeed not possible, please consider this a feature request.
commented Oct 26, 2020 by fkleedorfer (120 points)

I stumbled upon this again. I don't have an answer, but here is a workaround:

Use imagemagick, the command is

magick [input-file] -trim [output-file]

Assuming the images were created in the png folder (using the -o png option of plantuml), the follwing line will crop the newest 40 images (replacing the originals):

 ls -1t png/*.png | head -n 40 | xargs -I XX magick XX -trim XX

Your answer

Your name to display (optional):
Privacy: Your email address will only be used for sending these notifications.
Anti-spam verification:

[Antispam2 Feature: please please wait 1 or 2 minutes (this message will disappear) before pressing the button otherwise it will fail](--------)
To avoid this verification in future, please log in or register.