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

📄 rhl25.htm

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

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">gs -sDEVICE=&lt;device&gt; -r&lt;xres&gt;x&lt;yres&gt;</FONT></PRE>

<P>For example, on a nine-pin, Epson-compatible printer, you can get the lowest-density (fastest) mode with the command

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">gs -sDEVICE=epson -r60x72</FONT></PRE>

<P>For the highest-density mode with Epson printers, use

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">gs -sDEVICE=epson -r240x72.</FONT></PRE>

<P>If you select a printer as the output device, Ghostscript also enables you to control where the device sends its output.

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">-sOutputFile=print%d.xyz</FONT></PRE>

<P>For compatibility with older versions of Ghostscript, -sOUTPUTFILE= also works.

<BR>

<P>The %d is a printf format specification. You can use other formats like %02d. Each file will receive one page of output. Alternatively, to send the output to a single file bigfile.xyz, with all the pages concatenated, use the command line argument: 
-sOutputFile=foo.xyz.

<BR>

<P>On UNIX-like systems, you can send the output directly to a pipe. For example, to pipe the output to the command lpr (which, on many UNIX systems, is the command that spools output for a printer), use the switch

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">-sOutputFile=\|lpr</FONT></PRE>

<P>Don't forget to escape the pipe symbol (|). You can also send output to stdout for piping with the dash as the output file. That is, use the option -sOutputFile=-. In this case you must also use the -q switch to prevent Ghostscript from writing messages 
to stdout.

<BR>

<P>To find out what devices are available, type &quot;devicenames ==&quot; after starting up Ghostscript.

<BR>

<BR>

<A NAME="E68E207"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>Paper Size Configuration</B></FONT></CENTER></H3>

<BR>

<P>Ghostscript is normally configured to expect U.S. letter size paper. To select a different paper size as the default, use the argument -sPAPERSIZE=known_paper_size. (You can create your own paper sizes with the devs.mak file.) Generally, you have a 
large selection available. The entire list can be found in the file

<BR>

<BR>

<PRE>

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

<P>Print this file out if you can, to keep it handy. Some examples of setting the paper size are

<BR>

<PRE>

<FONT COLOR="#000080">-sPAPERSIZE=a4

-sPAPERSIZE=legal

-sPAPERSIZE=11x17

-sPAPERSIZE=ledger</FONT></PRE>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>A PostScript file may explicitly specify the paper size. In this case, the file's specification will override any command line argument specification.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<BR>

<A NAME="E68E208"></A>

<H3 ALIGN=CENTER>

<CENTER>

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

<BR>

<P>Ghostscript uses these environment variables: GS_LIB, GS_LIB_DEFAULT, and GS_FONTPATH.

<BR>

<P>When looking for the initialization files (gs_*.ps), the files related to fonts, or the file for the run operator, Ghostscript first tries opening the file with the name as given (that is, using the current working directory if none is specified). If 
this fails, and the filename doesn't specify an explicit directory or drive (that is, doesn't begin with / on UNIX), Ghostscript will try directories in the following order:

<BR>

<UL>

<LI>The GS_LIB variable specifies several directories for gs to look in for files if a full path name of an input file is not specified. The directory names are separated by colons (like the PATH command).

<BR>

<BR>

<LI>The GS_LIB_DEFAULT variable is similar to the GS_LIB variable and is searched if GS_LIB's directories showed nothing. Both of these variables (GS_LIB and GS_LIB_DEFAULT) can be overridden by the -I argument.

<BR>

<BR>

<LI>The GS_FONTPATH environment variable is a list of directories for PostScript fonts. All those files and fonts listed in this directory are added to gs's internal copy of the Fontmap. A Fontmap is a catalog of fonts and the files that contain them.

<BR>

<BR>

</UL>

<BLOCKQUOTE>

<BLOCKQUOTE>

<HR ALIGN=CENTER>

<BR>

<NOTE>Ghostscript will create temporary files by using the TEMP environment variable as the location of the /tmp directory. These files are named gs_XXXXX, where XXXXX is replaced by a number or a string of jumbled characters. Ghostscript doesn't do a very 
good job of deleting temporary files when it exits. If you see your /tmp space being used by these files you may have to delete them using the rm /tmp/gs_* command.</NOTE>

<BR>

<HR ALIGN=CENTER>

</BLOCKQUOTE></BLOCKQUOTE>

<BR>

<A NAME="E68E209"></A>

<H3 ALIGN=CENTER>

<CENTER>

<FONT SIZE=5 COLOR="#FF0000"><B>Configuring for X Window</B></FONT></CENTER></H3>

<BR>

<P>Ghostscript looks for the resources under the program name ghostscript and class name Ghostscript in the .Xdefaults file. To set a resource, put the resource in .Xdefaults in the following form:

<BR>



<TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Ghostscript*geometry:

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

-0+0</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Ghostscript*xResolution:

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

72</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Ghostscript*yResolution:

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

72</FONT>

</TABLE><P>Then load the defaults into the X server:

<BR>

<BR>

<PRE>

<FONT COLOR="#000080">% xrdb -merge ~/.Xdefaults</FONT></PRE>

<P>Table 25.1 lists the options available to you.

<BR>

<BR>

<P ALIGN=CENTER>

<CENTER>

<FONT COLOR="#000080"><B>Table 25.1. Ghostscript resources.</B></FONT></CENTER>

<BR>



<TABLE  BORDERCOLOR=#000040 BORDER=1 CELLSPACING=2 WIDTH="100%" CELLPADDING=2 >

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Name</I>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Class</I>

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

<I>Default</I></FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

background

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Background

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

white</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

foreground

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Foreground

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

black</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

borderColor

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

BorderColor

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

black</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

borderWidth

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

BorderWidth

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

1</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

geometry

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Geometry

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

NULL</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

xResolution

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Resolution

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

calculated</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

yResolution

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Resolution 

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

calculated</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

useExternalFonts

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

UseExternalFonts

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

true</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

useScalableFonts

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

UseScalableFonts

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

true</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

logExternalFonts

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

LogExternalFonts

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

false</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

externalFontTolerance

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

ExternalFontTolerance

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

10.0</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

palette

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Palette

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

Color</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

maxGrayRamp

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

MaxGrayRamp

</FONT>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

128</FONT>

<TR>

<TD VALIGN=top  BGCOLOR=#80FFFF ><FONT COLOR=#000080>

maxRGBRamp

⌨️ 快捷键说明

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