Graph is too large for cairo-renderer bitmaps
Asked Answered
B

3

37

Im trying to use pyreverse to generate UML images for a project source code. When I run the pyreverse command and specify to generate png images, it runs and then after a while, it shows:

dot: graph is too large for cairo-renderer bitmaps. Scaling by 0.271394 to fit
dot: graph is too large for cairo-renderer bitmaps. Scaling by 0.333083 to fit

Then if I open either image, the text is unreadable because it got scaled. Is there a way to just not scale, and let the image be large size?

Thanks

Billington answered 24/1, 2014 at 4:49 Comment(0)
P
45

the option

-T svg

worked for me

Pengelly answered 14/2, 2017 at 16:3 Comment(1)
Just confirming that this worked for me (though I used -Tsvg - with no space, but maybe there's no difference). I was using sfdp and here was my command: sfdp -Tsvg -Goverlap=prism input.dot -o output.svg -v 👍Apportion
P
9

Cairo's maximum bitmap size is 32767x32767 pixels, and dot will scale your graph to fit inside that area. As an alternative, you can tell pyreverse to generate PDF files, and use some other tool to convert to PNG, if you really need bitmaps.

Profant answered 6/7, 2014 at 20:43 Comment(2)
When I change from -o png to -o pdf, the diagram appears empty. Any idea how to fix this?Imperium
no way to fix this. cairo is broken and can't generate real large images. it's a toyCopier
A
6

in 2019, you can simply output the diagram as svg using:

-o svg

Arginine answered 18/11, 2019 at 14:41 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.