⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 rhl25.htm

📁 linux的初学电子书
💻 HTM
📖 第 1 页 / 共 4 页
字号:
<HTML>

<HEAD>

<TITLE>Red Hat Linux Unleashed rhl25.htm </TITLE>

<LINK REL="ToC" HREF="index-1.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/index.htm">

<LINK REL="Index" HREF="htindex.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/htindex.htm">

<LINK REL="Next" HREF="rhl26.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl26.htm">

<LINK REL="Previous" HREF="rhl24.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl24.htm"></HEAD>

<BODY BGCOLOR="#FFFFFF" TEXT="#000000" LINK="#0000FF" VLINK="#800080">

<A NAME="I0"></A>

<H2>Red Hat Linux Unleashed rhl25.htm</H2>

<P ALIGN=LEFT>

<A HREF="rhl24.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl24.htm" TARGET="_self"><IMG SRC="purprev.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purprev.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Previous Page"></A>

<A HREF="index-1.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/index.htm" TARGET="_self"><IMG SRC="purtoc.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purtoc.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="TOC"></A>

<A HREF="rhl26.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl26.htm" TARGET="_self"><IMG SRC="purnext.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/purnext.gif" WIDTH = 32 HEIGHT = 32 BORDER = 0 ALT="Next Page"></A>


<HR ALIGN=CENTER>

<P>

<UL>

<UL>

<UL>

<LI>

<A HREF="#E68E203" >What Is Ghostscript?</A>

<UL>

<LI>

<A HREF="#E69E314" >Ghostscript Information</A></UL>

<LI>

<A HREF="#E68E204" >Installation</A>

<LI>

<A HREF="#E68E205" >The Ghostscript Interpreter</A>

<UL>

<LI>

<A HREF="#E69E315" >Getting Help While in gs</A></UL>

<LI>

<A HREF="#E68E206" >Choosing the Output Device</A>

<LI>

<A HREF="#E68E207" >Paper Size Configuration</A>

<LI>

<A HREF="#E68E208" >Environment Variables</A>

<LI>

<A HREF="#E68E209" >Configuring for X Window</A>

<LI>

<A HREF="#E68E210" >Command-Line Arguments</A>

<LI>

<A HREF="#E68E211" >PostScript Viewer Ghostview</A>

<UL>

<LI>

<A HREF="#E69E316" >Keyboard Accelerators</A>

<LI>

<A HREF="#E69E317" >X Resources</A></UL>

<LI>

<A HREF="#E68E212" >Using Other Fonts</A>

<LI>

<A HREF="#E68E213" >Getting More Help</A>

<LI>

<A HREF="#E68E214" >Summary</A></UL></UL></UL>

<HR ALIGN=CENTER>

<A NAME="E66E25"></A>

<H1 ALIGN=CENTER>

<CENTER>

<FONT SIZE=6 COLOR="#FF0000"><B>25</B></FONT></CENTER></H1>

<BR>

<A NAME="E67E25"></A>

<H2 ALIGN=CENTER>

<CENTER>

<FONT SIZE=6 COLOR="#FF0000"><B>Ghostscript</B></FONT></CENTER></H2>

<BR>

<P>This chapter covers installation and use of Ghostscript, a PostScript interpreter. Almost everything related to Linux is in PostScript. If you have a PostScript printer, you simply send the file to the printer for a hardcopy.

<BR>

<BR>

<A NAME="E68E203"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>What Is Ghostscript?</B></FONT></CENTER></H3>

<BR>

<P>Ghostscript is actually a set of programs. Collectively, these programs provide two important features:

<BR>

<UL>

<LI>An interpreter for the PostScript language.

<BR>

<BR>

<LI>A library of C functions for implementing primitive PostScript constructs.

<BR>

<BR>

</UL>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>PostScript is a trademark of Adobe Systems, Incorporated.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<P>Ghostscript has been ported to several platforms from PCs, OS/2, Apple Macintoshes, Ataris, to various flavors of UNIX, for example, Sun workstations, IBM AIX machines, and so on. Since Ghostscript is written in C, chances are that it will be portable 
to your platform. If you support X11, you will probably be able to run Ghostscript.

<BR>

<P>Several executable files come with Ghostscript. Some of the executables are also used by other packages under Linux. For example, HylaFAX (<A HREF="rhl59.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl59.htm">Chapter 59</A>, &quot;Using FlexFAX, sendfax, and mgetty&quot;) uses the main Ghostscript 
program, gs. In short, if you use Linux, you will find a need for Ghostscript.

<BR>

<BR>

<A NAME="E69E314"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Ghostscript Information</B></FONT></CENTER></H4>

<BR>

<P>The primary contact for getting information about Ghostscript is:

<BR>

<UL>

<UL>

<P>Aladdin Enterprises

</UL></UL>

<UL>

<UL>

<P>P.O. Box 60264

</UL></UL>

<UL>

<UL>

<P>Palo Alto, CA 94306

</UL></UL>

<UL>

<UL>

<P>voice (415) 322-0103

</UL></UL>

<UL>

<UL>

<P>FAX (415) 322-1734

</UL></UL>

<UL>

<UL>

<P><A HREF="mailto:ghost@aladdin.com">ghost@aladdin.com</A>

<BR>

</UL></UL>

<P>In fact, the Ghostscript package that you get with Linux is from Aladdin Enterprises. The information about Ghostscript is best summarized in its README file:

<BR>

<P>&quot;L. Peter Deutsch, president of Aladdin Enterprises, was the original creator, and is the primary developer and maintainer, of Ghostscript. Aladdin Enterprises owns the copyright on Ghostscript; Ghostscript is distributed with the GNU General 
Public License, and is also available for commercial licensing.&quot;

<BR>

<BR>

<A NAME="E68E204"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>Installation</B></FONT></CENTER></H3>

<BR>

<P>To run Ghostscript, you need the executable program and some external initialization files:

<BR>

<PRE>

<FONT COLOR="#000080">/usr/lib/ghostscript/bdftops.ps

/usr/lib/ghostscript/decrypt.ps

/usr/lib/ghostscript/font2c.ps

/usr/lib/ghostscript/gs_dbt_e.ps

/usr/lib/ghostscript/gs_dps1.ps

/usr/lib/ghostscript/gs_fonts.ps

/usr/lib/ghostscript/gs_init.ps

/usr/lib/ghostscript/gs_lev2.ps

/usr/lib/ghostscript/gs_statd.ps

/usr/lib/ghostscript/gs_sym_e.ps

/usr/lib/ghostscript/gs_type0.ps

/usr/lib/ghostscript/gslp.ps

/usr/lib/ghostscript/impath.ps

/usr/lib/ghostscript/landscap.ps

/usr/lib/ghostscript/level1.ps

/usr/lib/ghostscript/prfont.ps

/usr/lib/ghostscript/ps2ascii.ps

/usr/lib/ghostscript/ps2epsi.ps

/usr/lib/ghostscript/ps2image.ps

/usr/lib/ghostscript/pstoppm.ps

/usr/lib/ghostscript/quit.ps

/usr/lib/ghostscript/showpage.ps

/usr/lib/ghostscript/type1ops.ps

/usr/lib/ghostscript/wrfont.ps

/usr/lib/ghostscript/uglyr.gsf

/usr/lib/ghostscript/Fontmap</FONT></PRE>

<P>The Ghostscript file set includes a set of fonts (.gsf files). You should have them online as well.

<BR>

<P>Installing Ghostscript on a Linux system simply requires getting it from the CD-ROM or Internet. The name of the executable is gs.

<BR>

<P>You can build Ghostscript on your machine if you want to. The makefiles that come with the sources will install all the files and directories under your /usr/local directory.

<BR>

<P>The fonts for Ghostscript are stored in /usr/lib/ghostscript/fonts.

<BR>

<BR>

<A NAME="E68E205"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>The Ghostscript Interpreter</B></FONT></CENTER></H3>

<BR>

<P>The Ghostscript interpreter is the gs command in /usr/bin/gs. This is an interactive interpreter that also reads in files for its input. To invoke the gs interpreter, use the command

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">gs [filename1] ... [filenameN]</FONT></PRE>

<P>The interpreter will read in the files in sequence and interpret them. After doing this, it reads further input from the primary input stream (normally the keyboard). Each line (that is, characters up to a &lt;return&gt;) is interpreted separately. To 
exit from the interpreter, type quit and press the Return key. The interpreter also exits gracefully if it encounters end-of-file. Typing the interrupt character (Ctrl-C), is also safe.

<BR>

<P>See Figure 25.1 for the input to the interpreter. (Your version number may be different than that shown in the figure.) The output is shown in a separate window as shown in Figure 25.2 (which shows the FlexFAX FAQ). The file in this example is the FAQ 
for the HylaFAX program (see <A HREF="rhl59.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl59.htm">Chapter 59</A>) and is called fax-112894.ps. You can get this file via Mosaic (see <A HREF="rhl56.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl56.htm">Chapter 56</A>, &quot;Using Mosaic and Netscape&quot;) from www.vix.com from the HylaFAX directory.

<BR>

<P><B> <A HREF="25rhl01.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/25rhl01.gif">Figure 25.1. The </B><B>gs</B><B> interpreter.</A></B>

<BR>

<P><B> <A HREF="25rhl02.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/25rhl02.gif">Figure 25.2. The output from </B><B>gs</B><B> interpreter.</A></B>

<BR>

<BR>

<A NAME="E69E315"></A>

<H4 ALIGN=CENTER>

<CENTER>

<FONT SIZE=4 COLOR="#FF0000"><B>Getting Help While in </B><B>gs</B></FONT></CENTER></H4>

<BR>

<P>The gs interpreter recognizes several arguments. We will cover most of the important ones in this chapter. However, you can get help from gs too. Either the -h or -? option tells gs to print out a help screen. The help screen also lists all available 
devices for gs on your system.

<BR>

<BR>

<A NAME="E68E206"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>Choosing the Output Device</B></FONT></CENTER></H3>

<BR>

<P>Ghostscript may be built with multiple output devices. Ghostscript normally opens the first one and directs output to it. To use device Laserjet as the initial output device, include the following argument in the command line:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">-sDEVICE=laserjet</FONT></PRE>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>Command line arguments to gs can appear anywhere on the command line. Once specified, these arguments apply to all subsequent files listed in the command line. These arguments will not apply to any files specified before the argument. So if you have 
important arguments like sDEVICE, specify these arguments before you specify the PostScript file.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>PostScript files are usually specified with the .ps extension.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<P>For example, for printer output in a normal configuration that includes a Laserjet printer driver, you might use the shell command

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">gs -sDEVICE=laserjet showme.ps</FONT></PRE>

<P>Alternatively, in the interpreter you can type

<BR>

<PRE>

<FONT COLOR="#000080"> (laserjet) selectdevice

 (showme.ps) run</FONT></PRE>

<P>All output then goes to the printer instead of the display until changed. You can switch devices at any time by using the selectdevice function, for example,

<BR>

<BR>

<PRE>

<FONT COLOR="#000080"> (vga) selectdevice # for VGA screen</FONT></PRE>

<P>or

<BR>

<BR>

<PRE>

<FONT COLOR="#000080"> (nec) selectdevice #for NEC printer</FONT></PRE>

<P>As yet a third alternative, you can define an environment variable GS_DEVICE as the desired default device name. The order of precedence for these alternatives, highest to lowest, is this:

<BR>

<PRE>

<FONT COLOR="#000080">selectdevice

 (command line)

GS_DEVICE

 (first device in build list)</FONT></PRE>

<P>To select the density on a printer, use the command

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -