チップス
ubuntu u2psの代わりにe2psを使う
ubuntu が gnome から unity になったため
u2ps が使えなくなってしまいました。 ^^;
で、色々と検索したけど
あまりいい解決方法がなくて
最終的には e2ps を使用する事にしました。
印刷したい文章の内部コードを utf-8 ではなく euc に
しないといけないので
$ nkf -e hoge.txt | e2ps -box -head titlename > out.ps
で処理しています。
pdfファイルに変換する時は、以前と同様に
$ ps2pdf out.ps filename.pdf
でPDFファイルに変換しています。
Usage : e2ps
[-l|-l2|-l4|-lv4|-p|-p2|-p4|-pv4] [-af ascii-font] [-abf ascii-bold]
[-abif ascii-bolditalic] [-size fontsize] [-ls nlrate] [-line line]
[-a4|-b4|-le] [-ohp] [-box] [-tm margin] [-bm margin] [-lm margin]
[-rm margin] [-nh] [-P printer] [-date string] [-head string]
[-page string] [-e] [-j] [-h|--help] [-v|--version] [-fl] [-lib]
[filenames...]
-l : landscape
-l2 : landscape 2 pages/paper
-l4 : landscape 4 pages/paper
-lv4 : landscape vertical 4 pages/paper
-p : portrate
-p2 : portrate 2 pages/paper (default)
-p4 : portrate 4 pages/paper
-pv4 : portrate vertical 4 pages/paper
-af ascii-font : ASCII font (Courier)
-abf ascii-bold : ASCII bold font (Courier-Bold)
-abif ascii-bolditalic : ASCII bold italic font (Courier-BoldOblique)
-size fontsize : font size (10.0)
-afw magnification : ASCII width (0.6)
-afh magnification : ASCII height (1.0)
-kfw magnification : ASCII width (1.2)
-kfh magnification : ASCII height (1.0)
-ls nlrate : space ratio between lines (1.1)
-line line : max lines (66)
-a4 : A4 paper (default)
-b4 : B4 paper
-le : letter paper
-ohp : OHP printing (font size:25.0)
-box : print page frame-line (looks like a2ps)
-tm margin : top margin
-bm margin : bottom margin
-lm margin : left margin
-rm margin : right margin
-nh : not print headers
-Pprinter : printer
-date string : date string (Mar 13 2014 13:56:17)
-head string : header string
-page string : page string (Page)
-e : print with EUC postscript font
-j : print with JIS postscript font(default)
-h | --help : show help
-v | --version : show version
-fl : show font list
-lib : show library

