specify output format in all convert commands

This commit is contained in:
Uwe Steinmann 2021-10-08 12:10:23 +02:00
parent 1737d43cd3
commit 895c76c42d

View File

@ -48,7 +48,7 @@ text/rtf
image/png
image/jpg
image/jpeg
convert -f pdf -density 300 '%f' '%o'
convert -density 300 '%f' 'pdf:%o'
application/vnd.ms-powerpoint
application/vnd.openxmlformats-officedocument.presentationml.presentation
@ -71,16 +71,22 @@ It basically instructs you to comment out the line
in /etc/ImageMagick-6/policy.xml
convert determines the format of the converted image from the extension of
the output filename. SeedDMS usually sets a propper extension when running
the command, but nevertheless it is good practice to explicitly set the output
format by prefixing the output filename with 'png:'. This is of course always
needed if the output goes to stdout.
image/jpg
image/jpeg
image/png
convert -resize %wx '%f' '%o'
convert -resize %wx '%f' 'png:%o'
application/pdf
gs -dBATCH -dNOPAUSE -sDEVICE=png16m -dPDFFitPage -r72x72 -sOutputFile=- -dFirstPage=1 -dLastPage=1 -q '%f' | convert -resize %wx png:- '%o'
text/plain
a2ps -1 -a1 -R -B -o - '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=png16m -dFirstPage=1 -dLastPage=1 -dPDFFitPage -r72x72 -sOutputFile=- -q - | convert -resize %wx png:- '%o'
a2ps -1 -a1 -R -B -o - '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=png16m -dFirstPage=1 -dLastPage=1 -dPDFFitPage -r72x72 -sOutputFile=- -q - | convert -resize %wx png:- 'png:%o'
application/msword
application/vnd.oasis.opendocument.spreadsheet
@ -93,5 +99,5 @@ application/vnd.ms-powerpoint
text/csv
application/csv
application/vnd.wordperfect
unoconv -d document -e PageRange=1 -f pdf --stdout -v '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72x72 -sOutputFile=- -dFirstPage=1 -dLastPage=1 -q - | convert -resize %wx png:- '%o'
unoconv -d document -e PageRange=1 -f pdf --stdout -v '%f' | gs -dBATCH -dNOPAUSE -sDEVICE=pngalpha -dPDFFitPage -r72x72 -sOutputFile=- -dFirstPage=1 -dLastPage=1 -q - | convert -resize %wx png:- 'png:%o'