diff --git a/SeedDMS_Preview/Preview/Previewer.php b/SeedDMS_Preview/Preview/Previewer.php index 9f5aaf2f6..abe71d9c2 100644 --- a/SeedDMS_Preview/Preview/Previewer.php +++ b/SeedDMS_Preview/Preview/Previewer.php @@ -98,13 +98,22 @@ class SeedDMS_Preview_Previewer { case "image/gif": case "image/jpeg": case "image/jpg": + case "image/svg+xml": $cmd = 'convert -resize '.$width.'x'.$width.' '.$file.' '.$target; break; case "application/pdf": + case "application/postscript": $cmd = 'convert -density 18 -resize '.$width.'x'.$width.' '.$file.'[0] '.$target; + break; + case "text/plain": + $cmd = 'convert -resize '.$width.'x'.$width.' '.$file.'[0] '.$target; + break; + case "application/x-compressed-tar": + $cmd = 'tar tzvf '.$file.' | convert -resize '.$width.'x'.$width.' text:-[0] '.$target; + break; } if($cmd) { - system( $cmd); + exec($cmd); } return true; }