diff --git a/libvips/foreign/pdfload.c b/libvips/foreign/pdfload.c index b9a66c10..bbc2d1d3 100644 --- a/libvips/foreign/pdfload.c +++ b/libvips/foreign/pdfload.c @@ -176,6 +176,9 @@ vips_foreign_load_pdf_build( VipsObject *object ) GError *error = NULL; + if( vips_source_rewind( pdf->source ) ) + return( -1 ); + pdf->total_scale = pdf->scale * pdf->dpi / 72.0; pdf->stream = vips_g_input_stream_new_from_source( pdf->source );