fix generate a thumbnail of a first page
@@ -9,11 +9,11 @@ if [ x"$CMD_TYPE" = "xmsoffice" ] ; then
TARGET_FILE=`echo $URL | sed -e "s#^file:/*#/#g"`
TMP_FILE=/tmp/thumbnail.$$.pdf
unoconv -e PageRange=1-1 -o $TMP_FILE -f pdf $TARGET_FILE
- convert -thumbnail $IMAGE_SIZE $TMP_FILE $OUTPUT_FILE
+ convert -thumbnail $IMAGE_SIZE ${TMP_FILE}[0] $OUTPUT_FILE
rm $TMP_FILE
elif [ x"$CMD_TYPE" = "xpdf" ] ; then
TARGET_FILE=`echo $URL | sed -e "s#^file:/*#/#g"`
- convert -thumbnail $IMAGE_SIZE $TARGET_FILE $OUTPUT_FILE
+ convert -thumbnail $IMAGE_SIZE ${TARGET_FILE}[0] $OUTPUT_FILE
else
echo "Unsupported type: $CMD_TYPE"
exit 1
