[poppler] PDF to PPM: Page height differs between 32bit and 64bit systems

Dyweni - Poppler 7FdqWGq4fE8x at dyweni.com
Wed May 14 07:49:22 PDT 2014


Hi,

I've traced the problem back to line 501 in the same file 'pg_h = pg_h * 
(y_resolution / 72.0);'

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


More information about the poppler mailing list