インストール
$ wget http://downloads.ghostscript.com/public/ghostscript-9.05.tar.gz $ tar -zxvf ghostscript-9.05.tar.gz $ cd ghostscript-9.05 $ ./configure $ make $ su # make install
※fontのインストールは割愛してます
http://sourceforge.net/projects/gs-fonts/
http://ossipedia.ipa.go.jp/ipafont/index.html
pdf->tiff変換
次の通りです
$ /usr/local/bin/gs \ -q -dNOPAUSE -dBATCH -sDEVICE=tiffg4 -r600 -sOutputFile=out.tiff in.pdf
$ /usr/local/bin/gs --help GPL Ghostscript 9.05 (2012-02-08) Copyright (C) 2010 Artifex Software, Inc. All rights reserved. Usage: gs [switches] [file1.ps file2.ps ...] Most frequently used switches: (you can use # in place of =) -dNOPAUSE no pause after page | -q `quiet', fewer messages -g<width>x<height> page size in pixels | -r<res> pixels/inch resolution -sDEVICE=<devname> select device | -dBATCH exit after last file -sOutputFile=<file> select output file: - for stdout, |command for pipe, embed %d or %ld for page # Input formats: PostScript PostScriptLevel1 PostScriptLevel2 PostScriptLevel3 PDF <以下、省略>
「-S」で使用するデバイスの種類は次のurlをご覧下さい。
今回は「tiffg4 = TIFF Group 4 fax」を指定しています
refer to http://www.gnu.org/software/ghostscript/devices.html
気が向いたら、cupsとつなげるかも