[poppler] Unit of the result from pageSize() and pageSizeF()
Albert Astals Cid
aacid at kde.org
Thu Nov 24 13:55:50 PST 2011
El Dijous, 24 de novembre de 2011, a les 20:01:28, Joachim Langenbach va
escriure:
> Good evening Albert!
>
> On Thursday 24 November 2011 18:52:52 Albert Astals Cid wrote:
> > El Dijous, 24 de novembre de 2011, a les 09:04:45, Joachim Langenbach va
> >
> > escriure:
> > > Good morning everybody,
> >
> > Morning, assuming this questions are about the Qt4 frontend, if they are
> > not, please be more specific when asking
>
> You're right, they are about the qt4 frontend.
>
> > > I'm trying to calculate scale factors and it is a little bit
> > > confusing.
> > > So what is the unit of the sizes returned by pageSize and pageSizeF?
> > > Is
> > > it dots?
> >
> > http://people.freedesktop.org/~aacid/docs/qt4/classPoppler_1_1Page.html#
> > a466 525e6988b199176d3d68dd0099bf1 The dimensions (cropbox) of the page,
> > in points (i.e. 1/72th on an inch)
>
> Yes, I've read that, but I doesn't get it. Does it mean 1/72th points/inch
> or what? They first said, the unit are points and the example tells
> something from inch.
1 point = 1/72th on an inch
Thus an A4 has 595x842 points ~ 8,26x11,69inches ~ 21x29,7cm
> > > And what is the unit of the parameters renderToImage(xres, yres)?
> > > Are
> > > those resolutions in dots/inch?
> >
> > http://people.freedesktop.org/~aacid/docs/qt4/classPoppler_1_1Page.html#
> > a43b b866fa1f848156799eb8d9e38d0aa the parameters (x, y, w, h) in pixel
> > coordinates
>
> The coordinates yes. But what unit have the parameters xres and yres, which
> are used to calculate the resolution and the size of the image.
It's dpi, thus if you use 72 you'll get an image of 595x842 pixels for an A4
Albert
>
> But still thanks for your answer!
>
> Regards,
> Joachim
More information about the poppler
mailing list