On Sun, Sep 25, 2011 at 2:25 PM, Charlie Sharpsteen <span dir="ltr"><<a href="mailto:chuck@sharpsteen.net">chuck@sharpsteen.net</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">On Thu, Sep 22, 2011 at 9:19 AM, Jonathan Kew <span dir="ltr"><<a href="mailto:jfkthame@googlemail.com" target="_blank">jfkthame@googlemail.com</a>></span> wrote:</div><div class="gmail_quote"><div class="im">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
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).<br>
<br>
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.<br>
</blockquote></div></div></blockquote><div><br></div><div>Poppler can be added as a rendering backend for the Qt frontend by applying the patches available here:</div><div><br></div><div> <a href="https://github.com/giddie/poppler-qt4-cairo-backend">https://github.com/giddie/poppler-qt4-cairo-backend</a></div>
<div><br></div><div>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:</div><div><br></div><div> <a href="https://bugs.freedesktop.org/show_bug.cgi?id=25240">https://bugs.freedesktop.org/show_bug.cgi?id=25240</a></div>
<div><br></div><div><br></div><div>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.</div>
<div><br></div><div>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.</div>
<div><br></div><div>If Cairo can do a partial pages, it would make a very strong argument for using it as our render backend.</div><div><br></div><div>-Charlie </div><div> </div></div>