set page-height more often in pdfload

This commit is contained in:
John Cupitt 2019-01-30 20:58:47 +00:00
parent 2ff6786a4c
commit 671b3e76f5

View File

@ -307,12 +307,11 @@ vips_foreign_load_pdf_header( VipsForeignLoad *load )
top += pdf->pages[i].height; top += pdf->pages[i].height;
} }
/* If all pages are the same size, we can tag this as a toilet roll /* If all pages are the same height, we can tag this as a toilet roll
* image and tiffsave will be able to save it as a multipage tiff. * image.
*/ */
for( i = 1; i < pdf->n; i++ ) for( i = 1; i < pdf->n; i++ )
if( pdf->pages[i].width != pdf->pages[0].width || if( pdf->pages[i].height != pdf->pages[0].height )
pdf->pages[i].height != pdf->pages[0].height )
break; break;
if( i == pdf->n ) if( i == pdf->n )
vips_image_set_int( load->out, vips_image_set_int( load->out,