The a2ps command converts a text file to PostScript and either creates a file or sends it to the printer. If you simply type a2ps file, the file will be printed with a nice header and footer showing the filename and datestamp, the name of the user who printed it, and the date of printing. You can control the way a2ps works with a huge variety of options; for example, the following command:

a2ps -j -B -R --columns=1 file -o outfile.ps creates a PostScript file outfile.ps showing the text of the original file, and with a nice border around the page (the -j option), but no other header or footer. (The headers are suppressed by -B, whereas -R forces portrait format. The -o option specifies the output file.)

If you want to view a PostScript file you can use one of the programs kghostview, gv, or evince.

Was this article helpful?

0 0

Post a comment