diff --git a/seeddms/Dockerfile b/seeddms/Dockerfile
index 8bba406..61f8a85 100644
--- a/seeddms/Dockerfile
+++ b/seeddms/Dockerfile
@@ -7,19 +7,19 @@ RUN \
RUN \
# Install runtime dependencies
- apk --no-cache add ghostscript imagemagick libreoffice-calc libreoffice-impress libreoffice-writer php7-iconv php7-pear php7-pdo_pgsql php7-simplexml php7-xml poppler-utils
+ apk --no-cache add ghostscript imagemagick libreoffice-calc libreoffice-impress libreoffice-writer php7-iconv php7-pear php7-pdo_pgsql php7-simplexml php7-xml poppler-utils ttf-dejavu
RUN \
# Install unoconv
- wget https://raw.githubusercontent.com/dagwieers/unoconv/master/unoconv -O /usr/local/bin/unoconv \
- && chmod +x /usr/local/bin/unoconv \
+ wget https://raw.githubusercontent.com/dagwieers/unoconv/master/unoconv -O /usr/bin/unoconv \
+ && chmod +x /usr/bin/unoconv \
&& ln -s /usr/bin/python3 /usr/bin/python
RUN \
# Install full-featured wget to work around sourceforge bugs
apk --no-cache add wget \
# Install SeedDMS
- && wget https://sourceforge.net/projects/seeddms/files/seeddms-5.1.5/seeddms-quickstart-5.1.5.tar.gz/download -O /srv/seeddms.tgz \
+ && wget https://sourceforge.net/projects/seeddms/files/seeddms-5.1.6/seeddms-quickstart-5.1.6.tar.gz/download -O /srv/seeddms.tgz \
&& tar xzf /srv/seeddms.tgz -C /srv \
&& mv /srv/seeddms51x /srv/seeddms \
&& rm -f /srv/seeddms.tgz \
@@ -27,20 +27,21 @@ RUN \
# Create OS user
&& addgroup -S -g 8010 seeddms \
&& adduser -S -u 8010 -h /srv/seeddms -s /bin/false -g seeddms -G seeddms seeddms \
+ && chown -R seeddms:seeddms /srv/seeddms \
# Cleanup
&& apk --no-cache del wget \
&& cp /srv/seeddms/www/install/create_tables-postgres.sql /srv/seeddms/create_tables-postgres.sql \
&& rm -rf /srv/seeddms/www/install
-COPY docker/ /
+COPY docker/etc/ /etc/
+
+COPY --chown=8010:8010 docker/srv/seeddms/ /srv/seeddms/
RUN \
# Patch Previewers
cd /srv/seeddms \
&& patch -p0 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'",
+- 'text/rtf' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
+- 'application/msword' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
- 'application/vnd.ms-excel' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
- 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => "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'",
-+ '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'",
-+ 'text/html' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
- 'text/plain' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
- 'application/postscript' => "ps2pdf '%f' - > '%o'",
- 'image/jpeg' => "convert '%f' pdf:- > '%o'",
-diff -ruN orig/SeedDMS/Preview/Previewer.php pear/SeedDMS/Preview/Previewer.php
---- orig/SeedDMS/Preview/Previewer.php 2017-12-15 08:23:09.000000000 +0100
-+++ pear/SeedDMS/Preview/Previewer.php 2018-01-04 09:56:12.359902000 +0100
-@@ -41,6 +41,18 @@
+- 'text/plain' => "unoconv -d document -f pdf --stdout -v '%f' > '%o'",
+- 'application/postscript' => "ps2pdf '%f' - > '%o'",
+- 'image/jpeg' => "convert '%f' pdf:- > '%o'",
+- 'image/png' => "convert '%f' pdf:- > '%o'",
+- 'image/gif' => "convert '%f' pdf:- > '%o'",
+- 'video/mp4' => "convert '%f[1-20]' pdf:- > '%o'",
++ 'text/rtf' => "unoconv -d document -f pdf -o '%o' '%f'",
++ 'application/msword' => "unoconv -d document -f pdf -o '%o' '%f'",
++ 'application/vnd.oasis.opendocument.text' => "unoconv -d document -f pdf -o '%o' '%f'",
++ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => "unoconv -d document -f pdf -o '%o' '%f'",
++ 'application/vnd.ms-excel' => "unoconv -d spreadsheet -f pdf -o '%o' '%f'",
++ 'application/vnd.oasis.opendocument.spreadsheet' => "unoconv -d spreadsheet -f pdf -o '%o' '%f'",
++ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => "unoconv -d spreadsheet -f pdf -o '%o' '%f'",
++ 'application/vnd.ms-powerpoint' => "unoconv -d presentation -f pdf -o '%o' '%f'",
++ 'application/vnd.oasis.opendocument.presentation' => "unoconv -d presentation -f pdf -o '%o' '%f'",
++ 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => "unoconv -d presentation -f pdf -o '%o' '%f'",
++ 'text/html' => "unoconv -d document -f pdf -o '%o' '%f'",
++ 'text/plain' => "unoconv -d document -f pdf -o '%o' '%f'",
+ );
+ } /* }}} */
+
+--- orig/SeedDMS/Preview/Previewer.php
++++ pear/SeedDMS/Preview/Previewer.php
+@@ -37,10 +37,19 @@
+ 'image/jpg' => "convert -resize %wx '%f' '%o'",
+ 'image/jpeg' => "convert -resize %wx '%f' '%o'",
+ 'image/svg+xml' => "convert -resize %wx '%f' '%o'",
+- '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'",
-+ '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'",
-+ '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'",
-+ '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'",
+- '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'",
++ 'text/plain' => "unoconv -d document -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'",
++ 'text/html' => "unoconv -d document -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'",
++ 'text/rtf' => "unoconv -d document -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'",
++ 'application/msword' => "unoconv -d document -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'",
++ 'application/vnd.oasis.opendocument.text' => "unoconv -d document -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'",
++ 'application/vnd.openxmlformats-officedocument.wordprocessingml.document' => "unoconv -d document -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'",
++ 'application/vnd.ms-excel' => "unoconv -d spreadsheet -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'",
++ 'application/vnd.oasis.opendocument.spreadsheet' => "unoconv -d spreadsheet -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'",
++ 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet' => "unoconv -d spreadsheet -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'",
++ 'application/vnd.ms-powerpoint' => "unoconv -d presentation -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'",
++ 'application/vnd.oasis.opendocument.presentation' => "unoconv -d presentation -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'",
++ 'application/vnd.openxmlformats-officedocument.presentationml.presentation' => "unoconv -d presentation -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'",
);
$this->width = intval($width);
} /* }}} */
diff --git a/seeddms/srv/seeddms/conf/settings.xml b/seeddms/srv/seeddms/conf/settings.xml
index 3ea49ae..679285d 100644
--- a/seeddms/srv/seeddms/conf/settings.xml
+++ b/seeddms/srv/seeddms/conf/settings.xml
@@ -34,11 +34,34 @@
unoconv -d presentation -f pdf --stdout %s | pdftotext -enc UTF-8 -nopgbrk - -
unoconv -d presentation -f pdf --stdout %s | pdftotext -enc UTF-8 -nopgbrk - -
unoconv -d presentation -f pdf --stdout %s | pdftotext -enc UTF-8 -nopgbrk - -
- id3 -l -R %s | egrep '(Title|Artist|Album)' | sed 's/^[^:]*: //g'
- id3 -l -R %s | egrep '(Title|Artist|Album)' | sed 's/^[^:]*: //g'
unoconv -d document -f txt --stdout %s
cat %s
+
+ unoconv -d document -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'
+ unoconv -d document -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'
+ unoconv -d document -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'
+ unoconv -d document -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'
+ unoconv -d spreadsheet -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'
+ unoconv -d spreadsheet -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'
+ unoconv -d spreadsheet -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'
+ unoconv -d presentation -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'
+ unoconv -d presentation -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'
+ unoconv -d presentation -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'
+ unoconv -d document -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'
+ unoconv -d document -e PageRange=1-1 -f pdf --stdout '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'
+
+
+ unoconv -d document -f pdf -o '%o' '%f'
+ unoconv -d document -f pdf -o '%o' '%f'
+ unoconv -d spreadsheet -f pdf -o '%o' '%f'
+ unoconv -d spreadsheet -f pdf -o '%o' '%f'
+ unoconv -d spreadsheet -f pdf -o '%o' '%f'
+ unoconv -d presentation -f pdf -o '%o' '%f'
+ unoconv -d presentation -f pdf -o '%o' '%f'
+ unoconv -d presentation -f pdf -o '%o' '%f'
+ unoconv -d document -f pdf -o '%o' '%f'
+