Introduction; Using dvips; Using enscript; Using psduplex; Examples The enscript command feeds to the standard output, psrev or psselect. enscript -o – | ps2pdf – Then run enscript on your file with the -P switch and the printer description PDF in this case. get_sign.c. /* * First KLEE tutorial: testing a small function */ int get_sign(int x) { if ( x == 0) return 0; if (x < 0) return -1; else return 1; } int main() { int a;.

Author: Groktilar Julrajas
Country: Tunisia
Language: English (Spanish)
Genre: Photos
Published (Last): 21 January 2008
Pages: 437
PDF File Size: 6.90 Mb
ePub File Size: 19.31 Mb
ISBN: 819-6-87798-142-6
Downloads: 24510
Price: Free* [*Free Regsitration Required]
Uploader: Visho

A number of print commands are available in Unix.

In Unix, how do I print files and list or remove print jobs? Following is information about the commands dvips which converts DVI files to PostScript and prints themenscript which converts text files to Postscript and prints themand psduplexwhich makes a file print on both sides of the page.

It then attempts to print the file on the default printer, unless told otherwise. You can send the output of the dvips command to a file using the -o switch. For example, to convert the DVI file myfile. Although the output of the dvips command can be redirected, its input enacript be taken from a pipe, but instead, must be redirected from a file.


enscript(1) – Linux man page

For example, you could enter:. This would convert myfile. The enscript command in Unix changes a text file to PostScript format and then sends it to the printer. The general format is:. Replace textfilename with the name of the file you want to convert and print.

The [switches] are optional settings, as follows:. For more information about enscriptread its man page by entering:.


Two Unix commands, psselect and psrevcan reverse enscriptt output of a PostScript file. In the following examples, replace printer with the network-connected PostScript printer of your choice e. The enscript command feeds to the standard output, psrev or psselect reverses the outut of the PostScript file, and then this is fed to the printer via lpr or lp.

The psduplex command in Unix makes a file print on both sides of the paper.

It will work only with printers that support double-sided i. The psduplex command accepts PostScript format input, and should be the last filter used before the print command. A single switch, -tumble ebscript, causes files printed in landscape mode to be rotated along the short side of the paper to keep the text upright.

Normally, the rotation is done along the long side of the page. For example, on a system using BSD -compatible printing, to take the output of the enscript command converting a text file named myfile. Be sure that the printer you’re using can handle double-sided printing before you use psduplex. Because psduplex is actually just an executable Perl script, you can easily install it on your own system by copying the text in between the lines into a file:.


Here are some examples of printing files with various combinations of the lprenscript2updvipsand psduplex commands.

Not all utilities are available on all Unix systems. In all examples, replace printername with the defined name of the printer. Also, in examples using the lpr commands, you could use the equivalent lp commands. This will convert myfile.

Unix printing using enscript, dvips, and psduplex

This is document abbp in the Knowledge Base. Last modified on Options Help Chat with a consultant. Unix printing using enscript, dvips, and psduplex This content has been ensxriptand is no longer maintained by Indiana University. Resources linked from this page may no longer be available or reliable. You can combine the -2 and -r options to produce 2up style documents, with two pages per sheet in landscape orientation.