2017-10-07 22:30:39 +02:00
|
|
|
diff -ruN orig/SeedDMS/Preview/PdfPreviewer.php pear/SeedDMS/Preview/PdfPreviewer.php
|
|
|
|
--- orig/SeedDMS/Preview/PdfPreviewer.php 2017-05-03 14:14:18.000000000 +0200
|
|
|
|
+++ pear/SeedDMS/Preview/PdfPreviewer.php 2017-10-07 19:01:01.169624330 +0200
|
2017-10-24 23:24:00 +02:00
|
|
|
@@ -27,10 +27,18 @@
|
2017-10-07 22:30:39 +02:00
|
|
|
function __construct($previewDir, $timeout=5) { /* {{{ */
|
|
|
|
parent::__construct($previewDir, $timeout);
|
|
|
|
$this->converters = array(
|
|
|
|
- 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
|
|
|
|
- 'application/vnd.oasis.opendocument.text' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
|
|
|
|
'text/rtf' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
|
|
|
|
'application/msword' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
|
|
|
|
+ 'application/vnd.oasis.opendocument.text' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
|
|
|
|
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
|
|
|
|
+ 'application/vnd.ms-excel' => "unoconv -d spreadsheet -f pdf --stdout -v '%f' > '%o'",
|
|
|
|
+ 'application/vnd.oasis.opendocument.spreadsheet' => "unoconv -d spreadsheet -f pdf --stdout -v '%f' > '%o'",
|
|
|
|
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => "unoconv -d spreadsheet -f pdf --stdout -v '%f' > '%o'",
|
2017-10-24 23:24:00 +02:00
|
|
|
+ 'application/vnd.ms-powerpoint' => "unoconv -d presentation -f pdf --stdout -v '%f' > '%o'",
|
|
|
|
+ 'application/vnd.oasis.opendocument.presentation' => "unoconv -d presentation -f pdf --stdout -v '%f' > '%o'",
|
|
|
|
+ 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => "unoconv -d presentation -f pdf --stdout -v '%f' > '%o'",
|
2017-10-07 22:30:39 +02:00
|
|
|
+ 'text/html' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
|
|
|
|
+ 'text/plain' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
|
|
|
|
);
|
|
|
|
} /* }}} */
|
|
|
|
|
|
|
|
diff -ruN orig/SeedDMS/Preview/Previewer.php pear/SeedDMS/Preview/Previewer.php
|
|
|
|
--- orig/SeedDMS/Preview/Previewer.php 2017-05-03 14:14:18.000000000 +0200
|
|
|
|
+++ pear/SeedDMS/Preview/Previewer.php 2017-10-07 19:02:22.781623907 +0200
|
2017-10-24 23:24:00 +02:00
|
|
|
@@ -40,7 +40,19 @@
|
2017-10-07 22:30:39 +02:00
|
|
|
'text/plain' => "convert -resize %wx '%f' '%o'",
|
|
|
|
'application/pdf' => "convert -density 100 -resize %wx '%f[0]' '%o'",
|
|
|
|
'application/postscript' => "convert -density 100 -resize %wx '%f[0]' '%o'",
|
|
|
|
- 'application/x-compressed-tar' => "tar tzvf '%f' | convert -density 100 -resize %wx text:-[0] '%o",
|
|
|
|
+ 'application/x-compressed-tar' => "tar tzvf '%f' | convert -density 100 -resize %wx text:-[0] '%o'",
|
|
|
|
+ 'text/rtf' => "unoconv -d document -e PageRange=1-1 -f pdf --stdout '%f' | convert -resize %wx pdf:- '%o'",
|
|
|
|
+ 'application/msword' => "unoconv -d document -e PageRange=1-1 -f pdf --stdout '%f' | convert -resize %wx pdf:- '%o'",
|
|
|
|
+ 'application/vnd.oasis.opendocument.text' => "unoconv -d document -e PageRange=1-1 -f pdf --stdout '%f' | convert -resize %wx pdf:- '%o'",
|
|
|
|
+ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => "unoconv -d document -e PageRange=1-1 -f pdf --stdout '%f' | convert -resize %wx pdf:- '%o'",
|
|
|
|
+ 'application/vnd.ms-excel' => "unoconv -d spreadsheet -e PageRange=1-1 -f pdf --stdout '%f' | convert -resize %wx pdf:- '%o'",
|
|
|
|
+ 'application/vnd.oasis.opendocument.spreadsheet' => "unoconv -d spreadsheet -e PageRange=1-1 -f pdf --stdout '%f' | convert -resize %wx pdf:- '%o'",
|
|
|
|
+ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => "unoconv -d spreadsheet -e PageRange=1-1 -f pdf --stdout '%f' | convert -resize %wx pdf:- '%o'",
|
2017-10-24 23:24:00 +02:00
|
|
|
+ 'application/vnd.ms-powerpoint' => "unoconv -d presentation -e PageRange=1-1 -f pdf --stdout '%f' | convert -resize %wx pdf:- '%o'",
|
|
|
|
+ 'application/vnd.oasis.opendocument.presentation' => "unoconv -d presentation -e PageRange=1-1 -f pdf --stdout '%f' | convert -resize %wx pdf:- '%o'",
|
|
|
|
+ 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => "unoconv -d presentation -e PageRange=1-1 -f pdf --stdout '%f' | convert -resize %wx pdf:- '%o'",
|
2017-10-07 22:30:39 +02:00
|
|
|
+ 'text/html' => "unoconv -d document -e PageRange=1-1 -f pdf --stdout '%f' | convert -resize %wx pdf:- '%o'",
|
|
|
|
+ 'text/plain' => "unoconv -d document -e PageRange=1-1 -f pdf --stdout '%f' | convert -resize %wx pdf:- '%o'",
|
|
|
|
);
|
|
|
|
$this->width = intval($width);
|
|
|
|
} /* }}} */
|