Fedora publishing can be very paper-intensive if you send a Groff or LaTeX document to the printer each time you want to make a change to the document’s content or formatting. To save paper and time spent running around, you can use some print preview programs to display a document on the screen as it will appear on the printed page. The following sections describe the ghostscript command for displaying PostScript files and the Adobe Acrobat reader for displaying Portable Document Format (PDF) files.
To display PostScript or PDF documents in Fedora, you can use the ghostscript command. The ghostscript command is a fairly crude interface, intended to let you step through documents and interpret them one line at a time. (If the ghostscript command is not installed on your system, you can get it by installing the ghostscript package from the DVD that comes with this book.)
You can display any PS or .PDF file you happen to have on your computer. For example, if the samba package is installed, you could type the following to display a PDF file (otherwise, you could find your own PDF file to try it):
$ ghostscript /usr/share/doc/samba-*/docs/Samba-HOWTO-Collection.pdf >>showpage, press <return> to continue<<
At the prompt, press Enter (or Return) to go through the file one page at a time. When you have reached the end of the document, you can type the name of another PostScript or PDF file and page through that file. When you are done, type quit.
The ggv command (GNOME ghostview) is another, more friendly way of viewing PostScript files. (If the ggv command is not installed on your system, you can get it by installing the ggv package from the DVD that comes with this book.)
To use ggv to open a file called rbash.ps, you would type the following:
$ ggv /usr/share/doc/bash-*/bashref.ps
When the ghostview window opens, you can see the document. Left-click on the page and move it up and down to scroll the document. Use the Page Up and Page Down keys to page through the document. You can click on a page number in the left column to jump to a particular page or click the Print All button to print the entire document.
The Portable Document Format (PDF) provides a way of storing documents as they would appear in print. With Adobe Acrobat Reader, you can view PDF files in a very friendly way. Adobe Acrobat makes it easy to move around within a PDF file. A PDF file may include hyperlinks, a table of contents, graphics, and a variety of type fonts.
A recent version of the Adobe Acrobat Reader (version 5.08) is available in RPM format from Guru Labs (www.gurulabs.com/downloads.html). This version can use many PDF features that aren't available in other PDF readers, including some new compression features in version 1.4. (While you are at it, you can install the Acrobat Plug-in RPM, to use the same reader to play PDF content when you browse the Web).
After you install Adobe Acrobat Reader, type the following command to start the program:
Click File ® Open, and then select the name of a PDF file you want to display. Figure 6-12 shows an example of a PDF file viewed in Adobe Acrobat Reader.
Figure 6-12: Display PDF files in the Adobe Acrobat Reader.
Acrobat Reader has a lot of nice features. For example, you can display a list of bookmarks alongside the document and click on a bookmark to take you to a particular page. You can also display thumbnails of the pages to quickly scroll through and select a page.
Using the menu bar or buttons, you can page through the PDF document, zoom in and out, go to the beginning or end of the document, and display different views of the document (as well as display bookmarks and page thumbnails). To print a copy, click File ® Print.