Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

PlantUml - Set max width without constraining height

Tags:

uml

plantuml

I have a plantUml diagram that looks like this:

enter image description here

The image has a width of 1234px and a height of 970px. I need to print the image as part of a report and would like to fit it on a letter sized sheet of paper in portrait orientation.

If I could set the max width of 900px it would fit better in my report. I don't mind if the diagram becomes significantly longer/taller.

I have tried using various combinations of

scale 200 width
scale 700 height

But as per the doc, this doesn't do what I want:

You can use the scale command to zoom the generated image.

You can use either a number or a fraction to define the scale factor. You can also specify either width or height (in pixel). And you can also give both width and height : the image is scaled to fit inside the specified dimension.

How can I set a max width for my diagram, without changing the font sizes used or constraining the height allowed for my diagram.

like image 641
sixtyfootersdude Avatar asked Dec 13 '16 16:12

sixtyfootersdude


1 Answers

I'd go a different route with this. Create the diagram however you please and use the dpi skinparam to scale the image up or down when printing, for instance skinparam dpi 300

The default is 96 dpi but I've had to go up to as much as 600 to get a decent result.

like image 154
Potherca Avatar answered Sep 28 '22 11:09

Potherca