[poppler] (1) blurred text (2) ownership of TextBoxes

Albert Astals Cid aacid at kde.org
Wed Oct 22 13:04:11 PDT 2008


A Dimecres 22 Octubre 2008, Mark Summerfield va escriure:
> On Wed, Oct 22, 2008 at 6:35 PM, Albert Astals Cid <aacid at kde.org> wrote:
> > A Dimecres 22 Octubre 2008, vàreu escriure:
> >> On 2008-10-21, Albert Astals Cid wrote:
> >> > A Dimarts 21 Octubre 2008, Mark Summerfield va escriure:
>
> [snip]
>
> >> Another problem I've had is with resolution---poppler works at 72dpi but
> >> QCoreApplication gives me 75dpi while QApplication gives me 96dpi on one
> >> machine and 98dpi on another. What would help is if all the methods that
> >> are dpi dependent could take dpi arguments. For example, you can pass
> >> dpis to renderToImage() which is great, but not to
> >> TextBox::boundingBox() which means you must do the conversion manually.
> >
> > All methods that are dpi dependent take dpi, that is, only the render
> > method, that depending the dpi gives a bigger or smaller image, all the
> > other rects give you a 0...1 range because it does not matter (or should
> > not) at which dpi you paint them.
> >
> > At least that was the intented use/reason.
>
> But if you call say, renderToImage(144, 144), and you want to locate a
> particular TextBox in the resultant image, then you surely need to
> scale the rect returned by TextBox::boundingBox() to account for the
> fact that renderToImage() is using a different scale? For example, to
> draw something on top of the image where a particular text box is
> located. But the boundingBox() docs say it always works in terms of 72
> dpi.

Arg, my bad, i thought TextBox::boundingBox() was normalized in 0...1 range, 
but it's not, so your wish makes sense, could you please open a bug report in 
bugs.freedesktop.org about it?

> Separate topic: I wish it were possible to get vectors (SVG or
> QPicture) from poppler.

Patches welcome ;-)

Albert


More information about the poppler mailing list