[Tkinter-discuss] Multipage Postscript printing from canvas

mkieverpy at tlink.de mkieverpy at tlink.de
Tue Feb 20 15:05:15 CET 2007


Hello Vasilis,

the options to the postscript function are quite extensively
explained in the tk canvas man-page (man n canvas).
(Beware! I never used this :-)
What I have seen from a cursory glance:
 Use pagewidth or pageheight options for scaling to A4/Letter size
 Use x, y, height and width options to select a part of the canvas

Remember also: there is no size information in canvas coordinates.
  Scaling of the output is completely up to you.

(A4 is 20.99 x 29.70 (says gimp); so for the upper left part 
 of the canvas you might use:
 c.postscript(... pageheight="29.70c",x="0",y="0",height="297",width="209.9")

As I have said, I never used this, this is just what the man-page
says (just tried the line above).
It says also, that it generates encapsulated postscript,
so (with postscript hacking know-how) you could embed all generated
parts into a single postscript template file which just references the parts.
You might even do this in python, if you don't use the
file option.

Greetings,
Matthias Kievernagel
(mkiever/at/web/dot/de)


More information about the Tkinter-discuss mailing list