.dot to .ps issue

I am using graphviz 2.38 on Mac OS x.

Anyone knows how to define the output pagesize with graphviz while converting a .dot file to .ps ?

dot -Tps foo.dot -o foo.ps

outputs totally at the same pagesize which sometimes are our of the real boundary of the .ps file.

P.S: I tried to change the DEFAULTPAGESIZE of gs_init.ps for Ghostscript but that didn't change anything.

Regards,

-Amir

You can use the size

You can use the size attribute to specify the maximum size of the drawing. If the drawing is too large, it will be uniformly scaled down to fit. The core postscript renderer by default also uses a non-zero margin because most printers don't print to the edge of the page. (Not sure what the cairo postscript renderer does.) You can use the margin attribute to adjust this. There is also a page attribute. For postscript, if this attribute is supplied and the image is larger than it, the image will be divided into multiple pages of the specified size.

where should I change the attribute?

Thanks @erg for the reply.

I am taking a look at the attribute page of te graphviz, but not uite shure where should I write these attribute lines? in the .dot file or the .ps file ? and is either, is it possible to define a global sets of rules for that to save these find and replace procedures?

 

-Amir

The attributes are used by

The attributes are used by the Graphviz tools to produce output. They have the same effect regardless of the output format. You can either put the attribute specification in the .dot file like

graph G {

    size="8,10.5"

   ....

}

or on the command line like

   dot -Gsize="8,10.5" -Tps ...

I'm not quite sure what you mean defining global sets of rules, but my guess is the answer is no. Of course, you can always just write a script that calls dot with whatever attribute settings you want.

Recent comments