📄 rhl25.htm
字号:
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
MaxRGBRamp
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
5</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
useBackingPixmap
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
UseBackingPixmap
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
true</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
useXPutImage
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
UseXPutImage
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
true</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
useXSetTile
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
UseXSetTile
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
true</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
regularFonts
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
RegularFonts
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
symbolFonts
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
SymbolFonts
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
dingbatFonts
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
DingbatFonts
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080><BR></FONT>
</TABLE><P>Here are a few points on these resources:
<BR>
<UL>
<LI>The geometry resource only affects window placement. This does not affect the position of the image on the display in the window.
<BR>
<BR>
<LI>All resolution numbers are given in pixels per inch.
<BR>
<BR>
<LI>The font tolerance gives the largest acceptable difference in the height of the screen font. The tolerance is expressed as a percentage of the height of the desired font.
<BR>
<BR>
<LI>The palette resource can be used to restrict Ghostscript to using a grayscale or monochrome palette.
<BR>
<BR>
<LI>The maxRGBRamp and maxGrayRamp control the maximum number of colors that Ghostscript allocates ahead of time for dithering. Ghostscript will never pre-allocate more than half of the cells in a color map.
<BR>
<BR>
</UL>
<P>To use native X11 fonts, Ghostscript must map PostScript font names to the XLFD font names. The regularFonts, symbolFonts, and dingbatFonts resources give the name mapping for different encodings. The XLFD font name in the mapping must contain seven
dashes. The X driver adds the additional size and encoding fields to bring the total number of dashes in the font name to 14. The default font mappings are found in the FontMap file in /usr/lib/ghostscript or check the man pages.
<BR>
<BR>
<A NAME="E68E210"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>Command-Line Arguments</B></FONT></CENTER></H3>
<BR>
<P>Ghostscript takes a lot of command-line arguments. Generally you would want to put these in a shell script file instead of having to type them in all the time. Some of the most often used arguments are listed here. For a comprehensive list check out the
documents in /usr/lib/ghostscript/doc. Let's look at the most commonly used arguments:
<BR>
<UL>
<LI>@filename The filename specified here will contain a list of all the input file names. This beats typing in long names on every execution of gs with lots of input files.
<BR>
<BR>
<LI>-Idirectories Adds the list of directories at the head of the library files' search path.
<BR>
<BR>
<LI>-ffilename Executes the given file, even if its name begins with a -.
<BR>
<BR>
<LI>-Dname=token or -dname=token Defines a name with the given token. The token must not contain any whitespace. You must specify each token with its own -Dname option. -Dname or -dname without the = will set the value to null.
<BR>
<BR>
<LI>-Sname=string or -sname=string Defines a string.
<BR>
<BR>
</UL>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>The differences between -d and -s are these:
<BR>-dfoo=hello is equivalent to /foo hello def
<BR>-sfoo=hello is equivalent to /foo (hello) def</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<UL>
<LI>-q Suppresses normal startup messages.
<BR>
<BR>
<LI>-gnumber1xnumber2 Number1 is the width, Number2 is the height of the display device. This is for devices that enable width and height to be specified. This is equivalent to -dDEVICEWIDTH=number1 and -dDEVICEHEIGHT=number2.
<BR>
<BR>
<LI>-rnumber or -rnumber1xnumber2 This is for the benefit of devices (such as printers) that support multiple X and Y resolutions. You can also use -dDEVICEXRESOLUTION=number1 and -dDEVICEYRESOLUTION=number2.
<BR>
<BR>
<LI>- Uses standard input instead of the file. Ghostscript will read from stdin until reaching end-of-file, and execute it as another file. After the end of file, gs will process any other items as arguments but will not go into interactive mode.
<BR>
<BR>
<LI>-dDISKFONTS This argument causes individual character outlines to be loaded from the disk the first time they are encountered. Normally Ghostscript loads all the character outlines when it loads a font. This may enable loading more fonts into RAM at
the expense of slower rendering.
<BR>
<BR>
<LI>-dNODISPLAY Suppresses the normal initialization of the output device. This may be useful when debugging.
<BR>
<BR>
<LI>-dNOPAUSE Disables the prompt and pauses at the end of each page. This is useful for applications where another program is "driving" Ghostscript.
<BR>
<BR>
<LI>-dNOPLATFONTS Disables the use of fonts supplied by your machine. It is needed if the platform fonts look bad when compared to scaleable fonts.
<BR>
<BR>
<LI>-dSAFER Disables the deletefile and renamefile operators and the ability to open files in any mode other than read-only.
<BR>
<BR>
<LI>-sDEVICE=device Selects an alternate initial output device.
<BR>
<BR>
<LI>-sOutputFile=filename Selects an alternate output file instead of the default destination.
<BR>
<BR>
</UL>
<BR>
<A NAME="E68E211"></A>
<H3 ALIGN=CENTER>
<CENTER>
<FONT SIZE=5 COLOR="#FF0000"><B>PostScript Viewer Ghostview</B></FONT></CENTER></H3>
<BR>
<P>Ghostview is used to display encoded PostScript files. Ghostview is free. It was written and copyrighted by Tim Theisen. The ghostview command shows PostScript documents using Ghostscript.
<BR>
<P>Use the command line below to view a text file.
<BR>
<BR>
<PRE>
<FONT COLOR="#000080">$ ghostview [filename]</FONT></PRE>
<P>The ghostview program will create an X window, open the file, and display it. If the filename is '-', ghostview will read from stdin. The ghostview program provides an X11 user interface for the Ghostscript interpreter. ghostview and Ghostscript
function as two cooperating programs. ghostview creates the viewing window and Ghostscript draws in it.
<BR>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>Please use Ghostview to view files, especially those that require typesetting before sending them to the printer. You can save a lot of trees this way and get a quicker response about what to expect on the output. There are many programmers who still
print out files to see what the output would look like instead of previewing on the screen.
<BR>In fact you may not even have to print out a document if you intend to send it to a remote site. If you have to FAX it, use HylaFAX (<A HREF="rhl59.htm" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/rhl59.htm">Chapter 59</A>) with your FAX/modem to send it directly. If you have to e-mail it, uuencode it and
then send it out.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<P>Ghostview has a bewildering number of options. You do not have to use any of these options at all. Most of the options are there to override any Xresources that you set in .Xdefaults. Let's look at the main window, which consists of a main viewer and
control menus (of HylaFAX). (See Figure 25.3.)
<BR>
<P><B> <A HREF="25rhl03.gif" tppabs="http://202.113.16.101/%7eeb%7e/Red%20Hat%20Linux%20Unleashed/25rhl03.gif">Figure 25.3. Ghostview main window.</A></B>
<BR>
<P>The main viewport is on the right side of the main window. If the page is larger than the viewport, there will be scroll bars along the bottom and right edges of the viewport. To the left of the viewport is the table of contents. If the PostScript file
has document structuring convention (DSC) comments, the table of contents will display the page labels (these are usually page numbers). To the left of the table of contents is a menu box. Each push button brings up a pop-up menu.
<BR>
<P>Above the menu box and table of contents there are three optional labels that contain the title, date, and locator.
<BR>
<P>The title label contains the document title found in the DSC comments. If no title can be found, the filename is used in its place. The date label contains the document date found in the DSC comments. If no date can be found, the last modified date of
the file is used in its place. Since the title and date labels may be clipped by the main viewport, the date and title labels are pushbuttons that bring up a pop-up window with the title or date. These pop-up windows also show the document icon when the
displayed string comes from the DSC comments.
<BR>
<P>The locator shows the location of the cursor in the viewport. The location is expressed in the default user coordinate system. The locator is useful for measuring bounding boxes. Within the main viewport, the mouse cursor is a "target" when
Ghostscript is doing work. The cursor is a crosshair when Ghostscript is idle.
<BR>
<BLOCKQUOTE>
<BLOCKQUOTE>
<HR ALIGN=CENTER>
<BR>
<NOTE>When moving to another page in a document, it is generally best to wait for Ghostscript to become idle. Ghostscript does not handle a series of mouse clicks very well while it's working and can hang. You then have to use the kill command to get rid
of it, and start over.</NOTE>
<BR>
<HR ALIGN=CENTER>
</BLOCKQUOTE></BLOCKQUOTE>
<P>Ghostview will always check to see if the file has been modified just before it displays a page or when the application is de-iconified. If the file has changed, it will re-open the file. This causes a bit of an overhead, but is helpful when you are
trying to edit a file from another program and need to see your progress.
<BR>
<P>Clicking anywhere within the viewport will pop up a zoom window. The window is centered on the location that was clicked. Clicking with the left mouse button pops up a low-resolution zoom window. Clicking with the center mouse button pops up a
medium-resolution zoom window. Clicking with the right mouse button pops up a high-resolution zoom window.
<BR>
<P>In the table of contents, the left mouse button selects text and the right mouse button extends selections. However, clicking on a page label with the center mouse button will display that page. The page being displayed is marked with a greater than
symbol (>) in the right margin of the table of contents.
<BR>
<P>There are five buttons in the menu box. These are listed below:
<BR>
<UL>
<LI>File This menu enables you to open, reopen, print, show a copyright message, and quit the application. A Select File dialog box will appear when you click the open button. The Select File dialog widget enables you to select a file by typing the path or
by browsing in directory listings and selecting entries with the mouse. The Select File dialog box is system modal; that is, no other controls in ghostview will be active during this time.
<BR>
<BR>
<LI>Page This pop-up menu controls which page you display. Next shows the next page, Redisplay redraws the current page, Previous shows the previous page, Mark and Unmark set a page in the table of contents as marked and unmarked.
<BR>
<BR>
<LI>Magstep This menu controls the magnification of the display. Zero implies no magnification (what you see is what you get). The multiplication factor is 1.2, so with a magstep of -1, the document is reduced by -1.2, a magstep of 1 zooms in by 1.2.
<BR>
<BR>
<LI>Orientation This enables you to select either a landscape or portrait orientation of the display. You can also flip the image with the Upsidedown to see FAXed documents. The Seascape option rotates the image 90 degrees counterclockwise.
<BR>
<BR>
<LI>Media The entries on the Media menu set the page media. The standard sizes you can select are: Letter, Tabloid, Ledger, Legal, Statement, Executive, A3, A4, A5, B4, B5, Folio, Quarto, and 10´14.
<BR>
<BR>
</UL>
<BR>
<A NAME="E69E316"></A>
<H4 ALIGN=CENTER>
<CENTER>
<FONT SIZE=4 COLOR="#FF0000"><B>Keyboard Accelerators</B></FONT></CENTER></H4>
<BR>
<P>Some of the pop-up menu commands can be executed with the keyboard. The pop-up menu has to be active (in other words, selected by the user for input) for the action to have effect. Some of the bindings are listed in Table 25.2.
<BR>
<BR>
<P ALIGN=CENTER>
<CENTER>
<FONT COLOR="#000080"><B>Table 25.2. Keyboard shortcuts.</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>Key</I>
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
<I>Action</I></FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
Q
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
The Quit menu button</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
O
</FONT>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
The Open... menu button on the File menu</FONT>
<TR>
<TD VALIGN=top BGCOLOR=#80FFFF ><FONT COLOR=#000080>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -