mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-05-12 04:31:32 +00:00
specify output format in all convert commands
This commit is contained in:
parent
1737d43cd3
commit
895c76c42d
|
@ -48,7 +48,7 @@ text/rtf
|
||||||
image/png
|
image/png
|
||||||
image/jpg
|
image/jpg
|
||||||
image/jpeg
|
image/jpeg
|
||||||
convert -f pdf -density 300 '%f' '%o'
|
convert -density 300 '%f' 'pdf:%o'
|
||||||
|
|
||||||
application/vnd.ms-powerpoint
|
application/vnd.ms-powerpoint
|
||||||
application/vnd.openxmlformats-officedocument.presentationml.presentation
|
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
|
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/jpg
|
||||||
image/jpeg
|
image/jpeg
|
||||||
image/png
|
image/png
|
||||||
convert -resize %wx '%f' '%o'
|
convert -resize %wx '%f' 'png:%o'
|
||||||
|
|
||||||
application/pdf
|
application/pdf
|
||||||
gs -dBATCH -dNOPAUSE -sDEVICE=png16m -dPDFFitPage -r72x72 -sOutputFile=- -dFirstPage=1 -dLastPage=1 -q '%f' | convert -resize %wx png:- '%o'
|
gs -dBATCH -dNOPAUSE -sDEVICE=png16m -dPDFFitPage -r72x72 -sOutputFile=- -dFirstPage=1 -dLastPage=1 -q '%f' | convert -resize %wx png:- '%o'
|
||||||
|
|
||||||
text/plain
|
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/msword
|
||||||
application/vnd.oasis.opendocument.spreadsheet
|
application/vnd.oasis.opendocument.spreadsheet
|
||||||
|
@ -93,5 +99,5 @@ application/vnd.ms-powerpoint
|
||||||
text/csv
|
text/csv
|
||||||
application/csv
|
application/csv
|
||||||
application/vnd.wordperfect
|
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'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user