[poppler] Poppler and partial rendering

Carlos Garcia Campos carlosgc at gnome.org
Wed Nov 9 05:40:14 PST 2011


Excerpts from Peter17's message of mié nov 09 14:14:44 +0100 2011:
> Dear all,
> 
> I am studying those bug reports: [1], [2], [3] and this e-mail [4].
> 
> To sum up, Evince and Okular are using Poppler as a backend. The zoom,
> in those 2 software, is limited to 400%.

That's not true in Evince any more, maximum zoom level depends on the
page size. But it's true we still need to set a maximum zoom level
because of the memory consumption.

> People has been requesting
> more zoom for years, but this has not been implemented because of a
> too large memory consumption. Actually, zooming in Okular or Evince
> will render the whole page in the memory and not just the displayed
> part of the page.
> 
> Could someone among the Poppler developers summarize the situation by
> answering those questions, please?
> 
> Is partial page rendering implemented in Poppler?

Yes.

> If no, how hard do you think it would be to implement it?
> If yes, where in the source code?

Page::displaySlice() in Page.cc

> How hard is it how to use it in a
> software?

It's easy to use. The main problem is that with current poppler model,
rendering one slice takes almost the same time than rendering the
whole page, so splitting a page into several slices would take a lot
of more time to render. See:

http://lists.freedesktop.org/archives/poppler/2010-March/005630.html

> Is there a place where this function is documented? Is it
> frontend-dependent?

The usage depends on the frontend, I don't know how the qt4 frontend
works, but with glib you can use cairo API. Assuming you want to
render into an image surface, to render the slice x, y, with, height
you could do something like:

surface = cairo_image_surface_create (CAIRO_FORMAT_ARGB32, width, height);
cr = cairo_create (surface);
cairo_translate (cr, -x, -y);
poppler_page_render (page, cr);


> Thanks in advance
> 
> Best regards
> 
> [1] https://bugs.launchpad.net/evince/+bug/241604
> [2] https://bugzilla.gnome.org/show_bug.cgi?id=303365
> [3] https://bugs.kde.org/show_bug.cgi?id=148527
> [4] http://lists.freedesktop.org/archives/poppler/2005-November/001125.html
> 

Regards,
-- 
Carlos Garcia Campos
PGP key: http://pgp.mit.edu:11371/pks/lookup?op=get&search=0x523E6462
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20111109/8210a174/attachment.pgp>


More information about the poppler mailing list