]> git.sesse.net Git - webpdf/blobdiff - createpdf.pl
Added another minor hack for making sure we only get the first page in the PNG.
[webpdf] / createpdf.pl
index 1af0b87771aa36957a63f00c2b4563696fcc7b7f..e74ab0e0119a08a9e3297e5b4891d634d7d9aca1 100755 (executable)
@@ -159,7 +159,7 @@ if (defined($size) && $size > 0) {
        # Make a thumbnail from the finished PDF, for later reference. (Output to
        # stdout is so we make sure we get only the first page; it's the simplest
        # hack I can find offhand. :-) )
-       system("convert -resize 192x192 output/$pdf_filename png:- > output/$pdf_filename.png");
+       system("convert -resize 192x192 output/$pdf_filename png:- | convert png:- png:- > output/$pdf_filename.png");
        open DESC, ">output/$pdf_filename.desc";
 
        if ($url =~ /^http/i) {