I have a large DOT script with multiple graphs defined in it:
digraph Tree0 {
...
}
digraph Tree1 {
...
{
...
I can render this to a postscript file where each graph is on a separate page by calling dot -Tps forest.dot -o forest.ps
. However, for performance reasons I would prefer PDF over postscript (scrolling and zooming is much smoother). But if I use the same command with PDF instead of PS, the resulting file contains only one of the graphs and it looks like the rest is written to stdout.
Converting the PS to PDF with ps2pdf
did not work, as the graphs and thus the pages of the PS file have varying size but the resulting PDF file will have fixed page size, cutting away parts of the graphs.
Is there an easy way to get a multi-graph PDF from dot, like it works with the PS file? If not, how can I convert the PS to PDF and keep the varying page size?
What about this:
dot -Tps2 forest.gv -o forest.ps | ps2pdf forest.ps
The main difference is it uses
-Tps2
. According to documentation: