PlantUml - Set max width without constraining height
Asked Answered
F

1

24

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.

Fornof answered 13/12, 2016 at 16:38 Comment(3)
@sistyfootersdude Any updates on that ?Benford
@FabioMarreco - No. None.Fornof
@Fornof Did you try left to right direction ? it rearranges diagram. In my case it usually creates (more or less vertical) columns of components instead of (horizontal) rows.Kentigerma
A
4

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.

Asymptote answered 5/2, 2021 at 17:3 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.