Sunday, March 14, 2010

Printing text files : a2ps

Usually it is easier to convert a text file directly into PS files and then into a pdf file. 


$ a2ps -R  -1 -o abc.ps abc.cpp
$ ps2pdf abc.ps abc.pdf 

-1 :  Predefined layout: 1 x 1 portrait, 80 chars/line, major rows (i.e. alias for `--columns=1 --rows=1 --portrait --chars-per-line=80 --major=rows').

-o : Output file

No comments: