9.18. Rendering the Canvas as PostScript
You can get a copy of the canvas as postscript by using the postscriptmethod. It will either return the PostScript output or, if the -file option is specified, put it in a file:
$postscript = $canvas->postscript(); $canvas->postscript(-file => "ps.out");
The following options allow you to control the output of the PostScript.
-colormap => \ @array
Specifies that each element in @array must be a valid postscript command for setting color values; e.g., "1.0 1.0 0.0 setrgbcolor".
-colormode => "color" | "gray" | "mono"
Creates the postscript in full color, grayscale ("gray"), or black and white ("mono").
-file => filename
Specifies the file in which to put the PostScript output.
-fontmap => \@array
Each element in @array is a two-element array that contains a fontname and a point size. The fontname should be a complete font name so Tk will parse it correctly (e.g., "-*-Helvetica-Bold-O-Normal--*-140-*").
-height => size
Sets the height of the area to print. The default height is the canvas height.
-pageanchor => "n" | "e" | "s" | "w" | "center"
Indicates where the page should be placed over the positioning point specified by -pagexand -pagey options. Default is "center".
-pageheight => height
Sets the height of the printed page. The canvas image will be scaled to fit. height is any valid screen distance.
-pagewidth =>width
Sets the width of the printed page. The canvas image will be scaled to fit.
-pagex =>x
Sets the coordinate for the x ...