Re: Gtk Printing and evince

El mié, 19-07-2006 a las 08:20 -0400, Dominic Lachowicz escribió:
> Hi Carlos,
> > In evince we have the document pages already rendered, so can I take the
> > pixbuf of the page and create a cairo surface from it and use it in
> > draw_page signal? I don't know if this is the right way to do it.
> Unless rendered at a high resolution, the output will probably look
> pretty ugly and be much larger than strictly necessary. Since poppler
> has a Cairo rendering backend and the GtkPrintContext pipeline is
> built around cairo, it'd probably be better to do something like this
> pseudo-code:
> cairo_t = gtk_print_context_get_cairo(context)
> for page in document.pages:
>   poppler_page_render(page, cairo_t)

Yes, I thought in something like this too, but it will only work with
pdf and evince is not only a pdf viewer.

> Best,
> Dom

Carlos Garcia Campos (KaL)
   elkalmail yahoo es
   carlosgc gnome org
PGP key:

Attachment: signature.asc
Description: Esta parte del mensaje =?ISO-8859-1?Q?est=E1?= firmada digitalmente

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]