Home
Main website
Display Sidebar
Hide Ads
Recent Changes
View Source:
gs(1)
Edit
PageHistory
Diff
Info
LikePages
GS !!!GS NAME SYNOPSIS DESCRIPTION INITIALIZATION FILES X RESOURCES SWITCHES SPECIAL NAMES FILES ENVIRONMENT SEE ALSO BUGS VERSION AUTHOR ---- !!NAME gs - Ghostscript (!PostScript and PDF language interpreter and previewer) !!SYNOPSIS __gs__ [[ ''options'' ] [[ ''files'' ] ... __(Unix, VMS) gswin32__ [[ ''options'' ] [[ ''files'' ] ... __(MS Windows) gswin32c__ [[ ''options'' ] [[ ''files'' ] ... __(MS Windows) gs386__ [[ ''options'' ] [[ ''files'' ] ... __(DOS for PC) gsos2__ [[ ''options'' ] [[ ''files'' ] ... __(OS/2)__ !!DESCRIPTION The __gs__ (__gswin32__, __gswin32c__, __gs386__, __gsos2__) command invokes __Ghostscript__, an interpreter of Adobe Systems' __!PostScript__(tm) and __Portable Document Format__ (PDF) languages. __gs__ reads __ The interpreter recognizes several switches described below, which may appear anywhere in the command line and apply to all files thereafter. Invoking Ghostscript with the __-h__ or __-?__ switch produces a message which shows several useful switches, all the devices known to that executable, and the search path for fonts; on Unix it also shows the location of detailed documentation. Ghostscript may be built able to use many different output devices. To see which devices your executable can use, run gs -h__ __ gs myfile.ps You can also check the set of available devices from within Ghostscript: invoke Ghostscript and type devicenames == but the first device on the resulting list may not be the default device you determine with gs -h____ -sDEVICE=!AbcXyz For example, for output to an Epson printer you might use the command gs -sDEVICE=epson myfile.ps The (epson) selectdevice (myfile.ps) run All output then goes to the printer until you select another device with the (vga) selectdevice or (x11) selectdevice Finally, you can specify a default device in the environment variable __GS_DEVICE__. The order of precedence for these alternatives from highest to lowest (Ghostscript uses the device defined highest in the list) is: selectdevice (command line) GS_DEVICE (first device in build list) Some printers can print at different resolutions (densities). To specify the resolution on such a printer, use the gs -sDEVICE= For example, on a 9-pin Epson-compatible printer, you get the lowest-density (fastest) mode with gs -sDEVICE=epson -r60x72 and the highest-density (best output quality) mode with gs -sDEVICE=epson -r240x72. If you select a printer as the output device, Ghostscript also allows you to choose where Ghostscript sends the output -- on Unix systems, usually to a temporary file. To send the output to a file -sOutputFile=foo.xyz You might want to print each page separately. To do this, send the output to a series of files -sOutputFile=foo%d.xyz Each resulting file receives one page of output, and the files are numbered in sequence. On Unix systems you can also send output to a pipe. For example, to pipe output to the lpr__ __ -sOutputFile=|lpr You can also send output to standard output for piping with the switch -sOutputFile=- In this case you must also use the __-q__ switch, to prevent Ghostscript from writing messages to standard output. To select a specific paper size, use the command line switch -sPAPERSIZE=a_known_paper_size for instance -sPAPERSIZE=a4 or -sPAPERSIZE=legal At this time, the known paper sizes, defined in the initialization file Note that the B paper sizes are ISO sizes: for information about using JIS B sizes, see __Use.htm__. Ghostscript can do many things other than print or view !PostScript and PDF files. For example, if you want to know the bounding box of a !PostScript (or EPS) file, Ghostscript provides a special gs -sDEVICE=bbox myfile.ps For example, using one of the example files distributed with Ghostscript, gs -sDEVICE=bbox golfer.ps prints out %%!BoundingBox: 0 25 583 732 %%!HiResBoundingBox: 0.808497 25.009496 582.994503 731.809445 !!INITIALIZATION FILES When looking for the initialization files 1. the directories specified by the __-I__ switches in the command line (see below), if any; 2. the directories specified by the __GS_LIB__ environment variable, if any; 3. the directories specified by the __GS_LIB_DEFAULT__ macro in the Ghostscript makefile when the executable was built. When __gs__ is built on Unix, __GS_LIB_DEFAULT__ is usually __ Each of these (__GS_LIB_DEFAULT__, __GS_LIB__, and __-I__ parameter) may be either a single directory or a list of directories separated by __ !!X RESOURCES Ghostscript looks for the following resources under the program name __borderWidth__ The border width in pixels (default = 1). __borderColor__ The name of the border color (default = black). __geometry__ The window size and placement, WxH+X+Y (default is NULL). __xResolution__ The number of x pixels per inch (default is computed from __!WidthOfScreen__ and __WidthMMOfScreen__). __yResolution__ The number of y pixels per inch (default is computed from __!HeightOfScreen__ and __HeightMMOfScreen__). __useBackingPixmap__ Determines whether backing store is to be used for saving display window (default = true). See the usage document for a more complete list of resources. To set these resources on Unix, put them in a file such as Ghostscript*geometry: 612x792-0+0 Ghostscript*xResolution: 72 Ghostscript*yResolution: 72 Then merge these resources into the X server's resource database: % xrdb -merge ~/.Xresources !!SWITCHES __--__ ''filename arg1 ...'' Takes the next argument as a file name as usual, but takes all remaining arguments (even if they have the syntactic form of switches) and defines the name before__ running the file. When Ghostscript finishes executing the file, it exits back to the shell. __-D__''name''__=__''token'' __-d__''name''__=__''token'' Define a name in __-D__''name'' __-d__''name'' Define a name in __-S__''name''__=__''string'' __-s__''name''__=__''string'' Define a name in -d__. For example, __-dname=35__ is equivalent to the program fragment /name 35 def whereas __-sname=35__ is equivalent to /name (35) def __-q__ Quiet startup: suppress normal startup messages, and also do the equivalent of __-dQUIET__. __-g__''number1''__x__''number2'' Equivalent to __-dDEVICEWIDTH=__''number1'' and __-dDEVICEHEIGHT=__''number2''. This is for the benefit of devices (such as X11 windows) that require (or allow) width and height to be specified. __-r__''number'' __-r__''number1''__x__''number2'' Equivalent to __-dDEVICEXRESOLUTION=__''number1'' and __-dDEVICEYRESOLUTION=__''number2''. This is for the benefit of devices such as printers that support multiple X and Y resolutions. If only one number is given, it is used for both X and Y resolutions. __-I__''directories'' Adds the designated list of directories at the head of the search path for library files. __-__ This is not really a switch, but indicates to Ghostscript that standard input is coming from a file or a pipe and not interactively from the command line. Ghostscript reads from standard input until it reaches end-of-file, executing it like any other file, and then continues with processing the command line. When the command line has been entirely processed, Ghostscript exits rather than going into its interactive mode. Note that the normal initialization file -D__, __-d__, __-S__, or __-s__ cannot be changed (although, of course, they can be superseded by definitions in __ !!SPECIAL NAMES __-dDISKFONTS__ Causes individual character outlines to be loaded from the disk the first time they are encountered. (Normally Ghostscript loads all the character outlines when it loads a font.) This may allow loading more fonts into RAM, at the expense of slower rendering. __-dNOCACHE__ Disables character caching. Useful only for debugging. __-dNOBIND__ Disables the __-dNODISPLAY__ Suppresses the normal initialization of the output device. This may be useful when debugging. __-dNOPAUSE__ Disables the prompt and pause at the end of each page. This may be desirable for applications where another program is driving Ghostscript. __-dNOPLATFONTS__ Disables the use of fonts supplied by the underlying platform (for instance X Windows). This may be needed if the platform fonts look undesirably different from the scalable fonts. __-dSAFER__ Disables the __-dWRITESYSTEMDICT__ Leaves font2c__ and __pcharstr__, which must bypass normal !PostScript access protection. __-sDEVICE=__''device'' Selects an alternate initial output device, as described above. __-sOutputFile=__''filename'' Selects an alternate output file (or pipe) for the initial output device, as described above. !!FILES The locations of many Ghostscript run-time files are compiled into the executable when it is built. On Unix these are typically based in __/usr/local__, but this may be different on your system. Under DOS they are typically based in __C:GS__, but may be elsewhere, especially if you install Ghostscript with __GSview__. Run __gs -h__ __ __/usr/local/share/ghostscript/#.##/*__ Startup files, utilities, and basic font definitions __/usr/local/share/ghostscript/fonts/*__ More font definitions __/usr/local/share/ghostscript/#.##/examples/*__ Ghostscript demonstration files __/usr/local/share/ghostscript/#.##/doc/*__ Diverse document files !!ENVIRONMENT __GS_OPTIONS__ String of options to be processed before the command line options __GS_DEVICE__ Used to specify an output device __GS_FONTPATH__ Path names used to search for fonts __GS_LIB__ Path names for initialization files and fonts __TEMP__ Where temporary files are made !!SEE ALSO The various Ghostscript document files (above), especially __Use.htm__. !!BUGS See the Usenet news group comp.lang.postscript. !!VERSION This document was last revised for Ghostscript version 6.53. !!AUTHOR L. Peter Deutsch ----
30 pages link to
gs(1)
:
font2c(1)
GhostScript
gsftopk(1)
dvi2fax(1)
eps2eps(1)
epstopdf(1)
pbmtopsg3(1)
pic(1)
pnmtops(1)
pdf2dsc(1)
pdf2ps(1)
texutil(1)
thumbpdf(1)
ps2ascii(1)
ps2epsi(1)
ps2frag(1)
ps2pdf12(1)
ps2pdf13(1)
ps2pdf14(1)
ps2pdfwr(1)
ps2ps(1)
pstopnm(1)
Man1g
gpic(1)
dvipdf(1)
pdfopt(1)
pf2afm(1)
ps2pdf(1)
TwoLetterCommands
CreatingPDFs
This page is a man page (or other imported legacy content). We are unable to automatically determine the license status of this page.