Use.htm 110 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304130513061307130813091310131113121313131413151316131713181319132013211322132313241325132613271328132913301331133213331334133513361337133813391340134113421343134413451346134713481349135013511352135313541355135613571358135913601361136213631364136513661367136813691370137113721373137413751376137713781379138013811382138313841385138613871388138913901391139213931394139513961397139813991400140114021403140414051406140714081409141014111412141314141415141614171418141914201421142214231424142514261427142814291430143114321433143414351436143714381439144014411442144314441445144614471448144914501451145214531454145514561457145814591460146114621463146414651466146714681469147014711472147314741475147614771478147914801481148214831484148514861487148814891490149114921493149414951496149714981499150015011502150315041505150615071508150915101511151215131514151515161517151815191520152115221523152415251526152715281529153015311532153315341535153615371538153915401541154215431544154515461547154815491550155115521553155415551556155715581559156015611562156315641565156615671568156915701571157215731574157515761577157815791580158115821583158415851586158715881589159015911592159315941595159615971598159916001601160216031604160516061607160816091610161116121613161416151616161716181619162016211622162316241625162616271628162916301631163216331634163516361637163816391640164116421643164416451646164716481649165016511652165316541655165616571658165916601661166216631664166516661667166816691670167116721673167416751676167716781679168016811682168316841685168616871688168916901691169216931694169516961697169816991700170117021703170417051706170717081709171017111712171317141715171617171718171917201721172217231724172517261727172817291730173117321733173417351736173717381739174017411742174317441745174617471748174917501751175217531754175517561757175817591760176117621763176417651766176717681769177017711772177317741775177617771778177917801781178217831784178517861787178817891790179117921793179417951796179717981799180018011802180318041805180618071808180918101811181218131814181518161817181818191820182118221823182418251826182718281829183018311832183318341835183618371838183918401841184218431844184518461847184818491850185118521853185418551856185718581859186018611862186318641865186618671868186918701871187218731874187518761877187818791880188118821883188418851886188718881889189018911892189318941895189618971898189919001901190219031904190519061907190819091910191119121913191419151916191719181919192019211922192319241925192619271928192919301931193219331934193519361937193819391940194119421943194419451946194719481949195019511952195319541955195619571958195919601961196219631964196519661967196819691970197119721973197419751976197719781979198019811982198319841985198619871988198919901991199219931994199519961997199819992000200120022003200420052006200720082009201020112012201320142015201620172018201920202021202220232024202520262027202820292030203120322033203420352036203720382039204020412042204320442045204620472048204920502051205220532054205520562057205820592060206120622063206420652066206720682069207020712072207320742075207620772078207920802081208220832084208520862087208820892090209120922093209420952096209720982099210021012102210321042105210621072108210921102111211221132114211521162117211821192120212121222123212421252126212721282129213021312132213321342135213621372138213921402141214221432144214521462147214821492150215121522153215421552156215721582159216021612162216321642165216621672168216921702171217221732174217521762177217821792180218121822183218421852186218721882189219021912192219321942195219621972198219922002201220222032204220522062207220822092210221122122213221422152216221722182219222022212222222322242225222622272228222922302231223222332234223522362237223822392240224122422243224422452246224722482249225022512252225322542255225622572258225922602261226222632264226522662267226822692270227122722273227422752276227722782279228022812282228322842285228622872288228922902291229222932294229522962297229822992300230123022303230423052306230723082309231023112312231323142315231623172318231923202321232223232324232523262327232823292330233123322333233423352336233723382339234023412342234323442345234623472348234923502351235223532354235523562357235823592360236123622363236423652366236723682369237023712372237323742375237623772378237923802381238223832384238523862387238823892390239123922393239423952396239723982399240024012402240324042405240624072408240924102411241224132414241524162417241824192420242124222423242424252426242724282429243024312432243324342435243624372438243924402441244224432444244524462447244824492450245124522453245424552456245724582459246024612462246324642465246624672468246924702471247224732474247524762477247824792480248124822483248424852486248724882489249024912492249324942495249624972498249925002501250225032504250525062507250825092510251125122513251425152516251725182519252025212522252325242525252625272528252925302531253225332534253525362537253825392540254125422543254425452546254725482549255025512552255325542555255625572558255925602561256225632564256525662567256825692570257125722573257425752576257725782579258025812582258325842585258625872588258925902591259225932594259525962597259825992600260126022603260426052606260726082609261026112612261326142615261626172618261926202621262226232624262526262627262826292630263126322633263426352636263726382639264026412642264326442645264626472648264926502651265226532654265526562657265826592660266126622663266426652666266726682669267026712672267326742675267626772678267926802681268226832684268526862687268826892690269126922693269426952696269726982699270027012702270327042705270627072708270927102711271227132714271527162717271827192720272127222723272427252726272727282729273027312732273327342735273627372738273927402741274227432744274527462747274827492750275127522753275427552756275727582759276027612762276327642765276627672768276927702771277227732774277527762777277827792780278127822783278427852786278727882789279027912792279327942795279627972798279928002801280228032804280528062807280828092810281128122813281428152816281728182819282028212822282328242825282628272828282928302831283228332834283528362837283828392840284128422843284428452846284728482849285028512852285328542855285628572858285928602861286228632864286528662867286828692870287128722873287428752876287728782879288028812882288328842885288628872888288928902891289228932894289528962897289828992900290129022903290429052906290729082909291029112912291329142915291629172918291929202921292229232924292529262927
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
  2. "http://www.w3.org/TR/html4/loose.dtd">
  3. <html>
  4. <head>
  5. <title>How to use Ghostscript</title>
  6. <!-- $Id: Use.htm,v 1.33.2.3 2002/02/01 04:55:55 raph Exp $ -->
  7. <!-- Originally: use.txt -->
  8. <link rel="stylesheet" type="text/css" href="gs.css" title="Ghostscript Style">
  9. </head>
  10. <body>
  11. <!-- [1.0 begin visible header] ============================================ -->
  12. <!-- [1.1 begin headline] ================================================== -->
  13. <h1>How to use Ghostscript</h1>
  14. <!-- [1.1 end headline] ==================================================== -->
  15. <!-- [1.2 begin table of contents] ========================================= -->
  16. <h2>Table of contents</h2>
  17. <blockquote><ul>
  18. <li><a href="#Invoking">Invoking Ghostscript</a>
  19. <ul>
  20. <li><a href="#Help_command">Help at the command line: <b><tt>gs -h</tt></b></a>
  21. </ul>
  22. <li><a href="#Security">Security</a>
  23. <li><a href="#Pipe_input">Input from a pipe</a>
  24. <li><a href="#Output_device">Selecting an output device</a>
  25. <ul>
  26. <li><a href="#Printer_resolution">Printer resolution</a>
  27. <li><a href="#File_output">Output to files</a>
  28. <ul>
  29. <li><a href="#One_page_per_file">One page per file</a>
  30. <li><a href="#Pipe_output">Output to a pipe</a>
  31. <li><a href="#Output_to_graphics">Output to graphics file formats</a>
  32. <li><a href="#Bounding_box_output">Bounding box output</a>
  33. </ul>
  34. <li><a href="#Paper_size">Choosing paper size</a>
  35. <li><a href="#Change_default_size">Changing the installed default paper size</a>
  36. </ul>
  37. <li><a href="#Finding_files">How Ghostscript finds files</a>
  38. <ul>
  39. <li><a href="#PS_resources">Finding PostScript Level 2 resources</a>
  40. <li><a href="#Font_lookup">Font lookup</a>
  41. <li><a href="#Temp_files">Temporary files</a>
  42. </ul>
  43. <li><a href="#Environment_variables">Summary of environment variables</a>
  44. <li><a href="#PDF">Using Ghostscript with PDF files</a>
  45. <ul>
  46. <li><a href="#PDF_stdin">PDF files from standard input</a>
  47. <li><a href="#PDF_switches">Switches for PDF files</a>
  48. <li><a href="#PDF_problems">Problems interpreting a PDF file</a>
  49. </ul>
  50. <li><a href="#Platforms">Notes on specific platforms</a>
  51. <ul>
  52. <li><a href="#Unix">Unix</a>
  53. <li><a href="#VMS">VMS</a>
  54. <ul>
  55. <li><a href="#VMS_X_Windows">Using X Windows on VMS</a>
  56. </ul>
  57. <li><a href="#MS_Windows">MS Windows</a>
  58. <li><a href="#MS-DOS">MS-DOS</a>
  59. <li><a href="#X_Windows">X Windows</a>
  60. <ul>
  61. <li><a href="#X_resources">X resources</a>
  62. <li><a href="#X_server_bugs">Working around bugs in X servers</a>
  63. <li><a href="#X_fonts">X fonts</a>
  64. <li><a href="#GS_fonts_as_X_fonts">Using Ghostscript fonts on X displays</a>
  65. <li><a href="#X_device_parameters">X device parameters</a>
  66. </ul>
  67. <li><a href="#SCO_Unix">SCO Unix</a>
  68. </ul>
  69. <li><a href="#Switches">Switches</a>
  70. <ul>
  71. <li><a href="#General_switches">General switches</a>
  72. <ul>
  73. <li><a href="#Input_control">Input control</a>
  74. <li><a href="#File_searching">File searching</a>
  75. <li><a href="#Parameters">Setting parameters</a>
  76. <li><a href="#Quiet">Suppress messages</a>
  77. </ul>
  78. <li><a href="#Parameter_switches">Parameter switches (<b><tt>-d</tt></b> and <b><tt>-s</tt></b>)</a>
  79. <ul>
  80. <li><a href="#Rendering_parameters">Rendering parameters</a>
  81. <li><a href="#Page_parameters">Page parameters</a>
  82. <li><a href="#Font_related_parameters">Font-related parameters</a>
  83. <li><a href="#Interaction_related_parameters">Interaction-related parameters</a>
  84. <li><a href="#Output_selection_parameters">Device and output selection parameters</a>
  85. <li><a href="#Other_parameters">Other parameters</a>
  86. </ul>
  87. </ul>
  88. <li><a href="#Improving_performance">Improving performance</a>
  89. <li><a href="#Debugging">Debugging</a>
  90. <li><a href="#Known_paper_sizes">Appendix: Paper sizes known to Ghostscript</a>
  91. <li><a href="#X_font_mappings">Appendix: X default font mappings</a>
  92. <ul>
  93. <li><a href="#Standard_X_server_fonts">Standard X servers</a>
  94. <ul>
  95. <li><a href="#X_regular_fonts">Regular fonts</a>
  96. <li><a href="#X_symbol_fonts">Symbol fonts</a>
  97. <li><a href="#X_dingbat_fonts">Dingbat fonts</a>
  98. </ul>
  99. <li><a href="#OpenWindows_fonts">Sun OpenWindows</a>
  100. </ul>
  101. </ul></blockquote>
  102. <!-- [1.2 end table of contents] =========================================== -->
  103. <!-- [1.3 begin hint] ====================================================== -->
  104. <p>For other information, see the <a href="Readme.htm">Ghostscript
  105. overview</a>, the new user's documentation on
  106. <a href="New-user.htm#Previewers">previewers</a> and, if necessary, how to
  107. <a href="Install.htm">install Ghostscript</a>.
  108. <!-- [1.3 end hint] ======================================================== -->
  109. <hr>
  110. <!-- [1.0 end visible header] ============================================== -->
  111. <!-- [2.0 begin contents] ================================================== -->
  112. <h2><a name="Invoking"></a>Invoking Ghostscript</h2>
  113. <p><a name="Command_line"></a> The command line to invoke Ghostscript is
  114. essentially the same on all systems, although the name of the executable
  115. program itself may differ among systems. For instance, to invoke
  116. Ghostscript on Unix:
  117. <blockquote>
  118. <b><tt>gs</tt></b> [switches] {filename 1} ... [switches] {filename <em>N</em>} ...
  119. </blockquote>
  120. <blockquote><table cellpadding=0 cellspacing=0>
  121. <tr><th colspan=3 bgcolor="#CCCC00"><hr><font size="+1">Ghostscript's name on different systems</font><hr>
  122. <tr> <th align=left>System
  123. <td>&nbsp;&nbsp;
  124. <th align=left>Ghostscript's name
  125. <tr> <td colspan=3><hr>
  126. <tr> <td>Unix
  127. <td>&nbsp;<td><b><tt>gs</tt></b>
  128. <tr> <td>VMS
  129. <td>&nbsp;<td><b><tt>gs</tt></b>
  130. <tr> <td>DOS &amp; MS Windows 3
  131. <td>&nbsp;<td><b><tt>gs386</tt></b>
  132. <tr> <td>MS Windows 95/98
  133. <td>&nbsp;<td><b><tt>gswin32</tt></b>
  134. <tr> <td>MS Windows 95/98 command line
  135. <td>&nbsp;<td><b><tt>gswin32c</tt></b>
  136. <tr> <td>OS/2
  137. <td>&nbsp;<td><b><tt>gsos2</tt></b>
  138. </table></blockquote>
  139. <p>
  140. Note, though, that on a system with a windowed graphical user interface,
  141. it's common to use Ghostscript through a previewer, so you should read the
  142. <a href="New-user.htm#Previewers">section about previewers</a> in the
  143. documentation for new users.
  144. <p>
  145. Ghostscript is capable of interpreting PostScript, encapsulated PostScript
  146. (EPS), DOS EPS (EPSF), and -- if the executable was built for it -- Adobe
  147. Portable Document Format (PDF). The interpreter reads and executes the
  148. files in sequence, using the method described under
  149. "<a href="#File_searching">File searching</a>" to find them. After doing
  150. this, it reads further lines of PostScript language commands from the
  151. primary input stream, normally the keyboard, interpreting each line
  152. separately. To quit the interpreter, type "<b><tt>quit</tt></b>". The
  153. interpreter also quits gracefully if it encounters end-of-file or
  154. control-C.
  155. <p>
  156. The interpreter recognizes many <a href="#Switches">switches</a>. A switch
  157. may appear anywhere in the command line, and applies to all files named
  158. after it on the line. Many of the switches include "<b><tt>=</tt></b>"
  159. followed by a parameter. (However, with the DOS executable
  160. <b><tt>gs386.exe</tt></b> in the standard Ghostscript distribution, you
  161. must use "<b><tt>#</tt></b>" rather than "<b><tt>=</tt></b>", because of a
  162. strange design decision in the Watcom C/C++ run-time library used to build
  163. it.)
  164. <h3><a name="Help_command"></a>Help at the command line: <b><tt>gs -h</tt></b></h3>
  165. <p>
  166. You can get a brief help message by invoking Ghostscript with the
  167. <b><tt>-h</tt></b> or <b><tt>-?</tt></b> switch, like this:
  168. <blockquote><b><tt>
  169. gs -h<br>
  170. gs -?
  171. </tt></b></blockquote>
  172. <p>
  173. (Of course, for "<b><tt>gs</tt></b>" use the right
  174. <a href="#Command_line">command for your system</a>.) The message shows
  175. for this executable
  176. <ul>
  177. <li>its version
  178. <li>the format of the command to invoke it
  179. <li>a few of the most useful switches
  180. <li>the formats it can interpret
  181. <li>the devices for which it can produce output
  182. <li>where it looks for font files
  183. <li>where and how to send bug reports
  184. </ul>
  185. <h2><a name="Security"></a>Security</h2>
  186. <p>
  187. Ghostscript implements a full-featured programming language, with
  188. access to the filesystem and the ability to control a diverse set of
  189. devices. As such, there are potential security implications.
  190. <p>
  191. The first line of defense is to use the security mechanisms
  192. provided by Ghostscript. If you're running arbitrary PostScript files
  193. (for example, those sent through email or downloaded from the Web),
  194. make sure to use the -dSAFER option. Otherwise, you are opening up
  195. your entire filesystem to potentially malicious code.
  196. <p>
  197. By default, Ghostscript opens up read access to the entire
  198. filesystem. In general, if you're just viewing or printing documents,
  199. this does not pose a significant security risk. However, if there is
  200. a chance that the output of Ghostscript can leak sensitive information,
  201. also set the -DPARANOIDSAFER option. Note, however, that this option
  202. is incompatible with some scripts and wrappers, including gv and
  203. related viewer apps.
  204. <p>
  205. We plan to make -dSAFER the default in future versions of Ghostscript.
  206. Since most people use Ghostscript to print and view documents, rather
  207. than to run scripts written in the PostScript language, this will
  208. provide additional safety with little hassle for most users. If you
  209. <em>are</em> using Ghostscript as a scripting language and need
  210. unfettered access to the filesystem, use the -dNOSAFER flag to signal
  211. explictly that you wish the PostScript code to have full access to the
  212. file system. Currently, this flag has no effect, but it will insure
  213. than your scripts execute as expected in future versions.
  214. <p>
  215. While we've tried to patch all known security problems, there is
  216. no guarantee that we've caught them all. Ghostscript is a complex
  217. application written in C. Buffer overflows and other exploits remain
  218. a distinct possibility. Thus we recommend that, whenever possible,
  219. Ghostscript should run in a secure "sandbox" environment, making
  220. use of the security mechanisms of the underlying operating system.
  221. In particular, we urge Linux distributors to invoke Ghostscript from
  222. the print subsystem in a chroot'ed environment, and never as root.
  223. <p>
  224. We will continue to be vigilant regarding security issues. As
  225. always, apply security updates promptly.
  226. <h2><a name="Pipe_input"></a>Input from a pipe</h2>
  227. <p>
  228. As noted above, one normally specifies input with file names on the command
  229. line. However, one can also "pipe" input into Ghostscript by using the
  230. special file name "<b><tt>-</tt></b>" or "<b><tt>-_</tt></b>", for instance
  231. <blockquote>
  232. {some program producing PS} <b><tt>| gs</tt></b> {...options...} <b><tt>-</tt></b>
  233. <br>
  234. {some program producing PS} <b><tt>| gs</tt></b> {...options...} <b><tt>-_</tt></b>
  235. </blockquote>
  236. <p>
  237. These switches differ from a named file in two respects:
  238. <ol>
  239. <li>When Ghostscript finishes reading from the pipe, it quits rather than
  240. going into interactive mode. Because of this, these switches are
  241. really only useful as the last argument on the command line.
  242. <li>These switches can't be used to pipe PDF input to Ghostscript.
  243. See "<a href="#PDF">Using Ghostscript with PDF files</a>" below.
  244. </ol>
  245. <p>
  246. The difference between "<b><tt>-</tt></b>" and "<b><tt>-_</tt></b>" is that
  247. "<b><tt>-</tt></b>" reads the input one character at a time, which is useful
  248. for programs such as GSview that generate input for Ghostscript dynamically
  249. and watch for some response, whereas "<b><tt>-_</tt></b>" reads the input in
  250. blocks, which is more efficient for ordinary (batch) execution.
  251. <h2><a name="Output_device"></a>Selecting an output device</h2>
  252. <p>
  253. Ghostscript may be built to handle multiple output devices, and it normally
  254. opens and directs output to the first one built in. Ghostscript's
  255. <b><tt>gs&nbsp;-h</tt></b> <a href="#Help_command">help message</a> lists
  256. the output devices known to the executable. Once you invoke Ghostscript
  257. you can also find out what devices are available by
  258. "<b><tt>devicenames&nbsp;==</tt></b>" at its command prompt.
  259. <p><a name="Source_code"></a>
  260. A little more information about devices appears near the beginning of the
  261. files <b><tt>devs.mak</tt></b> (for drivers that are considered "part of"
  262. Ghostscript and are maintained by the maintainers of the main Ghostscript
  263. code) and <b><tt>contrib.mak</tt></b> (for user-contributed drivers) used to
  264. build Ghostscript. (If you got Ghostscript under the Aladdin <a
  265. href="Public.htm">Free Public License</a>, the person or place from which
  266. you got it is also required to make the source code available to you; if you
  267. got it under the GNU General Public License (GPL), see the GNU <a
  268. href="http://www.gnu.org/copyleft/gpl.html">General Public License</a> for
  269. more information.)
  270. <p><a name="Device_output"></a>
  271. To use device <em>xyz</em> as the initial output device, use the
  272. command-line switch
  273. <blockquote>
  274. <b><tt>-sDEVICE=</tt></b><em>xyz</em>
  275. </blockquote>
  276. <p>
  277. Note that this switch must precede the name of the first input file, and
  278. only its first use has any effect. For example, for printer output in a
  279. configuration that includes an Epson printer driver, instead of just
  280. "<b><tt>gs&nbsp;myfile.ps</tt></b>" you might use
  281. <blockquote>
  282. <b><tt>gs -sDEVICE=epson myfile.ps</tt></b>
  283. </blockquote>
  284. <p>
  285. Alternatively, once you invoke Ghostscript and have its own command prompt
  286. you can type
  287. <blockquote><b><tt>
  288. (epson) selectdevice<br>
  289. (myfile.ps) run
  290. </tt></b></blockquote>
  291. <p>
  292. All output then goes to the Epson printer instead of the display until you
  293. do something to change devices. You can switch devices at any time by
  294. using the <b><tt>selectdevice</tt></b> procedure, for
  295. instance like one of these:
  296. <blockquote><b><tt>
  297. (vga) selectdevice<br>
  298. (epson) selectdevice
  299. </tt></b></blockquote>
  300. <p><a name="GS_DEVICE"></a>
  301. A third possibility is to define an environment variable
  302. <b><tt>GS_DEVICE</tt></b> with the name of your desired default device.
  303. The order of precedence for these alternatives, highest to lowest, is:
  304. <blockquote><table cellpadding=0 cellspacing=0>
  305. <tr> <td><b><tt>selectdevice</tt></b>
  306. <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  307. <td>Highest precedence
  308. <tr> <td>(command line)
  309. <td>&nbsp;
  310. <td>&nbsp;
  311. <tr> <td><b><tt>GS_DEVICE</tt></b>
  312. <td>&nbsp;
  313. <td>&nbsp;
  314. <tr> <td>(first device built in)
  315. <td>&nbsp;
  316. <td>Default; lowest precedence
  317. </table></blockquote>
  318. <h3><a name="Printer_resolution"></a>Printer resolution</h3>
  319. <p>
  320. Some printers can print at several different resolutions, letting you
  321. balance resolution against printing speed. To select the resolution on
  322. such a printer, use the <b><tt>-r</tt></b> switch:
  323. <blockquote>
  324. <b><tt>gs -sDEVICE=</tt></b><em>printer</em><b><tt> -r</tt></b><em>XRES</em><b><tt>x</tt></b><em>YRES</em>
  325. </blockquote>
  326. <p>
  327. For example, on Epson-compatible printers you have these choices:
  328. <blockquote><table cellpadding=0 cellspacing=0>
  329. <tr> <td><b><tt>gs -sDEVICE=epson</tt></b>
  330. <td>&nbsp;&nbsp;
  331. <td><b><tt>-r60x72</tt></b>
  332. <td>&nbsp;&nbsp;
  333. <td>9-pin
  334. <td>&nbsp;&nbsp;
  335. <td>lowest resolution
  336. <td>&nbsp;&nbsp;
  337. <td>fastest
  338. <tr> <td>&nbsp;
  339. <td>&nbsp;
  340. <td><b><tt>-r240x72</tt></b>
  341. <td>&nbsp;
  342. <td>&nbsp;
  343. <td>&nbsp;
  344. <td>highest
  345. <td>&nbsp;
  346. <td>slowest
  347. <tr> <td>&nbsp;
  348. <tr> <td>&nbsp;
  349. <td>&nbsp;
  350. <td><b><tt>-r60x60</tt></b>
  351. <td>&nbsp;
  352. <td>24-pin
  353. <td>&nbsp;
  354. <td>lowest
  355. <td>&nbsp;
  356. <td>fastest
  357. <tr> <td>&nbsp;
  358. <td>&nbsp;
  359. <td><b><tt>-r360x180</tt></b>
  360. <td>&nbsp;
  361. <td>&nbsp;
  362. <td>&nbsp;
  363. <td>highest
  364. <td>&nbsp;
  365. <td>slowest
  366. </table></blockquote>
  367. <h3><a name="File_output"></a>Output to files</h3>
  368. <p>
  369. If you select a printer as the output device, Ghostscript also allows you to
  370. control where the device sends its output. On DOS and MS Windows systems,
  371. output normally goes directly to the printer (<b><tt>PRN</tt></b>); on Unix
  372. or VMS systems normally to a temporary file for later printing. To send the
  373. output to a file, use the <b><tt>-sOutputFile=</tt></b> switch (for
  374. compatibility with older versions of Ghostscript,
  375. <b><tt>-sOUTPUTFILE=</tt></b> also works). For instance, to direct all
  376. output into the file <b><tt>ABC.xyz</tt></b>, use
  377. <blockquote><b><tt>
  378. gs -sOutputFile=ABC.xyz
  379. </tt></b></blockquote>
  380. <p>
  381. The file name follows the PostScript convention that if a name begins with
  382. <b><tt>%</tt></b>, the name must be in the form <b><tt>%</tt></b>filedevice
  383. or <b><tt>%</tt></b>filedevice<b><tt>%</tt></b>file. The legal values of
  384. filedevice are system-dependent, but the following have consistent meanings
  385. across systems:
  386. <blockquote><table cellpadding=0 cellspacing=0>
  387. <tr><th colspan=3 bgcolor="#CCCC00"><hr><font size="+1">"%{filedevice}%{file}" in <b><tt>-sOutputFile=</tt></b></font><hr>
  388. <tr valign=bottom>
  389. <th align=left>filedevice
  390. <td>&nbsp;&nbsp;&nbsp;
  391. <th align=left>Meaning
  392. <tr> <td colspan=3><hr>
  393. <tr valign=top> <td><b><tt>%os%xyz</tt></b>
  394. <td>&nbsp;
  395. <td>An ordinary file named <b><tt>xyz</tt></b>
  396. <tr valign=top> <td><b><tt>%pipe%cmd</tt></b>
  397. <td>&nbsp;
  398. <td>(if supported) A pipe to an instance of the command <b><tt>cmd</tt></b>
  399. <tr valign=top> <td><b><tt>%stdout</tt></b>
  400. <td>&nbsp;
  401. <td>The standard output file
  402. </table></blockquote>
  403. <p>
  404. Note that because of this, if you want to specify a file name that actually
  405. begins with <b><tt>%</tt></b>, you must specify the <b><tt>%os%</tt></b>
  406. filedevice explicitly: e.g., for output to a file named
  407. <b><tt>%abc</tt></b>, you need to specify
  408. <b><tt>-sOutputFile=%os%%abc</tt></b>. Note also that on DOS and MS Windows
  409. systems, the <b><tt>%</tt></b> character has a special meaning for the
  410. command processor (shell), so you will have to double it, e.g., for a pipe
  411. on MS Windows,
  412. <blockquote><b><tt>
  413. gs -sOutputFile=%%pipe%%cmd
  414. </tt></b></blockquote>
  415. <h4><a name="One_page_per_file"></a>One page per file</h4>
  416. <p>
  417. You can also tell Ghostscript to put each page of output in a separate
  418. file. To send output to a series of files each representing a single page,
  419. use in the filename the <b><tt>printf</tt></b> format specifier
  420. "<b><tt>%d</tt></b>" (or its extended form like "<b><tt>%02d</tt></b>");
  421. for instance
  422. <blockquote><table cellpadding=0 cellspacing=0>
  423. <tr><th colspan=3 bgcolor="#CCCC00"><hr><font size="+1">"%{n}d" in <b><tt>-sOutputFile=</tt></b></font><hr>
  424. <tr valign=bottom>
  425. <th align=left>Output specification
  426. <td>&nbsp;&nbsp;&nbsp;
  427. <th align=left>Produces the series of 1-page files
  428. <tr> <td colspan=3><hr>
  429. <tr valign=top> <td><b><tt>-sOutputFile=ABC%d.xyz</tt></b>
  430. <td>&nbsp;
  431. <td><b><tt>ABC1.xyz</tt></b> ... <b><tt>ABC10.xyz</tt></b> ...
  432. <tr valign=top> <td><b><tt>-sOutputFile=ABC%03d.xyz</tt></b>
  433. <td>&nbsp;
  434. <td><b><tt>ABC001.xyz</tt></b> ... <b><tt>ABC010.xyz</tt></b> ...
  435. </table></blockquote>
  436. <p>
  437. As noted above, on DOS and MS Windows systems, you will have to double the
  438. <b><tt>%</tt></b> character, e.g.,
  439. <blockquote><b><tt>
  440. gs -sOutputFile=ABC%%03d.xyz
  441. </tt></b></blockquote>
  442. <h4><a name="Pipe_output"></a>Output to a pipe</h4>
  443. <p>
  444. On Unix and (32-bit) MS Windows systems you can use this switch to send
  445. output directly to a pipe. For example, to pipe the output to
  446. <b><tt>lpr</tt></b>, use the command
  447. <blockquote><b><tt>
  448. gs -sOutputFile=\|lpr
  449. </tt></b></blockquote>
  450. or, as noted above,
  451. <blockquote><b><tt>
  452. gs -sOutputFile=%pipe%lpr
  453. </tt></b></blockquote>
  454. <p>
  455. (doubling the <b><tt>%</tt></b> characters on MS Windows systems, as noted
  456. above.) You can also send output to standard output for piping in the usual
  457. way supported by the system:
  458. <blockquote>
  459. <b><tt>gs -sOutputFile=- -q |</tt></b> ...
  460. </blockquote>
  461. or, as noted above,
  462. <blockquote>
  463. <b><tt>gs -sOutputFile=%stdout -q |</tt></b> ...
  464. </blockquote>
  465. <p>
  466. (again, doubling the <b><tt>%</tt></b> character on MS Windows systems.)
  467. In this case you must also use the <a href="#Quiet"><b><tt>-q</tt></b>
  468. switch</a> to prevent Ghostscript from writing messages to standard output
  469. which become mixed with the intended output stream.
  470. <h4><a name="Output_to_graphics"></a>Output to graphics file formats</h4>
  471. <p>
  472. File formats like PCX and PBM are also "devices". When you select a file
  473. format as the "device", you must also specify an output file, for instance
  474. <blockquote><b><tt>
  475. gs -sDEVICE=pcxmono -sOutputFile=xyz.pcx
  476. </tt></b></blockquote>
  477. <p>
  478. Here, as with printable files, you can use "<b><tt>%d</tt></b>"
  479. ("<b><tt>%%d</tt></b>" on DOS and MS Windows) to specify <a
  480. href="#One_page_per_file">one page per output file</a>.
  481. <h4><a name="Bounding_box_output"></a>Bounding box output</h4>
  482. <p>
  483. There is a special <b><tt>bbox</tt></b> "device" that just prints the
  484. bounding box of each page. You select it in the usual way:
  485. <blockquote><b><tt>
  486. gs -dNOPAUSE -dBATCH -sDEVICE=bbox
  487. </tt></b></blockquote>
  488. <p>
  489. It prints the output in a format like this:
  490. <blockquote>
  491. <pre><b><tt>%%BoundingBox: 14 37 570 719
  492. %%HiResBoundingBox: 14.308066 37.547999 569.495061 718.319158
  493. </tt></b></pre></blockquote>
  494. <p>
  495. Currently, it always prints the bounding box on <b><tt>stderr</tt></b>;
  496. eventually, it should also recognize <b><tt>-sOutputFile=</tt></b>.
  497. <p>
  498. Note that this device, like other devices, has a resolution and a (maximum)
  499. page size. As for other devices, the product (resolution x page size) is
  500. limited to approximately 500K pixels. By default, the resolution is 4000
  501. DPI and the maximum page size is approximately 125", or approximately 9000
  502. default (1/72") user coordinate units. If you need to measure larger pages
  503. than this, you must reset <em>both</em> the resolution and the page size in
  504. pixels, e.g.,
  505. <blockquote><b><tt>
  506. gs -dNOPAUSE -dBATCH -sDEVICE=bbox -r100 -g500000x500000
  507. </tt></b></blockquote>
  508. <h3><a name="Paper_size"></a>Choosing paper size</h3>
  509. <p>
  510. Ghostscript is distributed configured to use U.S. letter paper as its
  511. default page size. There are two ways to select other paper sizes from the
  512. command line:
  513. <ul>
  514. <li>
  515. If the desired paper size is listed in the section on <a
  516. href="#Known_paper_sizes">paper sizes known to Ghostscript</a> below, you
  517. can select it as the default paper size for a single invocation of
  518. Ghostscript by using the <b><tt>-sPAPERSIZE=</tt></b> switch, for instance
  519. <blockquote><b><tt>
  520. -sPAPERSIZE=a4<br>
  521. -sPAPERSIZE=legal
  522. </tt></b></blockquote>
  523. <li>
  524. Otherwise, let <em>w</em> be the desired paper width and <em>h</em> be the
  525. desired paper height, in 1/72" units. You can set the page size using the
  526. pair of switches
  527. <blockquote>
  528. <b><tt>-dDEVICEWIDTHPOINTS=</tt></b><em>w</em>
  529. <b><tt>-dDEVICEHEIGHTPOINTS=</tt></b><em>h</em>
  530. </blockquote>
  531. </ul>
  532. <p>
  533. Individual documents can (and often do) specify a paper size, which takes
  534. precedence over the default size. To force a specific paper size and
  535. ignore the paper size specified in the document, select a paper size as
  536. just described, and also include the
  537. <a href="#FIXEDMEDIA"><b><tt>-dFIXEDMEDIA</tt></b> switch</a> on the
  538. command line.
  539. <h3><a name="Change_default_size"></a>Changing the installed default paper size</h3>
  540. <p>
  541. You can change the installed default paper size in installing Ghostscript
  542. or later, by editing the initialization file <b><tt>gs_init.ps</tt></b>.
  543. Find the consecutive lines
  544. <blockquote><b><tt>
  545. %&nbsp;Optionally&nbsp;choose&nbsp;a&nbsp;default&nbsp;paper&nbsp;size&nbsp;other&nbsp;than&nbsp;U.S.&nbsp;letter.<br>
  546. %&nbsp;(a4)
  547. </tt></b></blockquote>
  548. <p>
  549. Then to make A4 the default paper size, uncomment the second line to change
  550. this to
  551. <blockquote><b><tt>
  552. %&nbsp;Optionally&nbsp;choose&nbsp;a&nbsp;default&nbsp;paper&nbsp;size&nbsp;other&nbsp;than&nbsp;U.S.&nbsp;letter.<br>
  553. (a4)
  554. </tt></b></blockquote>
  555. <p>
  556. For <b><tt>a4</tt></b> you can substitute any
  557. <a href="#Known_paper_sizes">paper size Ghostscript knows</a>.
  558. <h2><a name="Finding_files"></a>How Ghostscript finds files</h2>
  559. <p>
  560. When looking for initialization files (<b><tt>gs_*.ps</tt></b>,
  561. <b><tt>pdf_*.ps</tt></b>), font files, the <b><tt>Fontmap</tt></b> file,
  562. and files named on the command line, Ghostscript first tests whether the
  563. file name specifies an explicit directory.
  564. <blockquote><table cellpadding=0 cellspacing=0>
  565. <tr><th colspan=3 bgcolor="#CCCC00"><hr><font size="+1">Testing a file name for an explicit directory</font><hr>
  566. <tr> <th align=left>System
  567. <td>&nbsp;&nbsp;
  568. <th align=left>Does the name ...
  569. <tr> <td colspan=3><hr>
  570. <tr> <td valign=top>Unix
  571. <td>&nbsp;
  572. <td>Begin with <b><tt><u>/</u></tt></b>, <b><tt><u>./</u></tt></b> or <b><tt><u>../</u></tt></b> ?
  573. <tr> <td valign=top>DOS or MS Windows
  574. <td>&nbsp;
  575. <td>Have <b><tt><u>:</u></tt></b> as its second character, or
  576. begin with <b><tt><u>/</u></tt></b>, <b><tt><u>\</u></tt></b>,
  577. <b><tt><u>./</u></tt></b>, <b><tt><u>../</u></tt></b>, <b><tt><u>.\</u></tt></b>, or <b><tt><u>..\</u></tt></b> ?
  578. <tr> <td valign=top>VMS
  579. <td>&nbsp;
  580. <td>Contain a node, device, root, or directory specification?
  581. </table></blockquote>
  582. <p><a name="General_search_path"></a> If the test succeeds, the file name
  583. specifies an explicit directory and Ghostscript tries to open the file
  584. using the name given. Otherwise it tries directories in this order:
  585. <ol>
  586. <li>The current directory (unless disabled by the
  587. <a href="#P-_switch"><b><tt>-P-</tt></b> switch</a>);
  588. <li>The directories specified by <a href="#I_switch"><b><tt>-I</tt></b>
  589. switches</a> in the command line, if any;
  590. <li>The directories specified by the <b><tt>GS_LIB</tt></b>
  591. environment variable, if any;
  592. <li>The directories specified by the
  593. <b><tt>GS_LIB_DEFAULT</tt></b> macro (if any) in the makefile
  594. when this executable was built.
  595. </ol>
  596. <p>
  597. <b><tt>GS_LIB_DEFAULT</tt></b>,
  598. <b><tt>GS_LIB</tt></b>, and the
  599. <b><tt>-I</tt></b> parameter may specify either a single
  600. directory or a list of directories separated by a character appropriate for
  601. the operating system ("<b><tt>:</tt></b>" on Unix systems,
  602. "<b><tt>,</tt></b>" on VMS systems, and
  603. "<b><tt>;</tt></b>" on DOS systems). We think that trying
  604. the current directory first is a very bad idea -- it opens serious security
  605. loopholes and can lead to very confusing errors if one has more than one
  606. version of Ghostscript in one's environment -- but when we attempted to
  607. change it, users insisted that we change it back. You can disable looking
  608. in the current directory first by using the
  609. <a href="#P_switch"><b><tt>-P-</tt></b> switch</a>.
  610. <p>
  611. Note that Ghostscript does not use this file searching algorithm for the
  612. <b><tt>run</tt></b> or <b><tt>file</tt></b>
  613. operators: for these operators, it simply opens the file with the name
  614. given. To run a file using the searching algorithm, use
  615. <b><tt>runlibfile</tt></b> instead of
  616. <b><tt>run</tt></b>.
  617. <h3><a name="PS_resources"></a>Finding PostScript Level 2 resources</h3>
  618. <p>
  619. Ghostscript uses a completely different rule for looking for files
  620. containing PostScript Level 2 "resources": per the Adobe documentation, it
  621. concatenates together
  622. <ol>
  623. <li>the value of the system parameter
  624. <b><tt>GenericResourceDir</tt></b> (initially
  625. <b><tt>/Resource/</tt></b>)
  626. <li>the name of the resource category (for instance, <b><tt>ProcSet</tt></b>)
  627. <li>the value of the system parameter
  628. <b><tt>GenericResourcePathSep</tt></b> (initially
  629. "<b><tt>/</tt></b>")
  630. <li>the name of the resource instance (for instance, <b><tt>CIDInit</tt></b>)
  631. </ol>
  632. <p>
  633. To look up fonts, after exhausting the search method described in <a href="#Font_lookup">the
  634. next section</a>, it concatenates together
  635. <ol>
  636. <li>the value of the system parameter
  637. <b><tt>FontResourceDir</tt></b> (initially
  638. <b><tt>/Resource/Font/</tt></b>)
  639. <li>the name of the resource font (for instance, <b><tt>Times-Roman</tt></b>)
  640. </ol>
  641. <p>
  642. Note that even though the system parameters are named "somethingDir", they
  643. are not just plain directory names: they have "<b><tt>/</tt></b>" on the
  644. end, so that they can be concatenated with the category name or font name.
  645. <h3><a name="Font_lookup"></a>Font lookup</h3>
  646. <p>
  647. Ghostscript has a slightly different way to find the file containing a font
  648. with a given name. This rule uses not only the search path defined by
  649. <b><tt>-I</tt></b>, <b><tt>GS_LIB</tt></b>, and
  650. <b><tt>GS_LIB_DEFAULT</tt></b> <a href="#General_search_path">as described
  651. above</a>, but also the directory that is the value of the
  652. <b><tt>FontResourceDir</tt></b> system parameter, and an additional list of
  653. directories that is the value of the <b><tt>GS_FONTPATH</tt></b> environment
  654. variable (or the value provided with the <b><tt>-sFONTPATH=</tt></b> switch,
  655. if present).
  656. <p>
  657. At startup time, Ghostscript reads in the <b><tt>Fontmap</tt></b> files in
  658. every directory on the search path (or in the list provided with the
  659. <b><tt>-sFONTMAP=</tt></b> switch, if present): these files are catalogs of
  660. fonts and the files that contain them. (See <a href="Fonts.htm#Fontmap">the
  661. documentation of fonts</a> for details.) Then, when Ghostscript needs to
  662. find a font that isn't already loaded into memory, it goes through a series
  663. of steps.
  664. <ul>
  665. <li>
  666. First, it looks up the font name in the combined Fontmaps. If there is an
  667. entry for the desired font name, and the file named in the entry can be
  668. found in some directory on the general search path (defined by
  669. <b><tt>-I</tt></b>, <b><tt>GS_LIB</tt></b>, and
  670. <b><tt>GS_LIB_DEFAULT</tt></b>), and the file is loaded successfully, and
  671. loading it defines a font of the desired name, that is the end of the
  672. process.
  673. <li>
  674. If this process fails at any step, Ghostscript looks for a file whose name
  675. is the concatenation of the value of the <b><tt>FontResourceDir</tt></b>
  676. system parameter and the font name, with no extension. If such a file
  677. exists, can be loaded, and defines a font of the desired name, that again is
  678. the end. The value of <b><tt>FontResourceDir</tt></b> is normally the
  679. string <b><tt>/Resource/Font/</tt></b>, but it can be changed with the
  680. <b><tt>setsystemparams</tt></b> operator: see the PostScript Language
  681. Reference Manual for details.
  682. <li>
  683. If that fails, Ghostscript then looks for a file on the general search path
  684. whose name is the desired font name, with no extension. If such a file
  685. exists, can be loaded, and defines a font of the desired name, that again is
  686. the end.
  687. <li>
  688. If that too fails, Ghostscript looks at the <b><tt>GS_FONTPATH</tt></b>
  689. environment variable (or the value provided with the
  690. <b><tt>-sFONTPATH=</tt></b> switch, if present), which is also a list of
  691. directories. It goes to the first directory on the list, looking for all
  692. files that appear to contain PostScript fonts; it then adds all those files
  693. and fonts to the combined Fontmaps, and starts over.
  694. <li>
  695. If scanning the first FONTPATH directory doesn't produce a file that
  696. provides the desired font, it adds the next directory on the FONTPATH list,
  697. and so on until either the font is defined successfully or the list is
  698. exhausted.
  699. <li>
  700. Finally, if all else fails, it will try to find a substitute for the font
  701. from among the standard 35 fonts.
  702. </ul>
  703. <blockquote><table cellpadding=0 cellspacing=0>
  704. <tr><th colspan=3 bgcolor="#CCCC00"><hr><font size="+1">Differences between search path and font path</font><hr>
  705. <tr> <th>Search path
  706. <td>&nbsp;&nbsp;&nbsp;
  707. <th>Font path
  708. <tr> <td colspan=3><hr>
  709. <tr> <td><b><tt>-I</tt></b> switch
  710. <td>&nbsp;
  711. <td><b><tt>-sFONTPATH=</tt></b> switch
  712. <tr> <td>&nbsp;
  713. <tr> <td><b><tt>GS_LIB</tt></b> and <b><tt>GS_LIB_DEFAULT</tt></b>
  714. environment variables
  715. <td>&nbsp;
  716. <td><b><tt>GS_FONTPATH</tt></b> environment variable
  717. <tr> <td>&nbsp;
  718. <tr> <td valign=top>Consulted first
  719. <td>&nbsp;
  720. <td valign=top>Consulted only if search path and
  721. <b><tt>FontResourceDir</tt></b> don't provide the file.
  722. <tr> <td>&nbsp;
  723. <tr> <td valign=top>Font-name-to-file-name mapping given in Fontmap
  724. files; aliases are possible, and there need not be any relation
  725. between the font name in the Fontmap and the
  726. <b><tt>FontName</tt></b> in the file.
  727. <td>&nbsp; <td valign=top>Font-name-to-file-name mapping is
  728. implicit -- the <b><tt>FontName</tt></b> in the file is
  729. used. Aliases are not possible.
  730. <tr> <td>&nbsp;
  731. <tr> <td valign=top>Only fonts and files named in Fontmap are used.
  732. <td>&nbsp;
  733. <td valign=top>Every Type 1 font file in each directory is
  734. available; if TrueType fonts are supported (the
  735. <b><tt>ttfont.dev</tt></b> feature was included when the
  736. executable was built), they are also available.
  737. </table></blockquote>
  738. <p>
  739. If you are using one of the following types of computer, you may wish to
  740. set the environment variable <b><tt>GS_FONTPATH</tt></b> to
  741. the value indicated so that Ghostscript will automatically acquire all the
  742. installed Type 1 (and, if supported, TrueType) fonts (but see below for
  743. notes on systems marked with "*"):
  744. <blockquote><table cellpadding=0 cellspacing=0>
  745. <tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">Suggested <b><tt>GS_FONTPATH</tt></b> for different systems</font><hr>
  746. <tr> <td>&nbsp;
  747. <td>&nbsp;&nbsp;
  748. <th align=left>System type
  749. <td>&nbsp;&nbsp;
  750. <th valign=bottom align=left><b><tt>GS_FONTPATH</tt></b>
  751. <tr> <td colspan=5><hr>
  752. <tr> <td>&nbsp;
  753. <td>&nbsp;
  754. <td valign=top>Digital Unix
  755. <td>&nbsp;
  756. <td><b><tt>/usr/lib/X11/fonts/Type1Adobe</tt></b>
  757. <tr> <td>&nbsp;
  758. <td>&nbsp;
  759. <td valign=top>Ultrix
  760. <td>&nbsp;
  761. <td><b><tt>/usr/lib/DPS/outline/decwin</tt></b>
  762. <tr> <td>&nbsp;
  763. <td>&nbsp;
  764. <td valign=top>HP-UX 9
  765. <td>&nbsp;
  766. <td><b><tt>/usr/lib/X11/fonts/type1.st/typefaces</tt></b>
  767. <tr> <td>&nbsp;
  768. <td>&nbsp;
  769. <td valign=top>IBM AIX
  770. <td>&nbsp;
  771. <td><b><tt>/usr/lpp/DPS/fonts/outlines
  772. <br>/usr/lpp/X11/lib/X11/fonts/Type1
  773. <br>/usr/lpp/X11/lib/X11/fonts/Type1/DPS</tt></b>
  774. <tr> <td>&nbsp;
  775. <td>&nbsp;
  776. <td valign=top>NeXT
  777. <td>&nbsp;
  778. <td><b><tt>/NextLibrary/Fonts/outline</tt></b>
  779. <tr> <td>*
  780. <td>&nbsp;
  781. <td valign=top>SGI IRIX
  782. <td>&nbsp;
  783. <td><b><tt>/usr/lib/DPS/outline/base
  784. <br>/usr/lib/X11/fonts/Type1</tt></b>
  785. <tr> <td>&nbsp;
  786. <td>&nbsp;
  787. <td valign=top>SunOS 4.x<br>(NeWSprint only)
  788. <td>&nbsp;
  789. <td valign=top><b><tt>newsprint_2.5/SUNWsteNP/reloc/$BASEDIR/NeWSprint/<br>&nbsp;&nbsp;&nbsp;&nbsp;small_openwin/lib/fonts</tt></b>
  790. <tr> <td>**
  791. <td>&nbsp;
  792. <td valign=top>SunOS 4.x
  793. <td>&nbsp;
  794. <td><b><tt>/usr/openwin/lib/X11/fonts/Type1/outline</tt></b>
  795. <tr> <td>**
  796. <td>&nbsp;
  797. <td valign=top>Solaris 2.x
  798. <td>&nbsp;
  799. <td><b><tt>/usr/openwin/lib/X11/fonts/Type1/outline</tt></b>
  800. <tr> <td>&nbsp;
  801. <td>&nbsp;
  802. <td valign=top>VMS
  803. <td>&nbsp;
  804. <td><b><tt>SYS$COMMON:[SYSFONT.XDPS.OUTLINE]</tt></b>
  805. </table>
  806. <hr align=left width="25%">
  807. <p>
  808. <b>*</b> On SGI IRIX systems, you must use <b><tt>Fontmap.SGI</tt></b> in
  809. place of <b><tt>Fontmap</tt></b> or <b><tt>Fontmap.GS</tt></b>, because
  810. otherwise the entries in <b><tt>Fontmap</tt></b> will take precedence over
  811. the fonts in the FONTPATH directories.
  812. <p>
  813. <b>**</b> On Solaris systems simply setting <b><tt>GS_FONTPATH</tt></b> or
  814. using <b><tt>-sFONTPATH=</tt></b> may not work, because for some reason some
  815. versions of Ghostscript can't seem to find any of the Type1 fonts in
  816. <b><tt>/usr/openwin/lib/X11/fonts/Type1/outline</tt></b>. (It says: "15
  817. files, 15 scanned, 0 new fonts". We think this problem has been fixed in
  818. Ghostscript version 6.0, but we aren't sure because we've never been able to
  819. reproduce it.) See <b><tt>Fontmap.Sol</tt></b> instead. Also, on Solaris
  820. 2.x it's probably not worth your while to add Sun's fonts to your font path
  821. and Fontmap. The fonts Sun distributes on Solaris 2.x in the directories
  822. <blockquote><b><tt>
  823. /usr/openwin/lib/X11/fonts/Type1<br>
  824. /usr/openwin/lib/X11/fonts/Type1/outline
  825. </tt></b></blockquote>
  826. <p>
  827. are already represented among the ones distributed as part of Ghostscript;
  828. and on some test files, Sun's fonts have been shown to cause incorrect
  829. displays with Ghostscript.
  830. </blockquote>
  831. <p>
  832. These paths may not be exactly right for your installation; if the indicated
  833. directory doesn't contain files whose names are familiar font names like
  834. Courier and Helvetica, you may wish to ask your system administrator where
  835. to find these fonts.
  836. <p>
  837. Adobe Acrobat comes with a set of fourteen Type 1 fonts, on Unix typically
  838. in a directory called ...<b><tt>/Acrobat3/Fonts</tt></b>. There is no
  839. particular reason to use these instead of the corresponding fonts in the
  840. Ghostscript distribution (which are of just as good quality), except to save
  841. about a megabyte of disk space, but the installation documentation explains
  842. how to do it <a href="Install.htm#Use_Acrobat_fonts_Unix">on Unix</a> and <a
  843. href="Install.htm#Use_platform_fonts_DOS">on DOS</a> (where you can also use
  844. Adobe Type Manager fonts).
  845. <h3><a name="Temp_files"></a>Temporary files</h3>
  846. <blockquote><table cellpadding=0 cellspacing=0>
  847. <tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">Where Ghostscript puts temporary files</font><hr>
  848. <tr valign=bottom>
  849. <th align=left>Platform
  850. <td>&nbsp;&nbsp;&nbsp;
  851. <th align=left>Filename
  852. <td>&nbsp;&nbsp;&nbsp;
  853. <th align=left>Location
  854. <tr> <td colspan=5><hr>
  855. <tr valign=top> <td>DOS and OpenVMS
  856. <td>&nbsp;
  857. <td><b><tt>_temp_</tt></b>XX.XXX
  858. <td>&nbsp;
  859. <td>Current directory
  860. <tr valign=top> <td>OS/2
  861. <td>&nbsp;
  862. <td><b><tt>gs</tt></b>XXXXXX
  863. <td>&nbsp;
  864. <td>Current directory
  865. <tr valign=top> <td>Unix
  866. <td>&nbsp;
  867. <td><b><tt>gs_</tt></b>XXXXX
  868. <td>&nbsp;
  869. <td><b><tt>/tmp</tt></b>
  870. </table></blockquote>
  871. <p>
  872. You can change in which directory Ghostscript creates temporary files by
  873. setting the <b><tt>TMPDIR</tt></b> or <b><tt>TEMP</tt></b> environment
  874. variable to the name of the directory you want used. Ghostscript currently
  875. doesn't do a very good job of deleting temporary files if it exits because
  876. of an error; you may have to delete them manually from time to time.
  877. <dl>
  878. <dt><b><tt>GS</tt></b>, <b><tt>GSC</tt></b> (MS Windows only)
  879. <dd>Specify the names of the Ghostscript executables. <b><tt>GS</tt></b>
  880. brings up a new typein window and possibly a graphics window;
  881. <b><tt>GSC</tt></b> uses the DOS console. If these are not set,
  882. <b><tt>GS</tt></b> defaults to <b><tt>gswin32</tt></b>, and
  883. <b><tt>GSC</tt></b> defaults to <b><tt>gswin32c</tt></b>.
  884. </dl>
  885. <dl>
  886. <dt><a href="#GS_DEVICE"><b><tt>GS_DEVICE</tt></b></a>
  887. <dd>Defines the default output device.
  888. </dl>
  889. <dl>
  890. <dt><a href="#Font_lookup"><b><tt>GS_FONTPATH</tt></b></a>
  891. <dd>Specifies a list of directories to scan for fonts if a font requested
  892. can't be found anywhere on the search path.
  893. </dl>
  894. <dl>
  895. <dt><a href="#Finding_files"><b><tt>GS_LIB</tt></b></a>
  896. <dd>Provides a search path for initialization files and fonts.
  897. </dl>
  898. <dl>
  899. <dt><b><tt>GS_OPTIONS</tt></b>
  900. <dd>Defines a list of command-line arguments to be processed before the
  901. ones actually specified on the command line. For example, setting
  902. <b><tt>GS_DEVICE</tt></b> to XYZ is equivalent to setting
  903. <b><tt>GS_OPTIONS</tt></b> to <b><tt>-sDEVICE=XYZ</tt></b>. The contents
  904. of <b><tt>GS_OPTIONS</tt></b> are not limited to switches; they may include
  905. actual file names or even <a href="#Input_control">"@file" arguments</a>.
  906. </dl>
  907. <dl>
  908. <dt><a href="#Temp_files"><b><tt>TEMP</tt></b>, <b><tt>TMPDIR</tt></b></a>
  909. <dd>Defines a directory name for temporary files. If both
  910. <b><tt>TEMP</tt></b> and <b><tt>TMPDIR</tt></b> are defined,
  911. <b><tt>TMPDIR</tt></b> takes precedence.
  912. </dl>
  913. <hr>
  914. <h2><a name="PDF"></a>Using Ghostscript with PDF files</h2>
  915. <p>
  916. Ghostscript is normally built (except on 16-bit DOS platforms) to interpret
  917. both PostScript and PDF files, examining each file to determine
  918. automatically whether its contents are PDF or PostScript. All the normal
  919. switches and procedures for interpreting PostScript files also apply to PDF
  920. files, with a few exceptions. In addition, the
  921. <b><tt>pdf2ps</tt></b> utility uses Ghostscript to convert
  922. PDF to (Level 2) PostScript.
  923. <h3><a name="PDF_stdin"></a>PDF files from standard input</h3>
  924. <p>
  925. Using the <a href="#Pipe_input">"<b><tt>-</tt></b>" or "<b><tt>-_</tt></b>"
  926. switch</a> you can provide PDF input from a file, but not from a pipe,
  927. because the PDF language, unlike the PostScript language, inherently
  928. requires random access to the file, while a pipe is always sequential. That
  929. is,
  930. <blockquote><table cellpadding=0 cellspacing=0>
  931. <tr> <td><b><tt>gs -_ &lt; somefile.pdf</tt></b>
  932. <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  933. <td>(<b><em>is</em></b> permissible)
  934. <tr> <td>{some program producing PDF} <b><tt>| gs -_</tt></b>
  935. <td>&nbsp;
  936. <td>(is <b><em>not</em></b> permissible)
  937. </table></blockquote>
  938. <h3><a name="PDF_switches"></a>Switches for PDF files</h3>
  939. <dl>
  940. <dt><b><tt>-dFirstPage=</tt></b><em>pagenumber</em>
  941. <dd>Begins interpreting on the designated page of the document.
  942. </dl>
  943. <dl>
  944. <dt><b><tt>-dLastPage=</tt></b><em>pagenumber</em>
  945. <dd>Stops interpreting after the designated page of the document.
  946. </dl>
  947. <dl>
  948. <dt><b><tt>-dPrinted</tt></b>
  949. <dt><b><tt>-dPrinted=false</tt></b>
  950. <dd>Determines whether the file should be displayed or printed using the
  951. "screen" or "printer" options for annotations and images. With
  952. <b><tt>-dPrinted</tt></b>, the output will use the file's "print"
  953. options; with <b><tt>-dPrinted=false</tt></b>, the output will use the
  954. file's "screen" options. If neither of these is specified, the output will
  955. use the screen options for any output device that doesn't have an
  956. <b><tt>OutputFile</tt></b> parameter, and the printer options for
  957. devices that do have this parameter.
  958. </dl>
  959. <dl>
  960. <dt><b><tt>-sPDFPassword=</tt></b><em>password</em>
  961. <dd>Sets the user or owner password to be used in decoding encrypted
  962. PDF files.
  963. </dl>
  964. <h3><a name="PDF_problems"></a>Problems interpreting a PDF file</h3>
  965. <p>
  966. Occasionally you may try to read or print a <b><tt>*.pdf</tt></b> file that
  967. Ghostscript doesn't recognize as PDF, even though the same file
  968. <b><em>can</em></b> be opened and interpreted by an Adobe Acrobat viewer.
  969. This can happen when, for instance, a PDF file produced on a Macintosh is
  970. carelessly moved to another kind of system, leaving now-useless
  971. Macintosh-specific data before the standard header. Ghostscript can't read
  972. these files because they don't conform to the PDF standard, Adobe's <a
  973. href="http://partners.adobe.com/asn/developer/acrosdk/docs/PDFRef.pdf"
  974. class="offsite"><cite>Portable
  975. Document Format Reference Manual</cite></a>, version 1.2, which states:
  976. <blockquote>
  977. The first line of a PDF file specifies the version number of the PDF
  978. specification to which the file adheres.... [T]he first line of a
  979. 1.2-conforming PDF file should be <b><tt>%PDF-1.2</tt></b>.
  980. </blockquote>
  981. <p>
  982. However, in an appendix the manual also says that Adobe
  983. <blockquote>
  984. Acrobat viewers are very liberal in their check for a valid PDF header.
  985. All viewers allow the header to appear anywhere in the first 1,000 bytes of
  986. the file.
  987. </blockquote>
  988. <p>
  989. Ghostscript doesn't do this: it expects PDF files to conform to the
  990. standard, because that's how it recognizes them among other formats it
  991. handles, unlike Acrobat viewers which need deal only with PDF and can
  992. therefore afford to be more liberal with PDF. So if you encounter a file
  993. with useless characters before the header and you want to use it with
  994. Ghostscript, you can fix it by stripping the extra characters from before
  995. the standard header. The file should begin with exactly the characters
  996. <blockquote><b><tt>
  997. %PDF
  998. </tt></b></blockquote>
  999. <p>
  1000. PDF files are binary, not text, so be careful to edit the file as a binary,
  1001. not as text. On Unix, after determining the length of the useless prefix
  1002. string, which you can do with <b><tt>od</tt></b>, you can use
  1003. <b><tt>tail</tt></b> to strip them off. For instance:
  1004. <blockquote>
  1005. <b><tt>od -c Macintosh.pdf | more</tt></b> ;# <em>shows that <b><tt>%PDF</tt></b> occurs after 128 characters</em><br>
  1006. <b><tt>tail +128c Macintosh.pdf &gt;Legal.pdf</tt></b>
  1007. </blockquote>
  1008. <p>
  1009. On PCs and other systems you can use the <b><tt>hexl</tt></b> program
  1010. distributed with GNU emacs to convert the PDF file to editable text form.
  1011. After editing, <b><tt>hexl</tt></b> can convert the text form back to
  1012. binary.
  1013. <hr>
  1014. <h2><a name="Platforms"></a>Notes on specific platforms</h2>
  1015. <h3><a name="Unix"></a>Unix</h3>
  1016. <p>
  1017. The Ghostscript distribution includes some Unix shell scripts to use with
  1018. Ghostscript in different environments. These are all user-contributed
  1019. code, so if you have questions, please contact the user identified in the
  1020. file, not Aladdin Enterprises or artofcode LLC.
  1021. <dl>
  1022. <dt><b><tt>pv.sh</tt></b>
  1023. <dd>Preview a specified page of a <b><tt>dvi</tt></b> file in an X window
  1024. </dl>
  1025. <dl>
  1026. <dt><b><tt>sysvlp.sh</tt></b>
  1027. <dd>System V 3.2 lp interface for parallel printer
  1028. </dl>
  1029. <dl>
  1030. <dt><b><tt>pj-gs.sh</tt></b>
  1031. <dd>Printing on an H-P PaintJet under HP-UX
  1032. </dl>
  1033. <dl>
  1034. <dt><b><tt>unix-lpr.sh</tt></b>
  1035. <dd>Queue filter for <b><tt>lpr</tt></b> under Unix;
  1036. <a href="Unix-lpr.htm">its documentation</a> is intended for system
  1037. administrators
  1038. </dl>
  1039. <dl>
  1040. <dt><b><tt>lprsetup.sh</tt></b>
  1041. <dd>Setup for <b><tt>unix-lpr.sh</tt></b>
  1042. </dl>
  1043. <hr>
  1044. <h3><a name="VMS"></a>VMS</h3>
  1045. <ul>
  1046. <li>To be able to specify switches and file names when invoking the
  1047. interpreter, define <b><tt>gs</tt></b> as a foreign command:
  1048. <blockquote>
  1049. <b><tt>$ gs == "$</tt></b><em>disk</em><b><tt>:[</tt></b><em>directory</em><b><tt>]gs.exe</tt></b>"
  1050. </blockquote>
  1051. <p>
  1052. where the "<em>disk</em>" and "<em>directory</em>" specify where
  1053. the Ghostscript executable is located. For instance,
  1054. <blockquote><b><tt>
  1055. $ gs == "$dua1:[ghostscript]gs.exe"
  1056. </tt></b></blockquote>
  1057. <li>On VMS systems, the last character of each "directory" name indicates
  1058. what sort of entity the "directory" refers to. If the "directory" name
  1059. ends with a colon "<b><tt>:</tt></b>", it is taken to refer to a logical
  1060. device, for instance
  1061. <blockquote><b><tt>
  1062. $ define ghostscript_device dua1:[ghostscript_510]<br>
  1063. $ define gs_lib ghostscript_device:
  1064. </tt></b></blockquote>
  1065. <p>
  1066. If the "directory" name ends with a closing square bracket
  1067. "<b><tt>]</tt></b>", it is taken to refer to a real directory, for instance
  1068. <blockquote><b><tt>
  1069. $ define gs_lib dua1:[ghostscript]
  1070. </tt></b></blockquote>
  1071. <li>Defining the logical <b><tt>GS_LIB</tt></b>
  1072. <blockquote>
  1073. <b><tt>$ define gs_lib</tt></b> <em>disk</em><b><tt>:[</tt></b><em>directory</em><b><tt>]</tt></b>
  1074. </blockquote>
  1075. <p>
  1076. allows Ghostscript to find its initialization files in the Ghostscript
  1077. directory even if that's not where the executable resides.<br>&nbsp;
  1078. <li>Although VMS DCL itself converts unquoted parameters to upper case, C
  1079. programs such as Ghostscript receive their parameters through the C runtime
  1080. library, which forces all unquoted command-line parameters to lower case.
  1081. That is, with the command
  1082. <blockquote><b><tt>
  1083. $ gs -Isys$login:
  1084. </tt></b></blockquote>
  1085. <p>
  1086. Ghostscript sees the switch as <b><tt>-isys$login</tt></b>,
  1087. which doesn't work. To preserve the case of switches, quote them like
  1088. this:
  1089. <blockquote><b><tt>
  1090. $ gs "-Isys$login:"
  1091. </tt></b></blockquote>
  1092. <li>If you write printer output to a file with
  1093. <b><tt>-sOutputFile=</tt></b> and then want to print the file later, use
  1094. "<b><tt>PRINT/PASSALL</tt></b>".
  1095. </ul>
  1096. <ul>
  1097. <li>PDF files (or PostScript files that use the
  1098. <b><tt>setfileposition</tt></b> operator) must be "stream LF" type files to
  1099. work properly on VMS systems. (<b><em>Note:</em></b> This definitely matters
  1100. if Ghostscript was compiled with DEC C; we are not sure of the situation if
  1101. you use <b><tt>gcc</tt></b>.) Because of this, if you transfer files by
  1102. FTP, you probably need to do one of these two things after the transfer:
  1103. <ol>
  1104. <li>If the FTP transfer was in text (ASCII) mode:
  1105. <blockquote>
  1106. <b><tt>$ convert/fdl=streamlf.fdl</tt></b> input-file output-file
  1107. </blockquote>
  1108. <p>
  1109. where the contents of the file <b><tt>STREAMLF.FDL</tt></b> are
  1110. <blockquote>
  1111. <pre>FILE
  1112. ORGANIZATION sequential
  1113. RECORD
  1114. BLOCK_SPAN yes
  1115. CARRIAGE_CONTROL carriage_return
  1116. FORMAT stream_lf
  1117. </pre></blockquote>
  1118. <li>If the FTP transfer was in binary mode:
  1119. <blockquote><b><tt>
  1120. $ set file/attribute=(rfm:stmlf)
  1121. </tt></b></blockquote>
  1122. </ol>
  1123. </ul>
  1124. <h4><a name="VMS_X_Windows"></a>Using X Windows on VMS</h4>
  1125. <p>
  1126. If you are using on an X Windows display, you can set it up with the node
  1127. name and network transport, for instance
  1128. <blockquote><b><tt>
  1129. $ set display/create/node="doof.city.com"/transport=tcpip
  1130. </tt></b></blockquote>
  1131. <p>
  1132. and then run Ghostscript by typing <b><tt>gs</tt></b> at the command line.
  1133. <hr>
  1134. <h3><a name="MS_Windows"></a>MS Windows</h3>
  1135. <p>
  1136. You must add <em>gs\</em><b><tt>bin</tt></b> and
  1137. <em>gs\</em><b><tt>lib</tt></b> to the <b><tt>PATH</tt></b>, where
  1138. <em>gs</em> is the top-level Ghostscript directory.
  1139. <hr>
  1140. <h3><a name="MS-DOS"></a>MS-DOS</h3>
  1141. <p>
  1142. You must add <em>gs\</em><b><tt>bin</tt></b> and
  1143. <em>gs\</em><b><tt>lib</tt></b> to the <b><tt>PATH</tt></b>, where
  1144. <em>gs</em> is the top-level Ghostscript directory.
  1145. <ul>
  1146. <li>
  1147. Ghostscript supports many SuperVGA displays directly, most of them with
  1148. more than 16 colors. The complete list is in the file
  1149. <b><tt>devs.mak</tt></b>, part of Ghostscript's
  1150. <a href="#Source_code">source code</a>.
  1151. <li>
  1152. Some applications, such as Microsoft Word, require a prologue in front of
  1153. the PostScript files they produce. In the case of MS Word, this prologue
  1154. is one of the *.ini files Microsoft includes with Word. Other applications
  1155. may require other prologues. You may specify a prologue on the Ghostscript
  1156. command line, for instance
  1157. <blockquote><b><tt>
  1158. gs386 prologue.ini myfile.ps
  1159. </tt></b></blockquote>
  1160. <li>
  1161. If you have a SuperVGA display that supports a 16-color mode with 800x600
  1162. pixels and you know the display mode number for this mode, you can select
  1163. it by using the command line switches
  1164. <blockquote>
  1165. <b><tt>-sDEVICE=svga16 -dDisplayMode=</tt></b><em>NNN</em>
  1166. </blockquote>
  1167. <p>
  1168. where <em>NNN</em> is the display mode number in decimal. Here are modes
  1169. for some popular display chipsets; the ones that use the default value are
  1170. marked "*". If your card's chipset doesn't appear on this list, or if you
  1171. try the value here and it doesn't work, please send the name of the chipset
  1172. and its correct display mode to &lt;<a href="mailto:bug-gs@aladdin.com">bug-gs@aladdin.com</a>&gt; to include in
  1173. future releases.
  1174. <blockquote><table cellpadding=0 cellspacing=0>
  1175. <tr><th colspan=6 bgcolor="#CCCC00"><hr><font size="+1">Display modes for PC display chipsets</font><hr>
  1176. <tr> <td>&nbsp;
  1177. <th>Chipset
  1178. <td>&nbsp;
  1179. <th>Decimal
  1180. <td>&nbsp;
  1181. <th>Hex
  1182. <tr> <td colspan=6><hr>
  1183. <tr> <td>&nbsp;
  1184. <td>Acumos AVGA2, AVGA3
  1185. <td>&nbsp;
  1186. <td align=center>88
  1187. <td>&nbsp;
  1188. <td align=right><tt>0x58</tt>
  1189. <tr> <td>&nbsp;
  1190. <td>Advance Logic AL2101
  1191. <td>&nbsp;
  1192. <td align=center>43
  1193. <td>&nbsp;
  1194. <td align=right><tt>0x2B</tt>
  1195. <tr> <td>&nbsp;
  1196. <td>Ahead V5000
  1197. <td>&nbsp;
  1198. <td align=center>113
  1199. <td>&nbsp;
  1200. <td align=right><tt>0x71</tt>
  1201. <tr> <td>&nbsp;
  1202. <td>ATI VGAWONDER, Graphics Ultra etc.
  1203. <td>&nbsp;
  1204. <td align=center>84
  1205. <td>&nbsp;
  1206. <td align=right><tt>0x54</tt>
  1207. <tr> <td>&nbsp;
  1208. <td>Chips and Technologies
  1209. <td>&nbsp;
  1210. <td align=center>106
  1211. <td>&nbsp;
  1212. <td align=right><tt>0x6A</tt>
  1213. <tr> <td>&nbsp;
  1214. <td>Cirrus Logic CL-GD 500/600
  1215. <td>&nbsp;
  1216. <td align=center>100
  1217. <td>&nbsp;
  1218. <td align=right><tt>0x64</tt>
  1219. <tr> <td>&nbsp;
  1220. <td>Cirrus Logic GD 5422
  1221. <td>&nbsp;
  1222. <td align=center>88
  1223. <td>&nbsp;
  1224. <td align=right><tt>0x58</tt>
  1225. <tr> <td>&nbsp;
  1226. <td>Compaq VGA
  1227. <td>&nbsp;
  1228. <td align=center>89
  1229. <td>&nbsp;
  1230. <td align=right><tt>0x59</tt>
  1231. <tr> <td>&nbsp;
  1232. <td>CTI
  1233. <td>&nbsp;
  1234. <td align=center>106
  1235. <td>&nbsp;
  1236. <td align=right><tt>0x6A</tt>
  1237. <tr> <td>*
  1238. <td>Genoa 5xxx, Sigma VGA
  1239. <td>&nbsp;
  1240. <td align=center>41
  1241. <td>&nbsp;
  1242. <td align=right><tt>0x29</tt>
  1243. <tr> <td>&nbsp;
  1244. <td>Genoa 6xxx
  1245. <td>&nbsp;
  1246. <td align=center>106
  1247. <td>&nbsp;
  1248. <td align=right><tt>0x6A</tt>
  1249. <tr> <td>&nbsp;
  1250. <td>MXIC MX 68010
  1251. <td>&nbsp;
  1252. <td align=center>85
  1253. <td>&nbsp;
  1254. <td align=right><tt>0x55</tt>
  1255. <tr> <td>&nbsp;
  1256. <td>NCR 77C22
  1257. <td>&nbsp;
  1258. <td align=center>88
  1259. <td>&nbsp;
  1260. <td align=right><tt>0x58</tt>
  1261. <tr> <td>&nbsp;
  1262. <td>OAK Technologies OTI-067, OTI-077, OTI037C
  1263. <td>&nbsp;
  1264. <td align=center>82
  1265. <td>&nbsp;
  1266. <td align=right><tt>0x52</tt>
  1267. <tr> <td>&nbsp;
  1268. <td>OAK Technologies OTI037C w/ NEL BIOS
  1269. <td>&nbsp;
  1270. <td align=center>91
  1271. <td>&nbsp;
  1272. <td align=right><tt>0x5B</tt>
  1273. <tr> <td>*
  1274. <td>Orchid Prodesigner
  1275. <td>&nbsp;
  1276. <td align=center>41
  1277. <td>&nbsp;
  1278. <td align=right><tt>0x29</tt>
  1279. <tr> <td>&nbsp;
  1280. <td>Paradise
  1281. <td>&nbsp;
  1282. <td align=center>88
  1283. <td>&nbsp;
  1284. <td align=right><tt>0x58</tt>
  1285. <tr> <td>&nbsp;
  1286. <td>Poach
  1287. <td>&nbsp;
  1288. <td align=center>106
  1289. <td>&nbsp;
  1290. <td align=right><tt>0x6A</tt>
  1291. <tr> <td>&nbsp;
  1292. <td>Primus
  1293. <td>&nbsp;
  1294. <td align=center>42
  1295. <td>&nbsp;
  1296. <td align=right><tt>0x2A</tt>
  1297. <tr> <td>&nbsp;
  1298. <td>Realtek RT 3106
  1299. <td>&nbsp;
  1300. <td align=center>31
  1301. <td>&nbsp;
  1302. <td align=right><tt>0x1F</tt>
  1303. <tr> <td>&nbsp;
  1304. <td>Tecmar
  1305. <td>&nbsp;
  1306. <td align=center>22
  1307. <td>&nbsp;
  1308. <td align=right><tt>0x16</tt>
  1309. <tr> <td>&nbsp;
  1310. <td>Trident 8900
  1311. <td>&nbsp;
  1312. <td align=center>91
  1313. <td>&nbsp;
  1314. <td align=right><tt>0x5B</tt>
  1315. <tr> <td>*
  1316. <td>Tseng ET-3000, ET-4000
  1317. <td>&nbsp;
  1318. <td align=center>41
  1319. <td>&nbsp;
  1320. <td align=right><tt>0x29</tt>
  1321. <tr> <td>*
  1322. <td>VEGA
  1323. <td>&nbsp;
  1324. <td align=center>41
  1325. <td>&nbsp;
  1326. <td align=right><tt>0x29</tt>
  1327. <tr> <td>&nbsp;
  1328. <td>Video 7 SVGA
  1329. <td>&nbsp;
  1330. <td align=center>98
  1331. <td>&nbsp;
  1332. <td align=right><tt>0x62</tt>
  1333. <tr> <td>&nbsp;
  1334. <td>WD90C11
  1335. <td>&nbsp;
  1336. <td align=center>92
  1337. <td>&nbsp;
  1338. <td align=right><tt>0x5C</tt>
  1339. <tr> <td>&nbsp;
  1340. <td>Western Digital
  1341. <td>&nbsp;
  1342. <td align=center>88
  1343. <td>&nbsp;
  1344. <td align=right><tt>0x58</tt>
  1345. </table></blockquote>
  1346. </ul>
  1347. <hr>
  1348. <h3><a name="X_Windows"></a>X Windows</h3>
  1349. <p>
  1350. Ghostscript looks for the following resources under the program name
  1351. <b><tt>ghostscript</tt></b> and class name
  1352. <b><tt>Ghostscript</tt></b>; the ones marked "**" are
  1353. calculated from display metrics:
  1354. <blockquote><table cellpadding=0 cellspacing=0>
  1355. <tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">X Windows resources</font><hr>
  1356. <tr> <th align=left>Name
  1357. <td>&nbsp;&nbsp;
  1358. <th align=left>Class
  1359. <td>&nbsp;&nbsp;
  1360. <th align=left>Default
  1361. <tr> <td colspan=5><hr>
  1362. <tr> <td><b><tt>background</tt></b>
  1363. <td>&nbsp;
  1364. <td><b><tt>Background</tt></b>
  1365. <td>&nbsp;
  1366. <td><b><tt>white</tt></b>
  1367. <tr> <td><b><tt>foreground</tt></b>
  1368. <td>&nbsp;
  1369. <td><b><tt>Foreground</tt></b>
  1370. <td>&nbsp;
  1371. <td><b><tt>black</tt></b>
  1372. <tr> <td><b><tt>borderColor</tt></b>
  1373. <td>&nbsp;
  1374. <td><b><tt>BorderColor</tt></b>
  1375. <td>&nbsp;
  1376. <td><b><tt>black</tt></b>
  1377. <tr> <td><b><tt>borderWidth</tt></b>
  1378. <td>&nbsp;
  1379. <td><b><tt>BorderWidth</tt></b>
  1380. <td>&nbsp;
  1381. <td><b><tt>1</tt></b>
  1382. <tr> <td><b><tt>geometry</tt></b>
  1383. <td>&nbsp;
  1384. <td><b><tt>Geometry</tt></b>
  1385. <td>&nbsp;
  1386. <td><b><tt>NULL</tt></b>
  1387. <tr> <td><b><tt>xResolution</tt></b>
  1388. <td>&nbsp;
  1389. <td><b><tt>Resolution</tt></b>
  1390. <td>&nbsp;
  1391. <td>**
  1392. <tr> <td><b><tt>yResolution</tt></b>
  1393. <td>&nbsp;
  1394. <td><b><tt>Resolution</tt></b>
  1395. <td>&nbsp;
  1396. <td>**
  1397. <tr> <td><b><tt>useExternalFonts</tt></b>
  1398. <td>&nbsp;
  1399. <td><b><tt>UseExternalFonts</tt></b>
  1400. <td>&nbsp;
  1401. <td><b><tt>true</tt></b>
  1402. <tr> <td><b><tt>useScalableFonts</tt></b>
  1403. <td>&nbsp;
  1404. <td><b><tt>UseScalableFonts</tt></b>
  1405. <td>&nbsp;
  1406. <td><b><tt>true</tt></b>
  1407. <tr> <td><b><tt>logExternalFonts</tt></b>
  1408. <td>&nbsp;
  1409. <td><b><tt>LogExternalFonts</tt></b>
  1410. <td>&nbsp;
  1411. <td><b><tt>false</tt></b>
  1412. <tr> <td><b><tt>externalFontTolerance</tt></b>
  1413. <td>&nbsp;
  1414. <td><b><tt>ExternalFontTolerance</tt></b>
  1415. <td>&nbsp;
  1416. <td><b><tt>10.0</tt></b>
  1417. <tr> <td><b><tt>palette</tt></b>
  1418. <td>&nbsp;
  1419. <td><b><tt>Palette</tt></b>
  1420. <td>&nbsp;
  1421. <td><b><tt>Color</tt></b>
  1422. <tr> <td><b><tt>maxGrayRamp</tt></b>
  1423. <td>&nbsp;
  1424. <td><b><tt>MaxGrayRamp</tt></b>
  1425. <td>&nbsp;
  1426. <td><b><tt>128</tt></b>
  1427. <tr> <td><b><tt>maxRGBRamp</tt></b>
  1428. <td>&nbsp;
  1429. <td><b><tt>MaxRGBRamp</tt></b>
  1430. <td>&nbsp;
  1431. <td><b><tt>5</tt></b>
  1432. <tr> <td><b><tt>maxDynamicColors</tt></b>
  1433. <td>&nbsp;
  1434. <td><b><tt>MaxDynamicColors</tt></b>
  1435. <td>&nbsp;
  1436. <td><b><tt>256</tt></b>
  1437. <tr> <td><b><tt>useBackingPixmap</tt></b>
  1438. <td>&nbsp;
  1439. <td><b><tt>UseBackingPixmap</tt></b>
  1440. <td>&nbsp;
  1441. <td><b><tt>true</tt></b>
  1442. <tr> <td><b><tt>useXPutImage</tt></b>
  1443. <td>&nbsp;
  1444. <td><b><tt>UseXPutImage</tt></b>
  1445. <td>&nbsp;
  1446. <td><b><tt>true</tt></b>
  1447. <tr> <td><b><tt>useXSetTile</tt></b>
  1448. <td>&nbsp;
  1449. <td><b><tt>UseXSetTile</tt></b>
  1450. <td>&nbsp;
  1451. <td><b><tt>true</tt></b>
  1452. <tr> <td><b><tt>regularFonts</tt></b>
  1453. <td>&nbsp;
  1454. <td><b><tt>RegularFonts</tt></b>
  1455. <td>&nbsp;
  1456. <td>See "<a href="#X_fonts">X fonts</a>"
  1457. <tr> <td><b><tt>symbolFonts</tt></b>
  1458. <td>&nbsp;
  1459. <td><b><tt>SymbolFonts</tt></b>
  1460. <td>&nbsp;
  1461. <td>See "<a href="#X_fonts">X fonts</a>"
  1462. <tr> <td><b><tt>dingbatFonts</tt></b>
  1463. <td>&nbsp;
  1464. <td><b><tt>DingbatFonts</tt></b>
  1465. <td>&nbsp;
  1466. <td>See "<a href="#X_fonts">X fonts</a>"
  1467. </table></blockquote>
  1468. <h4><a name="X_resources"></a>X resources</h4>
  1469. <ul>
  1470. <li>
  1471. To set X resources, put them in a file (such as
  1472. <b><tt>~/.Xdefaults</tt></b> on Unix) in a form like this:
  1473. <blockquote><table cellpadding=0 cellspacing=0>
  1474. <tr><td><b><tt>Ghostscript*geometry:</tt></b><td><b><tt>&nbsp;&nbsp;</tt></b><td><b><tt>595x842-0+0</tt></b>
  1475. <tr><td><b><tt>Ghostscript*xResolution:</tt></b><td><b><tt>&nbsp;</tt></b><td><b><tt>72</tt></b>
  1476. <tr><td><b><tt>Ghostscript*yResolution:</tt></b><td><b><tt>&nbsp;</tt></b><td><b><tt>72</tt></b>
  1477. </table></blockquote>
  1478. <p>
  1479. Then merge these resources into the X server's resource database:
  1480. <blockquote><b><tt>
  1481. xrdb -merge ~/.Xdefaults
  1482. </tt></b></blockquote>
  1483. <li>
  1484. Ghostscript doesn't look at the default system background and foreground
  1485. colors; if you want to change the background or foreground color, you must
  1486. set them explicitly for Ghostscript. This is a deliberate choice, so that
  1487. PostScript documents will display correctly by default -- with white as
  1488. white and black as black -- even if text windows use other colors.
  1489. <li>
  1490. The <b><tt>geometry</tt></b> resource affects only window placement.
  1491. <li>
  1492. Resolution is expressed in pixels per inch (1 inch = 2.54cm).
  1493. <li>
  1494. The font tolerance gives the largest acceptable difference in height of the
  1495. screen font, expressed as a percentage of the height of the desired font.
  1496. <li>
  1497. The <b><tt>palette</tt></b> resource can be used to restrict Ghostscript to
  1498. using a grayscale or monochrome palette.
  1499. <li>
  1500. <b><tt>maxRGBRamp</tt></b> and
  1501. <b><tt>maxGrayRamp</tt></b> control the maximum number of
  1502. colors that ghostscript allocates ahead of time for the dither cube (ramp).
  1503. Ghostscript never preallocates more than half the cells in a colormap.
  1504. <b><tt>maxDynamicColors</tt></b> controls the maximum
  1505. number of colors that Ghostscript will allocate dynamically in the
  1506. colormap.
  1507. </ul>
  1508. <h4><a name="X_server_bugs"></a>Working around bugs in X servers</h4>
  1509. <p>
  1510. The "<b><tt>use</tt></b>..." resources exist primarily to work around bugs
  1511. in X servers.
  1512. <ul>
  1513. <li> Old versions of DEC's X server (DECwindows) have bugs that
  1514. require setting <b><tt>useXPutImage</tt></b> or
  1515. <b><tt>useXSetTile</tt></b> to
  1516. <b><tt>false</tt></b>.
  1517. <li> Some servers do not implement backing pixmaps properly, or do not
  1518. have enough memory for them. If you get strange behavior or "out
  1519. of memory" messages, try setting
  1520. <b><tt>useBackingPixmap</tt></b> to
  1521. <b><tt>false</tt></b>.
  1522. <li> Some servers do not implement tiling properly. This appears
  1523. as broad bands of color where dither patterns should appear. If
  1524. this happens, try setting
  1525. <b><tt>useXSetTile</tt></b> to
  1526. <b><tt>false</tt></b>.
  1527. <li> Some servers do not implement bitmap or pixmap displaying properly.
  1528. This may appear as white or black rectangles where characters
  1529. should appear; or characters may appear in "inverse video" (for
  1530. instance, white on a black rectangle rather than black on white).
  1531. If this happens, try setting
  1532. <b><tt>useXPutImage</tt></b> to
  1533. <b><tt>false</tt></b>.
  1534. </ul>
  1535. <h4><a name="X_fonts"></a>X fonts</h4>
  1536. <p>
  1537. To use native X11 fonts, Ghostscript must map PostScript font names to the
  1538. XLFD font names. The resources <b><tt>regularFonts</tt></b>
  1539. (fonts available in standard or ISO-Latin-1 encoding),
  1540. <b><tt>symbolFonts</tt></b> (using Symbol encoding), and
  1541. <b><tt>dingbatFonts</tt></b> (using Dingbat encoding) give
  1542. the name mapping for different encodings. The XLFD font name in the
  1543. mapping must contain 7 dashes; the X driver adds the additional size and
  1544. encoding fields to bring the total number of dashes in the font name to 14.
  1545. See the appendix "<a href="#X_font_mappings">X default font mappings</a>"
  1546. for the full list of default mappings.
  1547. <p>
  1548. Users who switch regularly between different X servers may wish to use the
  1549. "*" wild card in place of the foundry name
  1550. (<b><tt>itc</tt></b>,
  1551. <b><tt>monotype</tt></b>,
  1552. <b><tt>linotype</tt></b>,
  1553. <b><tt>b&amp;h</tt></b>, or
  1554. <b><tt>adobe</tt></b>); users who do not switch X servers
  1555. should leave the explicit foundry in the name, since it speeds up access to
  1556. fonts.
  1557. <p>
  1558. Ghostscript takes advantage of the "HP XLFD Enhancements," if available, to
  1559. use native X11 fonts for fonts that are anamorphically scaled, rotated, or
  1560. mirrored. If the changes have been installed to the X or font server, they
  1561. are automatically used when appropriate.
  1562. <h4><a name="GS_fonts_as_X_fonts"></a>Using Ghostscript fonts on X displays</h4>
  1563. <p>
  1564. Font files distributed with Ghostscript can be used on X Windows displays.
  1565. You can find full instructions in the
  1566. <a href="Fonts.htm#Use_gs_fonts_with_X">documentation on fonts</a>.
  1567. <h4><a name="X_device_parameters"></a>X device parameters</h4>
  1568. <p>
  1569. In addition to the device parameters recognized by <a
  1570. href="Language.htm#Device_parameters">all devices</a>, Ghostscript's X
  1571. driver provides parameters to adjust its performance. Users will rarely
  1572. need to modify these. Note that these are parameters to be set with the
  1573. <b><tt>-d</tt></b> switch in the command line (e.g.,
  1574. <b><tt>-dMaxBitmap=10000000</tt></b>), not resources to be defined in the
  1575. <b><tt>~/.Xdefaults</tt></b> file.
  1576. <dl>
  1577. <dt><b><tt>AlwaysUpdate &lt;boolean&gt;</tt></b>
  1578. <dd>If <b><tt>true</tt></b>, the driver updates the screen after each
  1579. primitive drawing operation; if <b><tt>false</tt></b> (the default), the
  1580. driver uses an intelligent buffered updating algorithm.
  1581. </dl>
  1582. <dl>
  1583. <dt><b><tt>MaxBitmap &lt;integer&gt;</tt></b>
  1584. <dd>If the amount of memory required to hold the pixmap for the window is no
  1585. more than the value of <b><tt>MaxBitmap</tt></b>, the driver will draw to a
  1586. pixmap in Ghostscript's address space (called a "client-side pixmap") and
  1587. will copy it to the screen from time to time; if the amount of memory
  1588. required for the pixmap exceeds the value of <b><tt>MaxBitmap</tt></b>, the
  1589. driver will draw to a server pixmap. Using a client-side pixmap usually
  1590. provides better performance -- for bitmap images, possibly much better
  1591. performance -- but since it may require quite a lot of RAM (e.g., about 2.2
  1592. Mb for a 24-bit 1024x768 window), the default value of
  1593. <b><tt>MaxBitmap</tt></b> is 0.
  1594. </dl>
  1595. <dl>
  1596. <dt><b><tt>MaxTempPixmap, MaxTempImage, MaxBufferedTotal, MaxBufferedArea,
  1597. MaxBufferedCount &lt;integer&gt;</tt></b>
  1598. <dd>These control various aspects of the driver's buffering behavior. For
  1599. details, please consult the source file <b><tt>gdevx.h</tt></b>.
  1600. </dl>
  1601. <hr>
  1602. <h3><a name="SCO_Unix"></a>SCO Unix</h3>
  1603. <p>
  1604. Because of bugs in the SCO Unix kernel, Ghostscript will not work if you
  1605. select direct screen output and also allow it to write messages on the
  1606. console. If you are using direct screen output, redirect Ghostscript's
  1607. terminal output to a file.
  1608. <hr>
  1609. <h2><a name="Switches"></a>Switches</h2>
  1610. <p>
  1611. Unless otherwise noted, these switches can be used on all platforms.
  1612. <h3><a name="General_switches"></a>General switches</h3>
  1613. <h4><a name="Input_control"></a>Input control</h4>
  1614. <dl>
  1615. <dt><b><tt>@</tt></b><em>filename</em>
  1616. <dd>Causes Ghostscript to read <em>filename</em> and treat its contents the
  1617. same as the command line. (This is intended primarily for getting around
  1618. DOS's 128-character limit on the length of a command line.) Switches or
  1619. file names in the file may be separated by any amount of white space
  1620. (space, tab, line break); there is no limit on the size of the file.
  1621. </dl>
  1622. <dl>
  1623. <dt><b><tt>--</tt></b> <em>filename arg1 ...</em>
  1624. <br><b><tt>-+</tt></b> <em>filename arg1 ...</em>
  1625. <dd>Takes the next argument as a file name as usual, but takes all
  1626. remaining arguments (even if they have the syntactic form of switches) and
  1627. defines the name <b><tt>ARGUMENTS</tt></b> in userdict (not systemdict) as
  1628. an array of those strings, <em>before</em> running the file. When
  1629. Ghostscript finishes executing the file, it exits back to the shell.
  1630. </dl>
  1631. <dl>
  1632. <dt><b><tt>-@</tt></b> <em>filename arg1 ...</em>
  1633. <dd>Does the same thing as <b><tt>--</tt></b> and <b><tt>-+</tt></b>, but
  1634. expands <b><tt>@</tt></b><em>filename</em> arguments.
  1635. </dl>
  1636. <dl>
  1637. <dt><b><tt>-</tt></b>
  1638. <br><b><tt>-_</tt></b>
  1639. <dd>These are not really switches: they tell Ghostscript to read from
  1640. standard input, which is coming from a file or a pipe,
  1641. with or without buffering.
  1642. See <a href="#Pipe_input">"Input from a pipe"</a> above.
  1643. </dl>
  1644. <dl>
  1645. <dt><b><tt>-c</tt></b> <em>tokens ...</em>
  1646. <dd>Interprets arguments as PostScript code up to the next argument that
  1647. begins with "<b><tt>-</tt></b>" followed by a non-digit, or with
  1648. "<b><tt>@</tt></b>". For example, if the file <b><tt>quit.ps</tt></b>
  1649. contains just the word "<b><tt>quit</tt></b>", then
  1650. <b><tt>-c&nbsp;quit</tt></b> on the command line is equivalent to
  1651. <b><tt>quit.ps</tt></b> there. Each argument must be exactly one token, as
  1652. defined by the <b><tt>token</tt></b> operator.
  1653. </dl>
  1654. <dl>
  1655. <dt><b><tt>-f</tt></b>
  1656. <dd>Interprets following non-switch arguments as file names to be executed
  1657. using the normal <b><tt>run</tt></b> command. Since this is the default
  1658. behavior, <b><tt>-f</tt></b> is useful only for terminating the list of
  1659. tokens for the <b><tt>-c</tt></b> switch.
  1660. </dl>
  1661. <dl>
  1662. <dt><b><tt>-f</tt></b><em>filename</em>
  1663. <dd>Execute the given file, even if its name begins with a
  1664. "<b><tt>-</tt></b>" or "<b><tt>@</tt></b>".
  1665. </dl>
  1666. <h4><a name="File_searching"></a>File searching</h4>
  1667. <p>
  1668. Note that by "library files" here we mean all the files identified using
  1669. the search rule under "<a href="#Finding_files">How Ghostscript finds
  1670. files</a>" above: Ghostscript's own initialization files, fonts, and files
  1671. named on the command line.
  1672. <dl>
  1673. <dt><a name="I_switch"></a><b><tt>-I</tt></b><em>directories</em>
  1674. <dd>Adds the designated list of directories at the head of the search path
  1675. for library files.
  1676. </dl>
  1677. <dl>
  1678. <dt><a name="P_switch"></a><b><tt>-P</tt></b>
  1679. <dd>Makes Ghostscript look first in the current directory for library
  1680. files. This is currently the default.
  1681. </dl>
  1682. <dl>
  1683. <dt><a name="P-_switch"></a><b><tt>-P-</tt></b>
  1684. <dd>Makes Ghostscript <b><em>not</em></b> look first in the current
  1685. directory for library files (unless, of course, the first explicitly
  1686. supplied directory is "<b><tt>.</tt></b>").
  1687. </dl>
  1688. <h4><a name="Parameters"></a>Setting parameters</h4>
  1689. <dl>
  1690. <dt><b><tt>-D</tt></b><em>name</em>
  1691. <br><b><tt>-d</tt></b><em>name</em>
  1692. <dd>Define a name in systemdict with value=true.
  1693. </dl>
  1694. <dl>
  1695. <dt><b><tt>-D</tt></b><em>name</em><b><tt>=</tt></b><em>token</em>
  1696. <br><b><tt>-d</tt></b><em>name</em><b><tt>=</tt></b><em>token</em>
  1697. <dd>Define a name in systemdict with the given definition. The token must
  1698. be exactly one token (as defined by the <b><tt>token</tt></b> operator) and
  1699. must not contain any whitespace. If the token is a non-literal name, it
  1700. must be true, false, or null.
  1701. </dl>
  1702. <dl>
  1703. <dt><b><tt>-S</tt></b><em>name</em><b><tt>=</tt></b><em>string</em>
  1704. <br><b><tt>-s</tt></b><em>name</em><b><tt>=</tt></b><em>string</em>
  1705. <dd>Define a name in systemdict with a given string as value. This is
  1706. different from <b><tt>-d</tt></b>. For example, <b><tt>-dXYZ=35</tt></b>
  1707. on the command line is equivalent to the program fragment
  1708. <blockquote><b><tt>
  1709. /XYZ 35 def
  1710. </tt></b></blockquote>
  1711. <p>
  1712. whereas <b><tt>-sXYZ=35</tt></b> is equivalent to
  1713. <blockquote><b><tt>
  1714. /XYZ (35) def
  1715. </tt></b></blockquote>
  1716. </dl>
  1717. <dl>
  1718. <dt><b><tt>-u</tt></b><em>name</em>
  1719. <dd>Un-define a name, cancelling <b><tt>-d</tt></b> or <b><tt>-s</tt></b>.
  1720. </dl>
  1721. <p>
  1722. Note that the initialization file <b><tt>gs_init.ps</tt></b> makes
  1723. <b><tt>systemdict</tt></b> read-only, so the values of names defined with
  1724. <b><tt>-D</tt></b>, <b><tt>-d</tt></b>, <b><tt>-S</tt></b>, and
  1725. <b><tt>-s</tt></b> cannot be changed -- although, of course, they can be
  1726. superseded by definitions in <b><tt>userdict</tt></b> or other dictionaries.
  1727. However, device parameters set this way (<b><tt>PageSize</tt></b>,
  1728. <b><tt>Margins</tt></b>, etc.) are <em>not</em> read-only, and <em>can</em>
  1729. be changed by code in PostScript files.
  1730. <dl>
  1731. <dt><b><tt>-g</tt></b><em>number1</em><b><tt>x</tt></b><em>number2</em>
  1732. <dd>Equivalent to <b><tt>-dDEVICEWIDTH=</tt></b><em>number1</em> and
  1733. <b><tt>-dDEVICEHEIGHT=</tt></b><em>number2</em>, specifying the device
  1734. width and height in pixels for the benefit of devices such as X11 windows
  1735. and VESA displays that require (or allow) you to specify width and height.
  1736. Note that this causes documents of other sizes to be clipped, not scaled:
  1737. see <b><tt>-dFIXEDMEDIA</tt></b> below.
  1738. </dl>
  1739. <dl>
  1740. <dt><a name="Resolution_switch"></a><b><tt>-r</tt></b><em>number</em> (same
  1741. as <b><tt>-r</tt></b><em>number</em><b><tt>x</tt></b><em>number</em>)
  1742. <br><b><tt>-r</tt></b><em>number1</em><b><tt>x</tt></b><em>number2</em>
  1743. <dd>Equivalent to <b><tt>-dDEVICEXRESOLUTION=</tt></b><em>number1</em> and
  1744. <b><tt>-dDEVICEYRESOLUTION=</tt></b><em>number2</em>, specifying the device
  1745. horizontal and vertical resolution in pixels per inch for the benefit of
  1746. devices such as printers that support multiple X and Y resolutions.
  1747. </dl>
  1748. <h4><a name="Quiet"></a>Suppress messages</h4>
  1749. <dl>
  1750. <dt><a name="Quiet"></a><b><tt>-q</tt></b>
  1751. <dd>Quiet startup: suppress normal startup messages, and also do the
  1752. equivalent of <a href="#dQUIET"><b><tt>-dQUIET</tt></b></a>.
  1753. </dl>
  1754. <h3><a name="Parameter_switches"></a>Parameter switches (<b><tt>-d</tt></b> and <b><tt>-s</tt></b>)</h3>
  1755. <p>
  1756. As noted above, <b><tt>-d</tt></b> and <b><tt>-s</tt></b> define initial
  1757. values for PostScript names. Some of these names are parameters that
  1758. control the interpreter or the graphics engine. You can also use
  1759. <b><tt>-d</tt></b> or <b><tt>-s</tt></b> to define a value for any device
  1760. parameter of the initial device (the one defined with
  1761. <b><tt>-sDEVICE=</tt></b>, or the default device if this switch is not
  1762. used). For example, since the <b><tt>ppmraw</tt></b> device has a numeric
  1763. <b><tt>GrayValues</tt></b> parameter that controls the number of bits per
  1764. component, <b><tt>-sDEVICE=ppmraw -dGrayValues=16</tt></b> will make this
  1765. the default device and set the number of bits per component to 4 (log2(16)).
  1766. <h4><a name="Rendering_parameters"></a>Rendering parameters</h4>
  1767. <dl>
  1768. <dt><b><tt>-dCOLORSCREEN
  1769. <br>-dCOLORSCREEN=0
  1770. <br>-dCOLORSCREEN=false</tt></b>
  1771. <dd>On high-resolution devices (at least 150 dpi resolution, or
  1772. <b><tt>-dDITHERPPI</tt></b> specified), <b><tt>-dCOLORSCREEN</tt></b>
  1773. forces the use of separate halftone screens with different angles for CMYK
  1774. or RGB if halftones are needed (this produces the best-quality output);
  1775. <b><tt>-dCOLORSCREEN=0</tt></b> uses separate screens with the same
  1776. frequency and angle; <b><tt>-dCOLORSCREEN=false</tt></b> forces the use of
  1777. a single binary screen. The default if <b><tt>COLORSCREEN</tt></b> is not
  1778. specified is to use separate screens with different angles if the device
  1779. has fewer than 5 bits per color, and a single binary screen (which is never
  1780. actually used under normal circumstances) on all other devices.
  1781. </dl>
  1782. <dl>
  1783. <dt><b><tt>-dDITHERPPI=</tt></b><em>lpi</em>
  1784. <dd>Forces all devices to be considered high-resolution, and forces use of
  1785. a halftone screen or screens with <em>lpi</em> lines per inch, disregarding
  1786. the actual device resolution. Reasonable values for <em>lpi</em> are
  1787. <b><em>N</em></b>/5 to <b><em>N</em></b>/20, where <b><em>N</em></b> is the
  1788. resolution in dots per inch.
  1789. </dl>
  1790. <dl>
  1791. <dt><b><tt>-dDOINTERPOLATE</tt></b>
  1792. <dd>Turns on image interpolation for all images, improving image quality for
  1793. scaled images at the expense of speed. Note that
  1794. <b><tt>-dNOINTERPOLATE</tt></b> overrides <b><tt>-dDOINTERPOLATE</tt></b> if
  1795. both are specified.
  1796. </dl>
  1797. <dl>
  1798. <dt><b><tt>-dNOCIE</tt></b>
  1799. <dd>Substitutes <b><tt>DeviceGray</tt></b> and <b><tt>DeviceRGB</tt></b>
  1800. for CIEBasedA and CIEBasedABC color spaces respectively. Useful only on
  1801. very slow systems where color accuracy is less important.
  1802. </dl>
  1803. <dl>
  1804. <dt><b><tt>-dNOINTERPOLATE</tt></b>
  1805. <dd>Turns off image interpolation, improving performance on interpolated
  1806. images at the expense of image quality. <b><tt>-dNOINTERPOLATE</tt></b>
  1807. overrides <b><tt>-dDOINTERPOLATE</tt></b>.
  1808. </dl>
  1809. <h4><a name="Page_parameters"></a>Page parameters</h4>
  1810. <dl>
  1811. <dt><a name="FIXEDMEDIA"></a><b><tt>-dFIXEDMEDIA</tt></b>
  1812. <dd>Causes the media size to be fixed after initialization, forcing pages
  1813. of other sizes or orientations to be clipped. This may be useful when
  1814. printing documents on a printer that can handle their requested paper size
  1815. but whose default is some other size. Note that <b><tt>-g</tt></b>
  1816. automatically sets <b><tt>-dFIXEDMEDIA</tt></b>, but
  1817. <b><tt>-sPAPERSIZE=</tt></b> does not.
  1818. </dl>
  1819. <dl>
  1820. <dt><b><tt>-dFIXEDRESOLUTION</tt></b>
  1821. <dd>Causes the media resolution to be fixed similarly. <b><tt>-r</tt></b>
  1822. automatically sets <b><tt>-dFIXEDRESOLUTION</tt></b>.
  1823. </dl>
  1824. <dl>
  1825. <dt><b><tt>-dORIENT1=true
  1826. <br>-dORIENT1=false</tt></b>
  1827. <dd>Defines the meaning of the 0 and 1 orientation values for the
  1828. setpage[params] compatibility operators. The default value of
  1829. <b><tt>ORIENT1</tt></b> is true (set in <b><tt>gs_init.ps</tt></b>), which
  1830. is the correct value for most files that use setpage[params] at all,
  1831. namely, files produced by badly designed applications that "know" that the
  1832. output will be printed on certain roll-media printers: these applications
  1833. use 0 to mean landscape and 1 to mean portrait.
  1834. <b><tt>-dORIENT1=false</tt></b> declares that 0 means portrait and 1 means
  1835. landscape, which is the convention used by a smaller number of files
  1836. produced by properly written applications.
  1837. </dl>
  1838. <dl>
  1839. <dt><b><tt>-dDEVICEWIDTHPOINTS=</tt></b><em>w</em>
  1840. <br><b><tt>-dDEVICEHEIGHTPOINTS=</tt></b><em>h</em>
  1841. <dd>Sets the initial page width to <em>w</em> or initial page height to
  1842. <em>h</em> respectively, specified in 1/72" units.
  1843. </dl>
  1844. <h4><a name="Font_related_parameters"></a>Font-related parameters</h4>
  1845. <dl>
  1846. <dt><a name="DISKFONTS"></a><b><tt>-dDISKFONTS</tt></b>
  1847. <dd>Causes individual character outlines to be loaded from the disk the
  1848. first time they are encountered. (Normally Ghostscript loads all the
  1849. character outlines when it loads a font.) This may allow loading more
  1850. fonts into memory at the expense of slower rendering.
  1851. <b><tt>DISKFONTS</tt></b> is effective only if the diskfont feature was
  1852. built into the executable; otherwise it is ignored.
  1853. </dl>
  1854. <dl>
  1855. <dt><b><tt>-dLOCALFONTS</tt></b>
  1856. <dd>Causes Type 1 fonts to be loaded into the current VM -- normally local
  1857. VM -- instead of always being loaded into global VM. Useful only for
  1858. compatibility with Adobe printers for loading some obsolete fonts.
  1859. </dl>
  1860. <dl>
  1861. <dt><b><tt>-dNOCCFONTS</tt></b>
  1862. <dd>Suppresses the use of fonts precompiled into the Ghostscript executable.
  1863. See <a href="Fonts.htm#Precompiling">"Precompiling fonts"</a> in the
  1864. documentation on fonts for details. This is probably useful only for
  1865. debugging.
  1866. </dl>
  1867. <dl>
  1868. <dt><a name="FONTMAP_switch"></a><b><tt>-dNOFONTMAP</tt></b>
  1869. <dd>Suppresses the normal loading of the Fontmap file. This may be useful
  1870. in environments without a file system.
  1871. </dl>
  1872. <dl>
  1873. <dt><b><tt>-dNOFONTPATH</tt></b>
  1874. <dd>Suppresses consultation of <b><tt>GS_FONTPATH</tt></b>. This may be
  1875. useful for debugging.
  1876. </dl>
  1877. <dl>
  1878. <dt><b><tt>-dNOPLATFONTS</tt></b>
  1879. <dd>Disables the use of fonts supplied by the underlying platform (X
  1880. Windows or Microsoft Windows). This may be needed if the platform fonts
  1881. look undesirably different from the scalable fonts.
  1882. </dl>
  1883. <dl>
  1884. <dt><b><tt>-sFONTMAP=</tt></b><em>filename1</em><b><tt>;</tt></b><em>filename2</em><b><tt>;</tt></b><em>...</em>
  1885. <dd>Specifies alternate name or names for the Fontmap file. Note that the
  1886. names are separated by "<b><tt>:</tt></b>" on Unix systems, by
  1887. "<b><tt>;</tt></b>" on DOS or MS Windows systems, and by
  1888. "<b><tt>,</tt></b>" on VMS systems, just as for search paths.
  1889. </dl>
  1890. <dl>
  1891. <dt><b><tt>-sFONTPATH=</tt></b><em>dir1</em><b><tt>;</tt></b><em>dir2</em><b><tt>;</tt></b><em>...</em>
  1892. <dd>Specifies a list of directories that will be scanned when looking for
  1893. fonts not found on the search path, overriding the environment variable
  1894. <b><tt>GS_FONTPATH</tt></b>.
  1895. </dl>
  1896. <dl>
  1897. <dt><b><tt>-sSUBSTFONT=</tt></b><em>fontname</em>
  1898. <dd>Causes the given font to be substituted for all unknown fonts, instead
  1899. of using the normal intelligent substitution algorithm. Also, in this
  1900. case, the font returned by <b><tt>findfont</tt></b> is the actual font
  1901. named "<em>fontname</em>", not a copy of the font with the
  1902. <b><tt>FontName</tt></b> changed to the requested one.
  1903. </dl>
  1904. <h4><a name="Interaction_related_parameters"></a>Interaction-related parameters</h4>
  1905. <dl>
  1906. <dt><b><tt>-dBATCH</tt></b>
  1907. <dd>Causes Ghostscript to exit after processing all files named on the
  1908. command line, rather than going into an interactive loop reading PostScript
  1909. commands. Equivalent to putting -c quit at the end of the command line.
  1910. </dl>
  1911. <dl>
  1912. <dt><b><tt>-dNOPAGEPROMPT</tt></b>
  1913. <dd>Disables only the prompt, but not the pause, at the end of each page.
  1914. This may be useful on PC displays that get confused if a program attempts
  1915. to write text to the console while the display is in a graphics mode.
  1916. </dl>
  1917. <dl>
  1918. <dt><a name="NoPause"></a><b><tt>-dNOPAUSE</tt></b>
  1919. <dd>Disables the prompt and pause at the end of each page. Normally one
  1920. should use this (along with <b><tt>-dBATCH</tt></b>) when producing output
  1921. on a printer or to a file; it also may be desirable for applications where
  1922. another program is "driving" Ghostscript.
  1923. </dl>
  1924. <dl>
  1925. <dt><b><tt>-dNOPROMPT</tt></b>
  1926. <dd>Disables the prompt printed by Ghostscript when it expects interactive
  1927. input, as well as the end-of-page prompt (<b><tt>-dNOPAGEPROMPT</tt></b>);
  1928. also disables the implicit <b><tt>flushpage</tt></b> that normally occurs
  1929. each time Ghostscript asks for more input. This allows piping input
  1930. directly into Ghostscript, as long as the data doesn't refer to
  1931. <b><tt>currentfile</tt></b>.
  1932. </dl>
  1933. <dl>
  1934. <dt><a name="dQUIET"></a><b><tt>-dQUIET</tt></b>
  1935. <dd>Suppresses routine information comments on standard output. This is
  1936. currently necessary when redirecting device output to standard output.
  1937. </dl>
  1938. <dl>
  1939. <dt><b><tt>-dSHORTERRORS</tt></b>
  1940. <dd>Makes certain error and information messages more Adobe-compatible.
  1941. </dl>
  1942. <dl>
  1943. <dt><b><tt>-sstdout=</tt></b><em>filename</em>
  1944. <dd>Redirect PostScript <b><tt>%stdout</tt></b> to a file or
  1945. <b><tt>stderr</tt></b>, to avoid it being mixed with device stdout.
  1946. To redirect stdout to stderr use <b><tt>-sstdout=%stderr</tt></b>.
  1947. To cancel redirection of stdout use <b><tt>-sstdout=%stdout</tt></b>
  1948. or <b><tt>-sstdout=-</tt></b>.
  1949. </dl>
  1950. <dl>
  1951. <dt><b><tt>-dTTYPAUSE</tt></b>
  1952. <dd>Causes Ghostscript to read a character from <b><tt>/dev/tty</tt></b>,
  1953. rather than standard input, at the end of each page. This may be useful if
  1954. input is coming from a pipe. Note that <b><tt>-dTTYPAUSE</tt></b>
  1955. overrides <b><tt>-dNOPAUSE</tt></b>.
  1956. </dl>
  1957. <h4><a name="Output_selection_parameters"></a>Device and output selection parameters</h4>
  1958. <dl>
  1959. <dt><b><tt>-dNODISPLAY</tt></b>
  1960. <dd>Initializes Ghostscript with a null device (a device that discards the
  1961. output image) rather than the default device or the device selected with
  1962. <b><tt>-sDEVICE=</tt></b>. This is usually useful only when running
  1963. PostScript code whose purpose is to compute something rather than to
  1964. produce an output image; for instance, when converting PostScript to PDF.
  1965. </dl>
  1966. <dl>
  1967. <dt><a name="DEVICE_switch"></a><b><tt>-sDEVICE=</tt></b><em>device</em>
  1968. <dd>Selects an alternate <a href="#Output_device">initial output
  1969. device</a>.
  1970. </dl>
  1971. <dl>
  1972. <dt><b><tt>-sOutputFile=</tt></b><em>filename</em>
  1973. <dd>Selects an alternate output file (or pipe) for the initial output
  1974. device, as described above.
  1975. </dl>
  1976. <h4><a name="Other_parameters"></a>Other parameters</h4>
  1977. <dl>
  1978. <dt><b><tt>-dDELAYBIND</tt></b>
  1979. <dd>Causes <b><tt>bind</tt></b> to remember all its invocations, but not
  1980. actually execute them until the <b><tt>.bindnow</tt></b> procedure is
  1981. called. Useful only for certain specialized packages like
  1982. <b><tt>pstotext</tt></b> that redefine operators.
  1983. </dl>
  1984. <dl>
  1985. <dt><b><tt>-dDOPDFMARKS</tt></b>
  1986. <dd>Causes <b><tt>pdfmark</tt></b> to be called for bookmarks,
  1987. annotations, links and cropbox when processing PDF files.
  1988. Normally, <b><tt>pdfmark</tt></b> is only called for these types
  1989. for PostScript files or when the output device requests it
  1990. (e.g. pdfwrite device).
  1991. </dl>
  1992. <dl>
  1993. <dt><b><tt>-dNOBIND</tt></b>
  1994. <dd>Disables the <b><tt>bind</tt></b> operator. Useful only for debugging.
  1995. </dl>
  1996. <dl>
  1997. <dt><b><tt>-dNOCACHE</tt></b>
  1998. <dd>Disables character caching. Useful only for debugging.
  1999. </dl>
  2000. <dl>
  2001. <dt><b><tt>-dNOGC</tt></b>
  2002. <dd>Suppresses the initial automatic enabling of the garbage collector in
  2003. Level 2 systems. (The <b><tt>vmreclaim</tt></b> operator is not disabled.)
  2004. Useful only for debugging.
  2005. </dl>
  2006. <dl>
  2007. <dt><b><tt>-dNOSAFER</tt></b> (equivalent to <b><tt>-dDELAYSAFER</tt></b>).
  2008. <dd>This flag disables SAFER mode until the <b><tt>.setsafe</tt></b>
  2009. procedure is run. This is intended for clients or scripts that cannot
  2010. operate in SAFER mode. If Ghostscript is started with <b><tt>-dNOSAFER</tt></b>
  2011. or <b><tt>-dDELAYSAFER</tt></b>, PostScript programs are allowed to read, write,
  2012. rename or delete any files in the system that are not protected by operating
  2013. system permissions.
  2014. <p><b>This mode should be used with caution, and <tt>.setsafe</tt> should be
  2015. run prior to running any PostScript file with unknown contents.</b>
  2016. </dl>
  2017. <a name="Safer"></a>
  2018. <dl>
  2019. <dt><b><tt>-dSAFER</tt></b>
  2020. <dd>Disables the <b><tt>deletefile</tt></b> and <b><tt>renamefile</tt></b>
  2021. operators, and the ability to open piped commands (<b><tt>%pipe%</tt></b><em>cmd</em>)
  2022. at all. Only <b><tt>%stdout</tt></b> and <b><tt>%stderr</tt></b> can be opened
  2023. for writing.
  2024. <p>
  2025. This mode also sets the <a href="Language.htm#LockSafetyParams">.LockSafetyParams</a>
  2026. parameter of the default device, or the device specified with the <b><tt>-sDEVICE= </tt></b>
  2027. switch to protect against programs that attempt to write to files using the
  2028. OutputFile device parameter. Note that since the device parameters specified
  2029. on the command line (including OutputFile) are set prior to SAFER mode,
  2030. the <b><tt>-sOutputFile=...</tt></b> on the command line is unrestricted.
  2031. <p>
  2032. <b><tt>SAFER</tt></b> mode also prevents changing the /GenericResourceDir,
  2033. /FontResourceDir and either the /SystemParamsPassword or the /StartJobPassword.
  2034. <p>
  2035. <b>Note: </b>While SAFER mode is not the default, in a subsequent release of
  2036. Ghostscript, SAFER mode will be the default thus scripts or programs that need
  2037. to open files or set restricted parameters will require the <b><tt>-dNOSAFER</tt></b>
  2038. command line option.
  2039. <p>
  2040. When running -dNOSAFER it is possible to perform a <b><tt>save</tt></b>,
  2041. followed by <b><tt>.setsafe</tt></b>, execute a file or procedure in SAFER mode,
  2042. then use <b><tt>restore</tt></b> to return to NOSAFER mode. In order to prevent
  2043. the save object from being restored by the foreign file or procedure, the
  2044. <a href="Language.htm#Runandhide"><b>.runandhide</b></a> operator should
  2045. be used to hide the save object from the restricted procedure.
  2046. </dl>
  2047. <dl>
  2048. <dt><b><tt>-dPARANOIDSAFER</tt></b>
  2049. <dd>Disables reading of files other than <b><tt>%stdin</tt></b>, those given as
  2050. a command line argument, or those contained on one of the paths given by
  2051. LIBPATH and FONTPATH and specified by the system params /FontResourceDir
  2052. and /GenericResourceDir.
  2053. <p>
  2054. <b><tt>-dPARANOIDSAFER</tt></b> implies <b><tt>-dSAFER</tt></b> so if
  2055. <b><tt>-dPARANOIDSAFER</tt></b> is given on the command line,
  2056. <b><tt>-dSAFER</tt></b> is optional.
  2057. </dl>
  2058. <dl>
  2059. <dt><b><tt>-dSTRICT</tt></b>
  2060. <dd>Disables as many Ghostscript extensions as feasible, to be more helpful
  2061. in debugging applications that produce output for Adobe and other RIPs.
  2062. </dl>
  2063. <dl>
  2064. <dt><b><tt>-dWRITESYSTEMDICT</tt></b>
  2065. <dd>Leaves <b><tt>systemdict</tt></b> writable. This is necessary when
  2066. running special utility programs such as <b><tt>font2c</tt></b> and
  2067. <b><tt>pcharstr</tt></b>, which must bypass normal PostScript access
  2068. protection.
  2069. </dl>
  2070. <hr>
  2071. <h2><a name="Improving_performance"></a>Improving performance</h2>
  2072. <p>
  2073. Ghostscript attempts to find an optimum balance between speed and memory
  2074. consumption, but there are some cases in which you may get a very large
  2075. speedup by telling Ghostscript to use more memory.
  2076. <ul>
  2077. <li>
  2078. If you are using X Windows, setting the <b><tt>-dMaxBitmap=</tt></b>
  2079. parameter described <a href="#X_device_parameters">above</a> may
  2080. dramatically improve performance on files that have a lot of bitmap images.
  2081. <li>
  2082. If you are using Chinese, Japanese, or other fonts with very large character
  2083. sets, adding the following sequence of switches before the first file name
  2084. may dramatically improve performance at the cost of an additional 2-3 Mb of
  2085. memory: <b><tt>-c&nbsp;3000000&nbsp;setvmthreshold&nbsp;-f</tt></b>.
  2086. </ul>
  2087. <hr>
  2088. <h2><a name="Debugging"></a>Debugging</h2>
  2089. <p>
  2090. The information here describing the debugging switches is probably
  2091. interesting only to developers. The <b><tt>-Z</tt></b> switch applies only
  2092. if the interpreter was <a href="Make.htm#Debugging">built for a debugging
  2093. configuration</a>. In the table below, the first column is a debugging
  2094. switch, the second is an equivalent switch (if any) and the third is its
  2095. usage.
  2096. <table cellpadding=0 cellspacing=0>
  2097. <tr><th colspan=5 bgcolor="#CCCC00"><hr><font size="+1">Switches used in debugging</font><hr>
  2098. <tr> <th align=left>Switch
  2099. <td>&nbsp;&nbsp;
  2100. <th align=left>Equivalent
  2101. <td>&nbsp;&nbsp;
  2102. <th>&nbsp;
  2103. <tr> <td colspan=5><hr>
  2104. <tr> <td valign=top><b><tt>-A</tt></b>
  2105. <td>&nbsp;
  2106. <td valign=top><b><tt>-Z@</tt></b>
  2107. <td>&nbsp;
  2108. <td>Fill empty storage with a distinctive bit pattern for debugging
  2109. <tr> <td valign=top><b><tt>-A-</tt></b>
  2110. <td>&nbsp;
  2111. <td valign=top><b><tt>-Z-@</tt></b>
  2112. <td>&nbsp;
  2113. <td>Turn off <b><tt>-A</tt></b>
  2114. <tr> <td valign=top><b><tt>-B</tt></b><em>size</em>
  2115. <td>&nbsp;
  2116. <td>&nbsp;
  2117. <td>&nbsp;
  2118. <td>Run all subsequent files named on the command line (except for
  2119. <b><tt>-F</tt></b>) through the run_string interface, using a
  2120. buffer of <em>size</em> bytes
  2121. <tr> <td valign=top><b><tt>-B-</tt></b>
  2122. <td>&nbsp;
  2123. <td>&nbsp;
  2124. <td>&nbsp;
  2125. <td>Turn off <b><tt>-B</tt></b>: run subsequent files (except for
  2126. <b><tt>-F</tt></b>) directly in the normal way
  2127. <tr> <td valign=top><b><tt>-E</tt></b>
  2128. <td>&nbsp;
  2129. <td valign=top><b><tt>-Z#</tt></b>
  2130. <td>&nbsp;
  2131. <td>Turn on tracing of error returns from operators
  2132. <tr> <td valign=top><b><tt>-E-</tt></b>
  2133. <td>&nbsp;
  2134. <td valign=top><b><tt>-Z-#</tt></b>
  2135. <td>&nbsp;
  2136. <td>Turn off <b><tt>-E</tt></b>
  2137. <tr> <td valign=top><b><tt>-F</tt></b><em>file</em>
  2138. <td>&nbsp;
  2139. <td>&nbsp;
  2140. <td>&nbsp;
  2141. <td>Execute the file with <b><tt>-B1</tt></b> temporarily in effect
  2142. <tr> <td valign=top><b><tt>-K</tt></b><em>n</em>
  2143. <td>&nbsp;
  2144. <td>&nbsp;
  2145. <td>&nbsp;
  2146. <td>Limit the total amount of memory that the interpreter can have
  2147. allocated at any one time to <b><em>n</em></b>K bytes.
  2148. <b><em>n</em></b> is a positive decimal integer.
  2149. <tr> <td valign=top><b><tt>-M</tt></b><em>n</em>
  2150. <td>&nbsp;
  2151. <td>&nbsp;
  2152. <td>&nbsp;
  2153. <td>Force the interpreter's allocator to acquire additional memory
  2154. in units of <b><em>n</em></b>K bytes, rather than the default
  2155. (currently 20K on DOS systems, 50K on Unix). <b><em>n</em></b>
  2156. is a positive decimal integer, on DOS systems no greater than
  2157. 63.
  2158. <tr> <td valign=top><b><tt>-N</tt></b><em>n</em>
  2159. <td>&nbsp;
  2160. <td>&nbsp;
  2161. <td>&nbsp;
  2162. <td>Allocate space for <b><em>n</em></b>K names, rather than the
  2163. default (normally 64K). <b><em>n</em></b> may be greater than
  2164. 64 only if <b><tt>EXTEND_NAMES</tt></b> was defined when the
  2165. interpreter was compiled .
  2166. <tr> <td valign=top><b><tt>-Z</tt></b><em>xxx</em><br><b><tt>-Z-</tt></b><em>xxx</em>
  2167. <td>&nbsp;
  2168. <td>&nbsp;
  2169. <td>&nbsp;
  2170. <td>Turn debugging printout on (off). Each of the <em>xxx</em>
  2171. characters selects an option. Case is significant: "a" and
  2172. "A" have different meanings.
  2173. <dl compact>
  2174. <dt><b><tt>0</tt></b><dd>garbage collector, minimal detail
  2175. <dt><b><tt>1</tt></b><dd>type 1 and type 42 font interpreter
  2176. <dt><b><tt>2</tt></b><dd>curve subdivider/rasterizer
  2177. <dt>&nbsp;&nbsp;&nbsp;<b><tt>3</tt></b><dd>curve subdivider/rasterizer, detail
  2178. <dt><b><tt>4</tt></b><dd>garbage collector (strings)
  2179. <dt>&nbsp;&nbsp;&nbsp;<b><tt>5</tt></b><dd>garbage collector (strings, detail)
  2180. <dt><b><tt>6</tt></b><dd>garbage collector (chunks, roots)
  2181. <dt>&nbsp;&nbsp;&nbsp;<b><tt>7</tt></b><dd>garbage collector (objects)
  2182. <dt>&nbsp;&nbsp;&nbsp;<b><tt>8</tt></b><dd>garbage collector (refs)
  2183. <dt>&nbsp;&nbsp;&nbsp;<b><tt>9</tt></b><dd>garbage collector (pointers)
  2184. <dt><b><tt>a</tt></b><dd>allocator (large blocks only)
  2185. <dt>&nbsp;&nbsp;&nbsp;<b><tt>A</tt></b><dd>allocator (all calls)
  2186. <dt><b><tt>b</tt></b><dd>bitmap image processor
  2187. <dt>&nbsp;&nbsp;&nbsp;<b><tt>B</tt></b><dd>bitmap images, detail
  2188. <dt><b><tt>c</tt></b><dd>color/halftone mapper
  2189. <dt><b><tt>d</tt></b><dd>dictionary put/undef
  2190. <dt>&nbsp;&nbsp;&nbsp;<b><tt>D</tt></b><dd>dictionary lookups
  2191. <dt><b><tt>e</tt></b><dd>external (OS-related) calls
  2192. <dt><b><tt>f</tt></b><dd>fill algorithm (summary)
  2193. <dt>&nbsp;&nbsp;&nbsp;<b><tt>F</tt></b><dd>fill algorithm (detail)
  2194. <dt><b><tt>g</tt></b><dd>gsave/grestore[all]
  2195. <dt><b><tt>h</tt></b><dd>halftone renderer
  2196. <dt>&nbsp;&nbsp;&nbsp;<b><tt>H</tt></b><dd>halftones, every pixel
  2197. <dt><b><tt>i</tt></b><dd>interpreter, just names
  2198. <dt>&nbsp;&nbsp;&nbsp;<b><tt>I</tt></b><dd>interpreter, everything
  2199. <dt><b><tt>j</tt></b><dd>(Japanese) composite fonts
  2200. <dt><b><tt>k</tt></b><dd>character cache and xfonts
  2201. <dt>&nbsp;&nbsp;&nbsp;<b><tt>K</tt></b><dd>character cache, every access
  2202. <dt><b><tt>l</tt></b><dd>command lists, bands
  2203. <dt>&nbsp;&nbsp;&nbsp;<b><tt>L</tt></b><dd>command lists, everything
  2204. <dt><b><tt>m</tt></b><dd>makefont and font cache
  2205. <dt><b><tt>n</tt></b><dd>name lookup (new names only)
  2206. <dt><b><tt>o</tt></b><dd>outliner (stroke)
  2207. <dt>&nbsp;&nbsp;&nbsp;<b><tt>O</tt></b><dd>stroke detail
  2208. <dt><b><tt>p</tt></b><dd>band list paths
  2209. <dt>&nbsp;&nbsp;&nbsp;<b><tt>P</tt></b><dd>all paths
  2210. <dt><b><tt>q</tt></b><dd>clipping
  2211. <dt><b><tt>r</tt></b><dd>arc renderer
  2212. <dt><b><tt>s</tt></b><dd>streams
  2213. <dt>&nbsp;&nbsp;&nbsp;<b><tt>S</tt></b><dd>scanner
  2214. <dt><b><tt>t</tt></b><dd>tiling algorithm
  2215. <dt><b><tt>u</tt></b><dd>undo saver (for save/restore), finalization
  2216. <dt>&nbsp;&nbsp;&nbsp;<b><tt>U</tt></b><dd>undo saver, more detail
  2217. <dt><b><tt>v</tt></b><dd>alpha/transparency
  2218. <dt>&nbsp;&nbsp;&nbsp;<b><tt>V</tt></b><dd>alpha/transparency, more detail
  2219. <dt><b><tt>w</tt></b><dd>compression encoder/decoder
  2220. <dt><b><tt>x</tt></b><dd>transformations
  2221. <dt><b><tt>y</tt></b><dd>Type 1 hints
  2222. <dt>&nbsp;&nbsp;&nbsp;<b><tt>Y</tt></b><dd>Type 1 hints, every access
  2223. <dt><b><tt>z</tt></b><dd>trapezoid fill
  2224. <dt><b><tt>#</tt></b><dd>operator error returns
  2225. <dt><b><tt>%</tt></b><dd>externally processed comments
  2226. <dt><b><tt>*</tt></b><dd>image and RasterOp parameters
  2227. <dt><b><tt>:</tt></b><dd>command list and allocator/time summary
  2228. <dt><b><tt>~</tt></b><dd>math functions and Functions
  2229. <dt><b><tt>'</tt></b><dd>contexts, create/destroy
  2230. <dt>&nbsp;&nbsp;&nbsp;<b><tt>"</tt></b><dd>contexts, every operation
  2231. <dt><b><tt>^</tt></b><dd>reference counting
  2232. <dt><b><tt>_</tt></b><dd>high-level output
  2233. <dt><b><tt>|</tt></b><dd>(reserved for experimental code)
  2234. </dl>
  2235. <p>
  2236. The following switch affects what is printed, but does not select specific
  2237. items for printing:
  2238. <dl compact>
  2239. <dt><b><tt>/</tt></b><dd>include file name and line number on all trace output
  2240. </dl>
  2241. <p>
  2242. These switches select debugging options other than what should be printed:
  2243. <dl compact>
  2244. <dt><b><tt>$</tt></b><dd>set unused parts of object references to
  2245. identifiable garbage values
  2246. <dt><b><tt>+</tt></b><dd>use minimum-size stack blocks
  2247. <dt><b><tt>,</tt></b><dd>don't use path-based banding
  2248. <dt><b><tt>`</tt></b><dd>don't use high-level banded images
  2249. <dt><b><tt>.</tt></b><dd>use small-memory table sizes even on large-memory
  2250. machines
  2251. <dt><b><tt>?</tt></b><dd>validate pointers before, during and after garbage
  2252. collection, also before and after save and restore; also make other
  2253. allocator validity checks
  2254. <dt><b><tt>@</tt></b><dd>fill newly allocated, garbage-collected, and freed
  2255. storage with a marker (a1, c1, and f1 respectively)
  2256. </dl>
  2257. </table>
  2258. <hr>
  2259. <h2><a name="Known_paper_sizes"></a>Appendix: Paper sizes known to Ghostscript</h2>
  2260. <p>
  2261. The paper sizes known to Ghostscript are defined at the beginning of the
  2262. initialization file <b><tt>gs_statd.ps</tt></b>; see the comments there for
  2263. more details about the definitions. The table here lists them by name and
  2264. size. <b><tt>gs_statd.ps</tt></b> defines their sizes exactly in points,
  2265. and the dimensions in inches (at 72 points per inch) and centimeters shown
  2266. in the table are derived from those, rounded to the nearest 0.1 unit. A
  2267. guide to international paper sizes can be found at
  2268. <blockquote>
  2269. <a href="http://www.twics.com/~eds/papersize.html">http://www.twics.com/~eds/papersize.html</a>
  2270. </blockquote>
  2271. <table cellpadding=0 cellspacing=0>
  2272. <tr><th colspan=13 bgcolor="#CCCC00"><hr><font size="+1">Paper sizes known to Ghostscript</font><hr>
  2273. <tr><th colspan=13>U.S. standard
  2274. <tr> <td>&nbsp;
  2275. <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  2276. <th colspan=3>Inches
  2277. <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  2278. <th colspan=3>cm
  2279. <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  2280. <th colspan=3>Points
  2281. <td>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
  2282. <td>&nbsp;
  2283. <tr> <th align=left>Name
  2284. <td>&nbsp;
  2285. <th>&nbsp;W&nbsp;
  2286. <td>&times;
  2287. <th>&nbsp;H&nbsp;
  2288. <td>&nbsp;
  2289. <th>&nbsp;W&nbsp;
  2290. <td>&times;
  2291. <th>&nbsp;H&nbsp;
  2292. <td>&nbsp;
  2293. <th>&nbsp;W&nbsp;
  2294. <td>&times;
  2295. <th>&nbsp;H&nbsp;
  2296. <td>&nbsp;
  2297. <td>&nbsp;
  2298. <tr> <td colspan=13><hr>
  2299. <tr> <td>11x17
  2300. <td>&nbsp;&nbsp;<td align=right>11.0<td>&nbsp;&nbsp;<td align=right>17.0<td>&nbsp;&nbsp;<td align=right>27.9<td>&nbsp;&nbsp;<td align=right>43.2<td>&nbsp;&nbsp;<td align=right>792<td>&nbsp;&nbsp;<td align=right>1224<td>&nbsp;&nbsp;<td>11&times;17in portrait
  2301. <tr> <td>ledger
  2302. <td>&nbsp;<td align=right>17.0<td>&nbsp;<td align=right>11.0<td>&nbsp;<td align=right>43.2<td>&nbsp;<td align=right>27.9<td>&nbsp;<td align=right>1224<td>&nbsp;<td align=right>792<td>&nbsp;<td>11&times;17in landscape
  2303. <tr> <td>legal
  2304. <td>&nbsp;<td align=right>8.5<td>&nbsp;<td align=right>14.0<td>&nbsp;<td align=right>21.6<td>&nbsp;<td align=right>35.6<td>&nbsp;<td align=right>612<td>&nbsp;<td align=right>1008<td>&nbsp;<td>&nbsp;
  2305. <tr> <td>letter
  2306. <td>&nbsp;<td align=right>8.5<td>&nbsp;<td align=right>11.0<td>&nbsp;<td align=right>21.6<td>&nbsp;<td align=right>27.9<td>&nbsp;<td align=right>612<td>&nbsp;<td align=right>792<td>&nbsp;<td>&nbsp;
  2307. <tr> <td>lettersmall
  2308. <td>&nbsp;<td align=right>8.5<td>&nbsp;<td align=right>11.0<td>&nbsp;<td align=right>21.6<td>&nbsp;<td align=right>27.9<td>&nbsp;<td align=right>612<td>&nbsp;<td align=right>792<td>&nbsp;<td>&nbsp;
  2309. <tr> <td>archE
  2310. <td>&nbsp;<td align=right>36.0<td>&nbsp;<td align=right>48.0<td>&nbsp;<td align=right>91.4<td>&nbsp;<td align=right>121.9<td>&nbsp;<td align=right>2592<td>&nbsp;<td align=right>3456<td>&nbsp;<td>&nbsp;
  2311. <tr> <td>archD
  2312. <td>&nbsp;<td align=right>24.0<td>&nbsp;<td align=right>36.0<td>&nbsp;<td align=right>61.0<td>&nbsp;<td align=right>91.4<td>&nbsp;<td align=right>1728<td>&nbsp;<td align=right>2592<td>&nbsp;<td>&nbsp;
  2313. <tr> <td>archC
  2314. <td>&nbsp;<td align=right>18.0<td>&nbsp;<td align=right>24.0<td>&nbsp;<td align=right>45.7<td>&nbsp;<td align=right>61.0<td>&nbsp;<td align=right>1296<td>&nbsp;<td align=right>1728<td>&nbsp;<td>&nbsp;
  2315. <tr> <td>archB
  2316. <td>&nbsp;<td align=right>12.0<td>&nbsp;<td align=right>18.0<td>&nbsp;<td align=right>30.5<td>&nbsp;<td align=right>45.7<td>&nbsp;<td align=right>864<td>&nbsp;<td align=right>1296<td>&nbsp;<td>&nbsp;
  2317. <tr> <td>archA
  2318. <td>&nbsp;<td align=right>9.0<td>&nbsp;<td align=right>12.0<td>&nbsp;<td align=right>22.9<td>&nbsp;<td align=right>30.5<td>&nbsp;<td align=right>648<td>&nbsp;<td align=right>864<td>&nbsp;<td>&nbsp;
  2319. <tr> <td colspan=13><hr>
  2320. <tr><th colspan=13>ISO standard
  2321. <tr> <td colspan=13><hr>
  2322. <tr> <td>a0
  2323. <td>&nbsp;<td align=right>33.1<td>&nbsp;<td align=right>46.8<td>&nbsp;<td align=right>84.0<td>&nbsp;<td align=right>118.8<td>&nbsp;<td align=right>2380<td>&nbsp;<td align=right>3368<td>&nbsp;<td>&nbsp;
  2324. <tr> <td>a1
  2325. <td>&nbsp;<td align=right>23.4<td>&nbsp;<td align=right>33.1<td>&nbsp;<td align=right>59.4<td>&nbsp;<td align=right>84.0<td>&nbsp;<td align=right>1684<td>&nbsp;<td align=right>2380<td>&nbsp;<td>&nbsp;
  2326. <tr> <td>a2
  2327. <td>&nbsp;<td align=right>16.5<td>&nbsp;<td align=right>23.4<td>&nbsp;<td align=right>42.0<td>&nbsp;<td align=right>59.4<td>&nbsp;<td align=right>1190<td>&nbsp;<td align=right>1684<td>&nbsp;<td>&nbsp;
  2328. <tr> <td>a3
  2329. <td>&nbsp;<td align=right>11.7<td>&nbsp;<td align=right>16.5<td>&nbsp;<td align=right>29.7<td>&nbsp;<td align=right>42.0<td>&nbsp;<td align=right>842<td>&nbsp;<td align=right>1190<td>&nbsp;<td>&nbsp;
  2330. <tr> <td>a4
  2331. <td>&nbsp;<td align=right>8.3<td>&nbsp;<td align=right>11.7<td>&nbsp;<td align=right>21.0<td>&nbsp;<td align=right>29.7<td>&nbsp;<td align=right>595<td>&nbsp;<td align=right>842<td>&nbsp;<td>&nbsp;
  2332. <tr> <td>a4small
  2333. <td>&nbsp;<td align=right>8.3<td>&nbsp;<td align=right>11.7<td>&nbsp;<td align=right>21.0<td>&nbsp;<td align=right>29.7<td>&nbsp;<td align=right>595<td>&nbsp;<td align=right>842<td>&nbsp;<td>&nbsp;
  2334. <tr> <td>a5
  2335. <td>&nbsp;<td align=right>5.8<td>&nbsp;<td align=right>8.3<td>&nbsp;<td align=right>14.9<td>&nbsp;<td align=right>21.0<td>&nbsp;<td align=right>421<td>&nbsp;<td align=right>595<td>&nbsp;<td>&nbsp;
  2336. <tr> <td>a6
  2337. <td>&nbsp;<td align=right>4.1<td>&nbsp;<td align=right>5.8<td>&nbsp;<td align=right>10.5<td>&nbsp;<td align=right>14.9<td>&nbsp;<td align=right>297<td>&nbsp;<td align=right>421<td>&nbsp;<td>&nbsp;
  2338. <tr> <td>a7
  2339. <td>&nbsp;<td align=right>2.9<td>&nbsp;<td align=right>4.1<td>&nbsp;<td align=right>7.4<td>&nbsp;<td align=right>10.5<td>&nbsp;<td align=right>210<td>&nbsp;<td align=right>297<td>&nbsp;<td>&nbsp;
  2340. <tr> <td>a8
  2341. <td>&nbsp;<td align=right>2.1<td>&nbsp;<td align=right>2.9<td>&nbsp;<td align=right>5.2<td>&nbsp;<td align=right>7.4<td>&nbsp;<td align=right>148<td>&nbsp;<td align=right>210<td>&nbsp;<td>&nbsp;
  2342. <tr> <td>a9
  2343. <td>&nbsp;<td align=right>1.5<td>&nbsp;<td align=right>2.1<td>&nbsp;<td align=right>3.7<td>&nbsp;<td align=right>5.2<td>&nbsp;<td align=right>105<td>&nbsp;<td align=right>148<td>&nbsp;<td>&nbsp;
  2344. <tr> <td>a10
  2345. <td>&nbsp;<td align=right>1.0<td>&nbsp;<td align=right>1.5<td>&nbsp;<td align=right>2.6<td>&nbsp;<td align=right>3.7<td>&nbsp;<td align=right>74<td>&nbsp;<td align=right>105<td>&nbsp;<td>&nbsp;
  2346. <tr> <td>isob0
  2347. <td>&nbsp;<td align=right>39.4<td>&nbsp;<td align=right>55.7<td>&nbsp;<td align=right>100.0<td>&nbsp;<td align=right>141.4<td>&nbsp;<td align=right>2836<td>&nbsp;<td align=right>4008<td>&nbsp;<td>&nbsp;
  2348. <tr> <td>isob1
  2349. <td>&nbsp;<td align=right>27.8<td>&nbsp;<td align=right>39.4<td>&nbsp;<td align=right>70.7<td>&nbsp;<td align=right>100.0<td>&nbsp;<td align=right>2004<td>&nbsp;<td align=right>2836<td>&nbsp;<td>&nbsp;
  2350. <tr> <td>isob2
  2351. <td>&nbsp;<td align=right>19.7<td>&nbsp;<td align=right>27.8<td>&nbsp;<td align=right>50.0<td>&nbsp;<td align=right>70.7<td>&nbsp;<td align=right>1418<td>&nbsp;<td align=right>2004<td>&nbsp;<td>&nbsp;
  2352. <tr> <td>isob3
  2353. <td>&nbsp;<td align=right>13.9<td>&nbsp;<td align=right>19.7<td>&nbsp;<td align=right>35.3<td>&nbsp;<td align=right>50.0<td>&nbsp;<td align=right>1002<td>&nbsp;<td align=right>1418<td>&nbsp;<td>&nbsp;
  2354. <tr> <td>isob4
  2355. <td>&nbsp;<td align=right>9.8<td>&nbsp;<td align=right>13.9<td>&nbsp;<td align=right>25.0<td>&nbsp;<td align=right>35.3<td>&nbsp;<td align=right>709<td>&nbsp;<td align=right>1002<td>&nbsp;<td>&nbsp;
  2356. <tr> <td>isob5
  2357. <td>&nbsp;<td align=right>7.0<td>&nbsp;<td align=right>9.8<td>&nbsp;<td align=right>17.7<td>&nbsp;<td align=right>25.0<td>&nbsp;<td align=right>501<td>&nbsp;<td align=right>709<td>&nbsp;<td>&nbsp;
  2358. <tr> <td>c0
  2359. <td>&nbsp;<td align=right>36.1<td>&nbsp;<td align=right>51.1<td>&nbsp;<td align=right>91.7<td>&nbsp;<td align=right>129.7<td>&nbsp;<td align=right>2600<td>&nbsp;<td align=right>3677<td>&nbsp;<td>&nbsp;
  2360. <tr> <td>c1
  2361. <td>&nbsp;<td align=right>25.5<td>&nbsp;<td align=right>36.1<td>&nbsp;<td align=right>64.8<td>&nbsp;<td align=right>91.7<td>&nbsp;<td align=right>1837<td>&nbsp;<td align=right>2600<td>&nbsp;<td>&nbsp;
  2362. <tr> <td>c2
  2363. <td>&nbsp;<td align=right>18.0<td>&nbsp;<td align=right>25.5<td>&nbsp;<td align=right>45.8<td>&nbsp;<td align=right>64.8<td>&nbsp;<td align=right>1298<td>&nbsp;<td align=right>1837<td>&nbsp;<td>&nbsp;
  2364. <tr> <td>c3
  2365. <td>&nbsp;<td align=right>12.8<td>&nbsp;<td align=right>18.0<td>&nbsp;<td align=right>32.4<td>&nbsp;<td align=right>45.8<td>&nbsp;<td align=right>918<td>&nbsp;<td align=right>1298<td>&nbsp;<td>&nbsp;
  2366. <tr> <td>c4
  2367. <td>&nbsp;<td align=right>9.0<td>&nbsp;<td align=right>12.8<td>&nbsp;<td align=right>22.9<td>&nbsp;<td align=right>32.4<td>&nbsp;<td align=right>649<td>&nbsp;<td align=right>918<td>&nbsp;<td>&nbsp;
  2368. <tr> <td>c5
  2369. <td>&nbsp;<td align=right>6.4<td>&nbsp;<td align=right>9.0<td>&nbsp;<td align=right>16.2<td>&nbsp;<td align=right>22.9<td>&nbsp;<td align=right>459<td>&nbsp;<td align=right>649<td>&nbsp;<td>&nbsp;
  2370. <tr> <td>c6
  2371. <td>&nbsp;<td align=right>4.5<td>&nbsp;<td align=right>6.4<td>&nbsp;<td align=right>11.4<td>&nbsp;<td align=right>16.2<td>&nbsp;<td align=right>323<td>&nbsp;<td align=right>459<td>&nbsp;<td>&nbsp;
  2372. <tr> <td colspan=13><hr>
  2373. <tr><th colspan=13>JIS standard
  2374. <tr> <td colspan=13><hr>
  2375. <tr> <td>jisb0
  2376. <td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td align=right>103.0<td>&nbsp;<td align=right>145.6<td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td>&nbsp;
  2377. <tr> <td>jisb1
  2378. <td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td align=right>72.8<td>&nbsp;<td align=right>103.0<td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td>&nbsp;
  2379. <tr> <td>jisb2
  2380. <td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td align=right>51.5<td>&nbsp;<td align=right>72.8<td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td>&nbsp;
  2381. <tr> <td>jisb3
  2382. <td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td align=right>36.4<td>&nbsp;<td align=right>51.5<td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td>&nbsp;
  2383. <tr> <td>jisb4
  2384. <td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td align=right>25.7<td>&nbsp;<td align=right>36.4<td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td>&nbsp;
  2385. <tr> <td>jisb5
  2386. <td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td align=right>18.2<td>&nbsp;<td align=right>25.7<td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td>&nbsp;
  2387. <tr> <td>jisb6
  2388. <td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td align=right>12.8<td>&nbsp;<td align=right>18.2<td>&nbsp;<td align=right><td>&nbsp;<td align=right><td>&nbsp;<td>&nbsp;
  2389. <tr> <td colspan=13><hr>
  2390. <tr><th colspan=13>ISO/JIS switchable
  2391. <tr> <td colspan=13><hr>
  2392. <tr> <td>b0 (see * below)
  2393. <tr> <td>b1 (see * below)
  2394. <tr> <td>b2 (see * below)
  2395. <tr> <td>b3 (see * below)
  2396. <tr> <td>b4 (see * below)
  2397. <tr> <td>b5 (see * below)
  2398. <tr> <td colspan=13><hr>
  2399. <tr><th colspan=13>Other
  2400. <tr> <td colspan=13><hr>
  2401. <tr> <td>flsa
  2402. <td>&nbsp;<td align=right>8.5<td>&nbsp;<td align=right>13.0<td>&nbsp;<td align=right>21.6<td>&nbsp;<td align=right>33.0<td>&nbsp;<td align=right>612<td>&nbsp;<td align=right>936<td>&nbsp;<td>U.S. foolscap
  2403. <tr> <td>flse
  2404. <td>&nbsp;<td align=right>8.5<td>&nbsp;<td align=right>13.0<td>&nbsp;<td align=right>21.6<td>&nbsp;<td align=right>33.0<td>&nbsp;<td align=right>612<td>&nbsp;<td align=right>936<td>&nbsp;<td>European foolscap
  2405. <tr> <td>halfletter
  2406. <td>&nbsp;<td align=right>5.5<td>&nbsp;<td align=right>8.5<td>&nbsp;<td align=right>14.0<td>&nbsp;<td align=right>21.6<td>&nbsp;<td align=right>396<td>&nbsp;<td align=right>612<td>&nbsp;<td>&nbsp;
  2407. </table>
  2408. <p>
  2409. *<em>Note:</em> Initially the B paper sizes are the ISO sizes, e.g.,
  2410. <b><tt>b0</tt></b> is the same as <b><tt>isob0</tt></b>. Running the file
  2411. <b><tt>lib/jispaper.ps</tt></b> makes the B paper sizes be the JIS sizes,
  2412. e.g., <b><tt>b0</tt></b> becomes the same as <b><tt>jisb0</tt></b>.
  2413. <hr>
  2414. <h2><a name="X_font_mappings"></a>Appendix: X default font mappings</h2>
  2415. <h3><a name="Standard_X_server_fonts"></a>Standard X servers</h3>
  2416. <h4><a name="X_regular_fonts"></a>Regular fonts</h4>
  2417. <pre> AvantGarde-Book: -Adobe-ITC Avant Garde Gothic-Book-R-Normal--\n\
  2418. AvantGarde-BookOblique: -Adobe-ITC Avant Garde Gothic-Book-O-Normal--\n\
  2419. AvantGarde-Demi: -Adobe-ITC Avant Garde Gothic-Demi-R-Normal--\n\
  2420. AvantGarde-DemiOblique: -Adobe-ITC Avant Garde Gothic-Demi-O-Normal--\n\
  2421. Bookman-Demi: -Adobe-ITC Bookman-Demi-R-Normal--\n\
  2422. Bookman-DemiItalic: -Adobe-ITC Bookman-Demi-I-Normal--\n\
  2423. Bookman-Light: -Adobe-ITC Bookman-Light-R-Normal--\n\
  2424. Bookman-LightItalic: -Adobe-ITC Bookman-Light-I-Normal--\n\
  2425. Courier: -Adobe-Courier-Medium-R-Normal--\n\
  2426. Courier-Bold: -Adobe-Courier-Bold-R-Normal--\n\
  2427. Courier-BoldOblique: -Adobe-Courier-Bold-O-Normal--\n\
  2428. Courier-Oblique: -Adobe-Courier-Medium-O-Normal--\n\
  2429. Helvetica: -Adobe-Helvetica-Medium-R-Normal--\n\
  2430. Helvetica-Bold: -Adobe-Helvetica-Bold-R-Normal--\n\
  2431. Helvetica-BoldOblique: -Adobe-Helvetica-Bold-O-Normal--\n\
  2432. Helvetica-Narrow: -Adobe-Helvetica-Medium-R-Narrow--\n\
  2433. Helvetica-Narrow-Bold: -Adobe-Helvetica-Bold-R-Narrow--\n\
  2434. Helvetica-Narrow-BoldOblique: -Adobe-Helvetica-Bold-O-Narrow--\n\
  2435. Helvetica-Narrow-Oblique: -Adobe-Helvetica-Medium-O-Narrow--\n\
  2436. Helvetica-Oblique: -Adobe-Helvetica-Medium-O-Normal--\n\
  2437. NewCenturySchlbk-Bold: -Adobe-New Century Schoolbook-Bold-R-Normal--\n\
  2438. NewCenturySchlbk-BoldItalic: -Adobe-New Century Schoolbook-Bold-I-Normal--\n\
  2439. NewCenturySchlbk-Italic: -Adobe-New Century Schoolbook-Medium-I-Normal--\n\
  2440. NewCenturySchlbk-Roman: -Adobe-New Century Schoolbook-Medium-R-Normal--\n\
  2441. Palatino-Bold: -Adobe-Palatino-Bold-R-Normal--\n\
  2442. Palatino-BoldItalic: -Adobe-Palatino-Bold-I-Normal--\n\
  2443. Palatino-Italic: -Adobe-Palatino-Medium-I-Normal--\n\
  2444. Palatino-Roman: -Adobe-Palatino-Medium-R-Normal--\n\
  2445. Times-Bold: -Adobe-Times-Bold-R-Normal--\n\
  2446. Times-BoldItalic: -Adobe-Times-Bold-I-Normal--\n\
  2447. Times-Italic: -Adobe-Times-Medium-I-Normal--\n\
  2448. Times-Roman: -Adobe-Times-Medium-R-Normal--\n\
  2449. ZapfChancery-MediumItalic: -Adobe-ITC Zapf Chancery-Medium-I-Normal--
  2450. </pre>
  2451. <h4><a name="X_symbol_fonts"></a>Symbol fonts</h4>
  2452. <pre> Symbol: -Adobe-Symbol-Medium-R-Normal--
  2453. </pre>
  2454. <h4><a name="X_dingbat_fonts"></a>Dingbat fonts</h4>
  2455. <pre> ZapfDingbats: -Adobe-ITC Zapf Dingbats-Medium-R-Normal--
  2456. </pre>
  2457. <h3><a name="OpenWindows_fonts"></a>Sun OpenWindows</h3>
  2458. <p>
  2459. For Sun's X11/NeWS one can use the OpenWindows scalable fonts instead,
  2460. which gives good output for any point size. In this environment, the
  2461. relevant section of the resource file should look like this:
  2462. <pre>Ghostscript.regularFonts: \
  2463. AvantGarde-Book: -itc-avantgarde-book-r-normal-- \n\
  2464. AvantGarde-BookOblique: -itc-avantgarde-book-o-normal-- \n\
  2465. AvantGarde-Demi: -itc-avantgarde-demi-r-normal-- \n\
  2466. AvantGarde-DemiOblique: -itc-avantgarde-demi-o-normal-- \n\
  2467. Bembo: -monotype-bembo-medium-r-normal-- \n\
  2468. Bembo-Bold: -monotype-bembo-bold-r-normal-- \n\
  2469. Bembo-BoldItalic: -monotype-bembo-bold-i-normal-- \n\
  2470. Bembo-Italic: -monotype-bembo-medium-i-normal-- \n\
  2471. Bookman-Demi: -itc-bookman-demi-r-normal-- \n\
  2472. Bookman-DemiItalic: -itc-bookman-demi-i-normal-- \n\
  2473. Bookman-Light: -itc-bookman-light-r-normal-- \n\
  2474. Bookman-LightItalic: -itc-bookman-light-i-normal-- \n\
  2475. Courier: -itc-courier-medium-r-normal-- \n\
  2476. Courier-Bold: -itc-courier-bold-r-normal-- \n\
  2477. Courier-BoldOblique: -itc-courier-bold-o-normal-- \n\
  2478. Courier-Oblique: -itc-courier-medium-o-normal-- \n\
  2479. GillSans: -monotype-gill-medium-r-normal-sans- \n\
  2480. GillSans-Bold: -monotype-gill-bold-r-normal-sans- \n\
  2481. GillSans-BoldItalic: -monotype-gill-bold-i-normal-sans- \n\
  2482. GillSans-Italic: -monotype-gill-normal-i-normal-sans- \n\
  2483. Helvetica: -linotype-helvetica-medium-r-normal-- \n\
  2484. Helvetica-Bold: -linotype-helvetica-bold-r-normal-- \n\
  2485. Helvetica-BoldOblique: -linotype-helvetica-bold-o-normal-- \n\
  2486. Helvetica-Narrow: -linotype-helvetica-medium-r-narrow-- \n\
  2487. Helvetica-Narrow-Bold: -linotype-helvetica-bold-r-narrow-- \n\
  2488. Helvetica-Narrow-BoldOblique: -linotype-helvetica-bold-o-narrow-- \n\
  2489. Helvetica-Narrow-Oblique: -linotype-helvetica-medium-o-narrow-- \n\
  2490. Helvetica-Oblique: -linotype-helvetica-medium-o-normal-- \n\
  2491. LucidaBright: -b&amp;h-lucidabright-medium-r-normal-- \n\
  2492. LucidaBright-Demi: -b&amp;h-lucidabright-demibold-r-normal-- \n\
  2493. LucidaBright-DemiItalic: -b&amp;h-lucidabright-demibold-i-normal-- \n\
  2494. LucidaBright-Italic: -b&amp;h-lucidabright-medium-i-normal-- \n\
  2495. LucidaSans: -b&amp;h-lucida-medium-r-normal-sans- \n\
  2496. LucidaSans-Bold: -b&amp;h-lucida-bold-r-normal-sans- \n\
  2497. LucidaSans-BoldItalic: -b&amp;h-lucida-bold-i-normal-sans- \n\
  2498. LucidaSans-Italic: -b&amp;h-lucida-medium-i-normal-sans- \n\
  2499. LucidaSans-Typewriter: -b&amp;h-lucidatypewriter-medium-r-normal-sans- \n\
  2500. LucidaSans-TypewriterBold: -b&amp;h-lucidatypewriter-bold-r-normal-sans- \n\
  2501. NewCenturySchlbk-BoldItalic: -linotype-new century schoolbook-bold-i-normal-- \n\
  2502. NewCenturySchlbk-Bold: -linotype-new century schoolbook-bold-r-normal-- \n\
  2503. NewCenturySchlbk-Italic: -linotype-new century schoolbook-medium-i-normal-- \n\
  2504. NewCenturySchlbk-Roman: -linotype-new century schoolbook-medium-r-normal-- \n\
  2505. Palatino-Bold: -linotype-palatino-bold-r-normal-- \n\
  2506. Palatino-BoldItalic: -linotype-palatino-bold-i-normal-- \n\
  2507. Palatino-Italic: -linotype-palatino-medium-i-normal-- \n\
  2508. Palatino-Roman: -linotype-palatino-medium-r-normal-- \n\
  2509. Rockwell: -monotype-rockwell-medium-r-normal-- \n\
  2510. Rockwell-Bold: -monotype-rockwell-bold-r-normal-- \n\
  2511. Rockwell-BoldItalic: -monotype-rockwell-bold-i-normal-- \n\
  2512. Rockwell-Italic: -monotype-rockwell-medium-i-normal-- \n\
  2513. Times-Bold: -linotype-times-bold-r-normal-- \n\
  2514. Times-BoldItalic: -linotype-times-bold-i-normal-- \n\
  2515. Times-Italic: -linotype-times-medium-i-normal-- \n\
  2516. Times-Roman: -linotype-times-medium-r-normal-- \n\
  2517. Utopia-Bold: -adobe-utopia-bold-r-normal-- \n\
  2518. Utopia-BoldItalic: -adobe-utopia-bold-i-normal-- \n\
  2519. Utopia-Italic: -adobe-utopia-regular-i-normal-- \n\
  2520. Utopia-Regular: -adobe-utopia-regular-r-normal-- \n\
  2521. ZapfChancery-MediumItalic: -itc-zapfchancery-medium-i-normal-- \n
  2522. Ghostscript.dingbatFonts: \
  2523. ZapfDingbats: -itc-zapfdingbats-medium-r-normal--
  2524. Ghostscript.symbolFonts: \
  2525. Symbol: --symbol-medium-r-normal--
  2526. </pre>
  2527. <!-- [2.0 end contents] ==================================================== -->
  2528. <!-- [3.0 begin visible trailer] =========================================== -->
  2529. <hr>
  2530. <p>
  2531. <small>Copyright &copy; 1996, 2000 Aladdin Enterprises. All rights
  2532. reserved.</small>
  2533. <p>
  2534. <small>This file is part of AFPL Ghostscript. See the
  2535. <a href="Public.htm">Aladdin Free Public License</a> (the "License") for
  2536. full details of the terms of using, copying, modifying, and redistributing
  2537. AFPL Ghostscript.</small>
  2538. <p>
  2539. <small>Ghostscript version 7.04, 31 January 2002
  2540. <!-- [3.0 end visible trailer] ============================================= -->
  2541. </body>
  2542. </html>