fix #604 display thumbnails

This commit is contained in:
Shinsuke Sugaya 2016-08-04 22:24:54 +09:00
parent ef44c0c2cd
commit f786f771de
3 changed files with 3 additions and 3 deletions

View file

@ -8,7 +8,7 @@ if [ x"$CMD_TYPE" = "xmsoffice" ] ; then
TARGET_FILE=`echo $URL | sed -e "s#^file:/*#/#g"`
TMP_FILE=/tmp/thumbnail.$$.pdf
unoconv -o $TMP_FILE -f pdf $TARGET_FILE
convert -thumbnail 200x150! $TMP_FILE $OUTPUT_FILE
convert -thumbnail 160x120! $TMP_FILE $OUTPUT_FILE
rm $TMP_FILE
else
echo "Unsupported type: $CMD_TYPE"

View file

@ -72,8 +72,8 @@ public class ThumbnailAction extends FessSearchAction {
final File thumbnailFile = thumbnailManager.getThumbnailFile(form.queryId, form.docId);
if (thumbnailFile == null) {
// 404
throw404("Thumbnail for " + form.docId + " is under generating.");
thumbnailManager.generate(doc);
throw404("Thumbnail for " + form.docId + " is under generating.");
return null;
}

View file

@ -46,7 +46,7 @@ public class WebDriverGenerator extends BaseThumbnailGenerator {
public int windowHeight = 800;
public int thumbnailWidth = 400;
public int thumbnailWidth = 160;
public String imageFormatName = "png";