How do I use 'enscript' to print a non-text or non-ps file?

PDF FILES

First use acroread to open the file. Then use acroread's "print" menu.

JPG AND GIF FILES

First use Firefox to open the file. Then use Firefox's "print" menu.

 

For text files, you can first convert them to ps files before you print them. You can use Unix command "enscript" to do this. Enscript converts text files to PostScript and spools gen- erated PostScript output to the specified printer or leaves it to file. If no input files are given, enscript processes standard input. Enscript can be extended to handle dif- ferent output media and it has many options which can be used to customize printouts (Use command "man enscript" to find more information).

 

SYNTAX:

enscript [options] filename

OPTION EXAMPLES:

         -1, -2, --columns=num
                 Specify how many columns each page have.  With  long
                 option  --columns=num  you  can  specify more than 2
                 columns per page.

         -a pages, --pages=pages
                 Specify which pages are printed.  Page specification
                 pages can be given in following formats:

                 start-end
                         print pages from start to end

                 -end    print pages from 0 to end

                 start-  print pages from start to end

                 page    print page page

                 odd     print odd pages

                 even    print even pages

         -A align, --file-align=align
                 Align separate input files to even align page count.
                 This  is  handy  for  two-side  and  2-up  printings
                 (--file-align=2).

         -b header, --header=header

EXAMPLE

          enscript foo.txt
                  Print file foo.txt to the default printer.

          enscript -2 foo.txt
                  Print file foo.txt to two columns.

          enscript -2r foo.txt
                  Print file to  two  columns  and  rotate  output  90
                  degrees (landscape).

          enscript -G2rE -U2 foo.c
                  gaudy header,  two columns,  landscape,  
                  code highlighting, 2-up printing.
FAQ Category