[texworks] Wishlist for pdf previewer

Charlie Sharpsteen chuck at sharpsteen.net
Mon Sep 26 01:31:04 CEST 2011


On Sun, Sep 25, 2011 at 2:25 PM, Charlie Sharpsteen <chuck at sharpsteen.net>wrote:

> On Thu, Sep 22, 2011 at 9:19 AM, Jonathan Kew <jfkthame at googlemail.com>wrote:
>
>> One thing I've been meaning to suggest: it might be worth experimenting
>> with the Cairo backend to poppler (in place of the Splash renderer). Some
>> comments I've seen (sorry, don't have references offhand) have suggested
>> that it gives superior results; and in particular, it might serve as a
>> stepping-stone towards printing support (as cairo can, for example, render
>> to a Windows GDI printing surface or an OS X Quartz context).
>>
>> AFAIR, the combination of the Qt4 bindings and the Cairo backend is not
>> "officially" supported by the main developers (cairo is associated with GTK
>> rather than with Qt), but I believe it's possible to make them work together
>> - I think I recall someone posting (to the poppler mailing list? cairo
>> list?) about it in the past.
>>
>
Poppler can be added as a rendering backend for the Qt frontend by applying
the patches available here:

  https://github.com/giddie/poppler-qt4-cairo-backend

The first patch, `0001-Cairo-backend-added-to-Qt4-wrapper.patch`, is the
only one that is required. Apparently these are not being accepted upstream
for some weird reason:

  https://bugs.freedesktop.org/show_bug.cgi?id=25240


At first glance, I didn't notice any improvement in rendering quality.
Rendering performance at high zoom levels seems to be better though. The
rendering times for Splash and Cairo seem to roughly double every time the
zoom level increases by 50% but the initial rendering time for Cairo is 25%
of that for splash.

The amount of memory the new viewer consumes at high zoom levels is
pretty appalling---it will eat gigabytes once the zoom level gets over
1000%. We'll need to figure out how to cut this down via smart caching of
pixmaps and perhaps tiling out the page renders at high zoom. Splash didn't
seem to be capable of partial page renders as it renders the whole page and
then crops the result.

If Cairo can do a partial pages, it would make a very strong argument for
using it as our render backend.

-Charlie
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://tug.org/pipermail/texworks/attachments/20110925/e42dddf5/attachment.html>


More information about the texworks mailing list