Graph is too large for cairo-renderer bitmaps

19,451

Solution 1

the option

-T svg

worked for me

Solution 2

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.

Solution 3

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

-o svg

Share:
19,451

Related videos on Youtube

omega
Author by

omega

Updated on June 05, 2022

Comments

  • omega
    omega almost 2 years

    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

  • zom-pro
    zom-pro almost 9 years
    When I change from -o png to -o pdf, the diagram appears empty. Any idea how to fix this?
  • Leo
    Leo almost 8 years
    no way to fix this. cairo is broken and can't generate real large images. it's a toy
  • Admin
    Admin almost 7 years
    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 👍