CONFIGURING GHOSTSCRIPT

Top  Previous  Next

Ghostscript is a program used to convert Postscript and PDF documents to image formats.  Modern versions (starting with 9.06) can also be used to extract text data from PDF documents.  Whenever image output is needed, or text extraction is used such as with AFO, UnForm can internally execute Ghostscript to perform the required function.

 

If Ghostscript is not already installed on your system, you can use your system's package management tools to install it (ufsetup.sh will offer this option), or you can obtain it from http://ghostscript.com.  You can easily verify if Ghostscript is on a Linux system by running 'gs -version'.

 

Ghostscript is configured in the [drivers] section of uf100d.ini.  You can edit this file manually, or use the Server Manager's configuration option to configure the Ghostscript executable path.

 

The [drivers] section includes several options, plus a series of "drivers" that associate a driver name with a Ghostscript output format.

 

gs=path to define the executable name for the Ghostscript executable on the server.  On Linux systems, this is often just set to "gs" (i.e. gs=gs), because the "gs" command is found in a universal path like /usr/bin/gs.  On Windows, the path will be found in Program Files or Program Files (x86), and the executable name is gswin32.exe or gswin64.exe (or you can use the "console" versions gswin32c.exe or gswin64c.exe).
 
pdffitpage=0|1 is used to specify if Ghostscript is of a level that supports the PDFFitPage option, which can be used to improve performance of some UnForm jobs.  This feature was added to GhostScript at 8.10, so only very old versions will not support it.
 
gpcl=path defines a path to a GhostPCL executable, such as /usr/bin/ghostpcl, or c:\ghostpcl\gpcl6win64.exe.  This is used by the Design Tool when performing test printing to a PCL output format, when viewed in the browser window.  GhostPCL is used to convert UnForm's PCL output to PDF.
 
labelary=1 enables use of the labelary.com web service when previewing Zebra (ZPL) labels in the Design Tool.  See that site for information about usage limits.
 
Other entries are simply name=device,multipage,dpi, where name is the UnForm driver name, device is the –sDEVICE name used by Ghostscript, multipage is a 0 or 1, where 1 means the output is multi-page=multi-file and 0 means all pages go to a single file, and dpi is the dots-per-inch resolution.

 

Note that the use of multi- or single-page output is often dependent on the image format.  For example, bmp files do not support multiple pages per file, while tiff files do.  Below is a sample [drivers] section.  In most cases, the only configuration required is setting the gs= path.

 

Note also that if you can't locate a suitable Ghostscript version for your Unix system, you can use the Windows Support Server to execute a Windows Ghostscript for jobs that require it.

 

 

[drivers]

# enable Ghostscript drivers by uncommenting the gs= line

gs=gs

# windows would typically need a full path

# gs=c:\gs\gs9.xx\bin\gswin32c.exe

pdffitpage=1

# driver lines are structured as name=gsdevice,multipage,density

# gsdevice is the Ghostscript sDEVICE value

# multipage is Boolean 0 or 1, 1 means -o file is file<page>.ext

#    Many formats require a 1, as the image format supports only a

#    single image per file.

# density is output density, as hhh[xvvv] (horizontalxvertical) dpi

 

bmp=bmp256,1,300

bmpmono=bmpmono,1,300

tif=tiffcrle,0,300

tifmono=tiffg3,0,300

png=png256,1,300

pngmono=pngmono,1,300

jpeg=jpeg,1,300

ps=pswrite,0,300

eps=epswrite,1,300

deskjet=deskjet,0,300

pcl6=pxlmono,0,300

pcl6c=pxlcolor,0,300