[poppler] PDF to PPM: Page height differs between 32bit and 64bit systems
Albert Astals Cid
aacid at kde.org
Wed May 14 11:12:36 PDT 2014
El Dimecres, 14 de maig de 2014, a les 09:49:22, Dyweni - Poppler va escriure:
> Hi,
>
> I've traced the problem back to line 501 in the same file 'pg_h = pg_h *
> (y_resolution / 72.0);'
What's the value of y_resolution?
Cheers.
Albert
>
> On 32bit systems, before that line (using printf("%.64f", ...)), I get:
> ----
> pg_h =
> 792.0000000000000000000000000000000000000000000000000000000000000000
> ----
>
> On 32bit systems, after that line, I get:
> ----
> pg_h =
> 1650.0000000000000000000000000000000000000000000000000000000000000000
> ----
>
>
> On 64bit systems, before that line (using printf("%.64f", ...)), I get:
> ----
> pg_h =
> 792.0000000000000000000000000000000000000000000000000000000000000000
> ----
>
> On 64bit systems, after that line, I get:
> ----
> pg_h =
> 1650.0000000000002273736754432320594787597656250000000000000000000000
> ----
>
>
> Thanks,
> Dyweni
>
> On 2014-05-14 09:39, Dyweni - Poppler wrote:
> > Hi,
> >
> > I noticed a discrepancy between the PPM files that pdftoppm creates on
> > 32bit systems and what it creates on 64bit systems.
> >
> > On 32bit systems, the page height is listed as 1650. On 64bit
> > systems, the page height is listed as 1651.
> >
> > I think I've narrowed it down to the use of 'h = (int)ceil(pg_h)' on
> > line 214 of utils/pdftoppm.cc (0.26.0).
> >
> > Here's my debugging method: I added the following debug lines right
> > after that line:
> > ----
> > printf("pg_w = %f, w = %i\n", pg_w, w);
> > printf("pg_h = %f, h = %i\n", pg_h, h);
> > ----
> >
> >
> > On 32bit systems, I get the following:
> > ----
> > pg_w = 1275.000000, w = 1275
> > pg_h = 1650.000000, h = 1650
> > ----
> >
> >
> > On 64bit systems, I get the following:
> > ----
> > pg_w = 1275.000000, w = 1275
> > pg_h = 1650.000000, h = 1651
> > ----
> >
> >
> > Any suggestions for a fix?
> >
> >
> > Thanks,
> > Dyweni
>
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler
More information about the poppler
mailing list