diff -u gscan2pdf-0.9.21/debian/changelog gscan2pdf-0.9.21/debian/changelog --- gscan2pdf-0.9.21/debian/changelog +++ gscan2pdf-0.9.21/debian/changelog @@ -1,3 +1,10 @@ +gscan2pdf (0.9.21-1ubuntu4) hardy; urgency=low + + * Force depth before embedding image in PDF + LP: #204988 (gscan2pdf generates blank pages in the .pdf output) + + -- Jeffrey Ratcliffe Fri, 28 Mar 2008 20:52:29 +0100 + gscan2pdf (0.9.21-1ubuntu3) hardy; urgency=low * Removed note in documentation about Thunderbird not working diff -u gscan2pdf-0.9.21/bin/gscan2pdf gscan2pdf-0.9.21/bin/gscan2pdf --- gscan2pdf-0.9.21/bin/gscan2pdf +++ gscan2pdf-0.9.21/bin/gscan2pdf @@ -2138,13 +2138,8 @@ if (($SETTING{'pdf compression'} !~ /(jpg)|(png)/ and $format ne 'tif') or ($SETTING{'pdf compression'} =~ /(jpg)|(png)/) or $SETTING{'downsample'}) { - if ($depth > 1) { - print "Maintaining image depth $depth\n" if $debug; - $x = $image->Write(filename => $filename, depth => $depth); - } - else { - $x = $image->Write(filename => $filename); - } +# depth required because resize otherwise increases depth to maintain information + $x = $image->Write(filename => $filename, depth => $depth); warn "$x" if "$x"; $format = $1 if ($filename =~ /\.(\w*)$/); }