IceWalkers.com - Linux Software downloads and news
Name : Password :
Linux SoftwareLinux RPMLinux HowtosLink UsAboutAdvertise

The Linux Printing Usage HOWTO

Search Howtos :Match :
Next Previous Contents

3. Printing files

This section covers printing the kinda of files that you'll run across in a Linux setup.

3.1 Printing graphics files

Printing graphics files through a printer usually depends on the kind of graphics you're converting, and the kind of printer you want to send to. Dot matrix is usually out of the question due to differences in the way dot-matrix handles graphics. Your best bet in this situation is to see if your printer is compatable with an Epson or an IBM ProPrinter, then convert the graphics file to PostScript, then use Ghostscript (see next section) to print the graphics.

If you have a laser printer, things are a bit easier since many are compatable with PCL. This now gives you a few options. Some programs may output directly in PCL. If not, programs like NetPBM can convert into PCL. Last option is to use ghostscript (see next section).

Your absolutely best option is to install packages like NetPBM and Ghostscript then installing a magic filter to process the graphics files automagically.

3.2 Printing PostScript files

Printing PostScript files on a printer that has a PostScript interpreter is simple; just use lpr, and the printer will take care of all of the details for you. For those of us that don't have printers with PostScript capabilities, we have to resort to other means. Luckily, there are programs available that can make sense of PostScript, and translate it into a language that most printers will understand. Probably the most well known of these programs is Ghostscript.

Ghostscript's responsibility is to convert all of the descriptions in a PostScript file to commands that the printer will understand. To print a PostScript file using Ghostscript, you might do something like

$ gs -dSAFER -dNOPAUSE -sDEVICE=deskjet -sOutputFile=\|lpr thesis.ps

Notice in the above example that we are actually piping the output of Ghostscript to the lpr command by using the -sOutputFile option.

Ghostview is an interface to Ghostscript for the X Window System. It allows you to preview a PostScript file before you print it. Ghostview and Ghostscript can both be swiped from ftp://prep.ai.mit.edu/pub/gnu/.

3.3 Printing PDF files

Adobe has released an Acrobat reader for Linux, and it's available on the Adobe home page http://www.adobe.com. Its predecessor, xpdf, is also available. Both should print to a postscript device.

3.4 Printing TeX files

One of the easiest ways to print TeX files is to convert them to PostScript and then print them using Ghostscript. To do this, you first need to convert them from TeX to a format known as DVI (which stands for device-independent). You can do this with the tex(1) command. Then you need to convert the DVI file to a PostScript file using dvips. All of this would look like the following when typed in.

$ tex thesis.tex
$ dvips thesis.dvi

Now you are ready to print the resulting PostScript file as described above.

3.5 Printing troff formatted files

$ groff -Tascii thesis.tr | lpr

or, if you prefer,

$ groff thesis.tr > thesis.ps

and then print the PostScript file as described above.

3.6 Printing man pages

$ man man | col -b | lpr

The man pages contain pre-formatted troff data, so we have to strip out any highlighting, underlines, etc. The 'col' program does this just nicely, and since we're piping data, the man program won`t use more.


Next Previous Contents
Search Howtos :Match :
PhpMyAdmin 3.1.2 rc1
Php front-end to MySQL administration
Xine 1.1.6
Free video player
Glade 3.5.5
User interface builder for GTK+ and Gnome
Evolution 2.25.4
GNOME mailer, calendar, contact manager and communications tool
GEdit 2.25.4
Small but powerful text editor
Mutt 1.5.19
Small but very powerful text-based mail client.
Galculator 1.3.2
GTK 2 based scientific calculator
GTK2 2.14.7
GUI Toolkit
WebGUI 7.5.38
A fully featured content management system.
Brasero 0.9.0
Application to burn CD/DVD
Free IT Magazines, White Papers, eBooks, and more !
Dr. Dobb's Journal

Dr. Dobb's Journal enables programmers to write the most efficient and sophisticated programs and help in daily programming quandaries.

The 7 Things that IT Security Professionals MUST KNOW!

Gain key insight into security problem and find the safest means to protect your technological assets.

Database Trends and Applications

Provides timely coverage of the technology, intelligence and insight needed to plan, implement and manage information-rich projects.

Linux Software Map
Find Linux RPM
Best Rated Linux Software
Most Rated Linux Software
Linux Distributions
Linux Howtos
Quick Survey

Please take our survey and help us improve our website to serve you better.

Thank you.
Linux Software
Linux / IT Resources
Site Resources
Google
Privacy Policy
Contact Us
Submit Software
Advertising info