tiff to pdf
When I receive email with tiff attachment, my default image viewer 'feh' can not handle it and I'm reluctant to install another image viewer. Although I can save it and convert to pdf with command $tiff2ps -a foo.tif | ps2pdf - > foo.pdf How to automate this process within mutt so that it can convert any incoming tiff into pdf automatically. Then the pdf can be viewed using xpdf. Thanks in advance. -- regards, GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 唐詩229 裴迪 送崔九 歸山深淺去 須盡丘壑美 莫學武陵人 暫遊桃源裡
Re: tiff to pdf
* bill lam on Sunday, November 09, 2008 at 16:13:54 +0800 > When I receive email with tiff attachment, my default image viewer > 'feh' can not handle it and I'm reluctant to install another image > viewer. Although I can save it and convert to pdf with command > $tiff2ps -a foo.tif | ps2pdf - > foo.pdf > > How to automate this process within mutt so that it can convert any > incoming tiff into pdf automatically. Then the pdf can be viewed using > xpdf. There's also tiff2pdf which would safe the detour via ps2pdf. Unfortunately piping to 'xpdf /dev/stdin' doesn't work in this case. But the following script does for me: $ cat muttiff.sh #!/bin/sh tf=`mktemp` # copy mutt's tempfile so it's not removed to early cp "$1" "$tf" tiff2ps -a "$tf" | ps2pdf - > "$tf.pdf" xpdf "$tf.pdf" && rm -f "$tf" "$tf.pdf" in connection with the mailcap entry: image/tiff; muttiff.sh %s HTH c -- \black\trash movie_C O W B O Y_ _C A N O E_ _C O M A_ Ein deutscher Western/A German Western -->> http://www.blacktrash.org/underdogma/ccc.html -->> http://www.blacktrash.org/underdogma/ccc-en.html
Re: tiff to pdf
On Sun, 09 Nov 2008, Christian Ebert wrote: > There's also tiff2pdf which would safe the detour via ps2pdf. > > Unfortunately piping to 'xpdf /dev/stdin' doesn't work in this > case. > > But the following script does for me: > > $ cat muttiff.sh > #!/bin/sh > > tf=`mktemp` > # copy mutt's tempfile so it's not removed to early > cp "$1" "$tf" > tiff2ps -a "$tf" | ps2pdf - > "$tf.pdf" > xpdf "$tf.pdf" && rm -f "$tf" "$tf.pdf" > > > in connection with the mailcap entry: > > image/tiff; muttiff.sh %s Hi Christian, Thank you for the detail information. This (and tiff2pdf) works very well. -- regards, GPG key 1024D/4434BAB3 2008-08-24 gpg --keyserver subkeys.pgp.net --recv-keys 4434BAB3 唐詩299 李商隱 寄令狐郎中 嵩雲秦樹久離居 雙鯉迢迢一紙筆 休問梁園舊賓客 茂陵秋雨病相如