- Table of Contents
- Copyright
- About the Lead Authors
- About the Contributing Authors
- Acknowledgments
- Tell Us What You Think!
- Introduction
- I. Red Hat Linux Installation and User Services
- Chapter 1. Introduction to Red Hat Linux
- Chapter 2. Installation of Your Red Hat System
- Chapter 3. LILO and Other Boot Managers
- Chapter 4. Configuring the X Window System, Version 11
- Chapter 5. Window Managers
- Chapter 6. Connecting to the Internet
- Chapter 7. IRC, ICQ, and Chat Clients
- Chapter 8. Using Multimedia and Graphics Clients
- II. Configuring Services
- Chapter 9. System Startup and Shutdown
- Chapter 10. SMTP and Protocols
- Chapter 11. FTP
- Chapter 12. Apache Server
- Chapter 13. Internet News
- Chapter 14. Domain Name Service and Dynamic Host Configuration Protocol
- Chapter 15. NIS: Network Information Service
- Chapter 16. NFS: Network Filesystem
- Chapter 17. Samba
- III. System Administration and Management
- Chapter 18. Linux Filesystems, Disks, and Other Devices
- Chapter 19. Printing with Linux
- Chapter 20. TCP/IP Network Management
- Chapter 21. Linux System Administration
- Chapter 22. Backup and Restore
- Chapter 23. System Security
- IV. Red Hat Development and Productivity
- Chapter 24. Linux C/C++ Programming Tools
- Chapter 25. Shell Scripting
- Chapter 26. Automating Tasks
- Chapter 27. Configuring and Building Kernels
- Chapter 28. Emulators, Tools, and Window Clients
- V. Appendixes
- A. The Linux Documentation Project
- B. Top Linux Commands and Utilities
- C. The GNU General Public License
- D. Red Hat Linux RPM Package Listings
Displaying and Printing Graphics
PostScript is the most common graphics and document format when preparing documents and graphics under UNIX and Linux. Although many editors can prepare documents in ASCII text, HTML, LaTeX, or other markup languages, most applications, including graphics editors, will convert output to PostScript for printing. This is an advantage, because PostScript provides a common platform and document standard for handling by a number of Linux clients, and documents saved to a file may be previewed instead of being sent directly to a printer. You'll find a number of PostScript previewers and utilities included with Red Hat Linux, as shown in Table 8.6.
Table 8.6. Linux PostScript Utilities
| Name | Description |
| enscript | Translates text to PostScript |
| gs | PostScript interpreter |
| gv | PostScript and PDF previewer |
| mpage | Creates multi-page PostScript documents |
| pbmtoepsi | Translates bitmap to EPSF |
| pbmtolps | Translates portable bitmap to PostScript |
| pdf2dsc | Creates PostScript page list of a PDF document |
| pdf2ps | Translates PDF to PostScript |
| pdftops | Translates PDF to PostScript |
| pnmtops | Translates portable anymap to PostScript |
| ps2ascii | Translates PostScript or PDF to text |
| ps2pdf | Translates PostScript to PDF |
| psidtopgm | Translates PostScript image data to portable graymap |
| pstopnm | Translates PostScript to portable anymap |
| sgml2latex | Creates LaTeX, DVI, or PostScript from SGML |
Does this mean that you must use PostScript for printing? Of course not! But using PostScript may help ensure consistent handling and output quality of your documents. To view a PostScript graphic or document, use an associated client, such as the gv PostScript previewer. You'll find example PostScript graphics under the /usr/share/ghostscript/5.50/examples/ directory, or you can create a PostScript document for previewing from an existing text document using the mpage command.
For example, to view the graphic tiger.ps, use the gv command from the command line of a terminal window like this:
# gv /usr/share/ghostscript/5.50/examples/tiger.ps
After you press Enter, you'll see the graphic in gv's main window, as shown in Figure 8.9.
Figure 8.9 The gv client previews, rotates, scales, and prints PostScript documents, or selected pages of PostScript documents.
You can use gv's various menus to rotate the image, reduce or enlarge the display, page through, or print selected pages of multi-page PostScript documents. Another client included with Red Hat Linux to support previewing PostScript is KDE's kghostview previewer.
If you'd like to display other types of graphics, use the display command, part of the ImageMagick software package. This command may be used to display one or more images, or a visual directory of images, and has many different features. For example, to display a single visual directory of all PCX files in a directory, use the display command like this:
# display 'vid:*pcx'
After you press Enter, a single window with a series of thumbnail images will be displayed, as shown in Figure 8.10.
Figure 8.10 The display command features a handy thumbnail visual directory.
To load an image for display, editing, conversion, transformation, or printing, move your cursor to a thumbnail image, then right-click the image. You'll see a pop-up menu that allows you to load the image.
Each of the previewers discussed here has the ability to print documents, but you can also print a graphic directly from the command line. For example, to print the tiger.ps graphic, use the lpr to spool the file for printing, like this:
# lpr /usr/share/ghostscript/5.50/examples/tiger.ps
This will send the graphic to the default printer. Red Hat Linux uses intelligent print filters that will automatically translate a file with the proper extension (such as .ps) into the proper printer control language. The printing system recognizes and prints the following types of graphics:
- .bmp—Windows bitmap
- .dvi—Device-independent image
- .fig—Vector-based document
- .gif—GIF graphic
- .jpg—JPEG graphic
- .pbm—Portable bitmap
- .pgm—Portable graymap
- .ppm—Portable pixmap
- .ps—PostScript
- .tif—TIFF graphic
Configuring Sound | Next Section

Account Sign In
View your cart