Donn wrote:
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...
Hey, it's your lucky day! I just posted that to the wiki:
http://cairographics.org//quickframework/
Right, right, I've seen this example...my question doesn't lie in that
per se, but how to render a pdf inside a gtk.DrawingArea (or any other
suitable widget for that matter). In the above example, when you call
self.window.cairo_create() you're calling a method from superclass
gtk.gdk.Drawable. This method returns a pangocairo.CairoContext(), which
uses a pango.Context as the "context" instead of a cairo.Context.
Basically I haven't been able to find a way to use a cairo context
instead of a pango one to render a pdf document inside a gtk widget. I'm
starting to believe it's not possible with the current API?
Also, I know there are the python poppler bindings in their infancy in
launchpad, but unfortunately i'm stuck running feisty I'm fairly sure
they're for gutsy.
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/