Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Canvas to postscript

Status
Not open for further replies.

shussai2

Programmer
Aug 28, 2003
42
CA
Hi,

I am trying to convert a canvas into a postscript file, which I can do with few lines of code, for example:

self._wCanvas = Canvas(self._wControlFrame,
width=210, height=400)
self._wCanvas.create_text(210, 100, text="Hello")
self._wCanvas.pack()
self._wControlFrame.update()
self._postscript = self._wScreen._wCanvas.postscript()
..
..
The problem is that I have to pack the canvas to create a postscript file. I want to create the postscript without packing the canvas (basically not showing the canvas at all). I have tried unpacking it after the postscript command but I still see the canvas for a second. If you have any suggestions please let me know.


 
Not *really* a pure python question. Are you using the tkinter Canvas or the GTK implementation? Though, I'm not really sure why I'm asking, as I wouldn't know the answer to either. :-/
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top