Generating postscript from TkCanvas

Is there any way to scale the postscript that is generated by TkCanvas?
I generated a rather large plot on a canvas and I would like to print this
on an 8.5X11 sheet of paper, but when I do I only see part of the plot -
any way to scale it down?

Also, is there any way to get encapsulated postscript out of a TkCanvas?

Phil

Hi,

···

From: ptkwt@shell1.aracnet.com (Phil Tomson)
Subject: generating postscript from TkCanvas
Date: Sat, 15 Feb 2003 04:12:54 +0900
Message-ID: b2jdlp011qp@enews2.newsguy.com

Is there any way to scale the postscript that is generated by TkCanvas?
I generated a rather large plot on a canvas and I would like to print this
on an 8.5X11 sheet of paper, but when I do I only see part of the plot -
any way to scale it down?

Read the Tk manual. :slight_smile:

I think that options given by arguments of TkCanvas#postscript help you .
e.g.

c = TkCanvas.new.pack
… drawing on the canvas widget …
s = c.postscript(‘pagewidth’=>‘3.5i’, ‘pageheight’=>‘4.0i’)

s is a postscript text

c.postscript(‘file’=>‘asdf.eps’, ‘pagewidth’=>‘3.5i’, ‘pageheight’=>‘4.0i’,
‘width’=>350, ‘height’=>400)

save to ‘asdf.eps’


Also, is there any way to get encapsulated postscript out of a TkCanvas?

TkCanvas#postscript creates the postscript in encapsulated postscript.

                              Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)