[dot] Inconsistent default margins for png vs. pdf

There seem to be an issue with inconsistent default margins when using dot to generate "png" vs. "pdf" output. The "png" target appears to have narrow margins as default (margin=0), where as the "pdf" target has significantly larger default margins. I'm using Graphviz 2.38 on Windows 7.

The wide pdf margins are causing problems with figures taking up too much space when using dot as part of doxygen to generate latex/pdf code documentation. Dot input generation and dot execution is controlled by doxygen in this use-case, so it's not possible for me to override the default margins.

Could it be possible to shrink the default margins for the "pdf" target, so that the output is more consistent between targets?

Thanks in advance,
Fredrik Orderud

John Ellson writes:   There

John Ellson writes:

 

There are different default margin sizes for pdf, based on the assumption that a pdf (also ps) is a "paged" output intended for a printer,  while other image types are unpaged and intended for the screen.

You can override the default with something like:  -Gmargin=0.05

Perhaps you can wrap dot in an alias, or a small wrapper script, that adds this option to all invocations of dot?

Otherwise, this is really a doxygen issue, you will need to contact the doxygen authors for a workaround.

Recent comments