After spending a lot of time following leads, and often thinking that I was very close, I gave up. I thought that cairo could do what I wanted, but I believe (correct me if I'm wrong) that PSSurface can write the contents of a cairo context which is displayed on a gtk.DrawingArea to a PS file (or a PDF through PDFSurface), but that it cannot be used to actually display PS files onto a gtk.DrawingArea. Chris, please keep me updated if you find a solution and I'll do the same (as the method to display PS files and PDF files is probably similar).

Kevin

Chris Cole wrote:
Donn wrote:
however I would need a way
to display PostScript files.

I hear that Cairo (pyCairo) can do stuff with postscript as well as pdf. You should def. play around with it.

You're right cairo does do some stuff with postscript and pdf but I'm running into the same problem. After a little searching I know you can something like:

>>> import cairo
>>> surface = cairo.PDFSurface('foo.pdf', 300, 600)
>>> context = cairo.Context(surface)
>>>

but I'm not really sure how to display a cairo context or surface inside
gtk. I'm guessing you have to use a gtk.DrawingArea or something like that but I haven't been able to figure it out...

Any help would be greatly appreciated.

Thanks,
  Chris
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/
_______________________________________________
pygtk mailing list   [email protected]
http://www.daa.com.au/mailman/listinfo/pygtk
Read the PyGTK FAQ: http://www.async.com.br/faq/pygtk/

Reply via email to