mirror of
https://git.code.sf.net/p/seeddms/code
synced 2025-02-06 07:04:57 +00:00
add converter from txt to pdf/png
This commit is contained in:
parent
ebd11bdaf2
commit
6a558a4d26
|
@ -74,6 +74,9 @@ message/rfc822
|
|||
The emailconverter can be obtained from https://github.com/nickrussler/email-to-pdf-converter
|
||||
It requires wkhtmltopdf which is part of debian.
|
||||
|
||||
text/plain
|
||||
iconv -c -f utf-8 -t latin1 '%f' | a2ps -1 -q -a1 -R -B -o - - | ps2pdf - -
|
||||
|
||||
Conversion to png for preview images
|
||||
=====================================
|
||||
|
||||
|
@ -113,10 +116,11 @@ application/postscript
|
|||
convert -density 100 -resize %wx '%f[0]' '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:- 'png:%o'
|
||||
iconv -c -f utf-8 -t latin1 '%f' | a2ps -1 -q -a1 -R -B -o - - | gs -dBATCH -dNOPAUSE -sDEVICE=png16m -dFirstPage=1 -dLastPage=1 -dPDFFitPage -r72x72 -sOutputFile=- -q - | convert -resize %wx png:- 'png:%o'
|
||||
|
||||
On Linux systems you will have to set the desired value in /etc/papersize for a2ps
|
||||
e.g. a4, or letter
|
||||
e.g. a4, or letter. Unfortunately, a2ps cannot process utf-8 encoded files. That's
|
||||
why the input needs to be recoded with iconv or recode.
|
||||
|
||||
application/msword
|
||||
application/vnd.oasis.opendocument.spreadsheet
|
||||
|
|
Loading…
Reference in New Issue
Block a user