Index: openacs-4/packages/search/tcl/search-convert-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/search/tcl/search-convert-procs.tcl,v diff -u -r1.4.2.1 -r1.4.2.2 --- openacs-4/packages/search/tcl/search-convert-procs.tcl 12 Sep 2015 19:00:45 -0000 1.4.2.1 +++ openacs-4/packages/search/tcl/search-convert-procs.tcl 11 Feb 2017 17:54:05 -0000 1.4.2.2 @@ -22,6 +22,13 @@ @creation-date 2005-06-25 } { + if {[file size $filename] == 0} { + # + # Some conversion programs choke on empty content + # + return "" + } + set tmp_filename [ad_tmpnam] set result "" @@ -39,7 +46,7 @@ set convert_command {catppt $filename >$tmp_filename} } application/pdf { - set convert_command {pdftotext $filename $tmp_filename} + set convert_command {pdftotext -q $filename $tmp_filename} } application/vnd.oasis.opendocument.text - application/vnd.oasis.opendocument.text-template - @@ -80,7 +87,6 @@ if {[catch {eval exec $convert_command} err]} { catch {file delete $tmp_filename} ns_log Error "SEARCH: conversion failed - $convert_command: $err" - file delete $tmp_filename return }