GhostPCL is PCLTM technology; it is not intended to be a finished software application but a collection of software components that will ultimately be included in a software application or a real time embedded system. Generally the GhostPCL languages are compliant with the Genoa (now QualityLogic) Functional Test Suite and the Genoa Application Test suite. Also each language should run the corresponding Genoa Comprehensive Evaluation Test (CET) without egregious errors.
In this document and the software PCL6 refers to technology that supports both PCL5TM and PCLXLTM languages.
1. If tar 'z' option is not supported: gunzip ghostpcl-xxx.tar.gz;
tar xvf ghostpcl-xxx.tar.
2. See #Fonts
to configure this differently..
For Windows use:
pkunzip -d <archive_name>
For Unix use:
gunzip <archive_name.gz>
tar xvf <archive_name>
or
Some versions of tar can uncompress the archive as well:
tar zxvf <archive_name.gz>
After unpacking the resulting directory hierarchy should look like this:
pcl | pcl interpreter |
pl | pxl and pcl common library |
common | pcl and pxl shared makefiles |
tools | miscellaneous tools |
gs | Ghostscript Graphics Library |
gs/jpeg | JPEG library |
gs/libpng | Portable network graphics library |
gs/zlib | compression library |
pxl | XL interpreter |
main | main makefile and build directory |
This directory structure is the default, but the directories can be rearranged with minor modifications to the makefiles.
This will build both the PCL and XL language and supporting language
switching code.
Note:
Dos hackers can start up a dos window, set the DEVSTUDIO environment
variable, and use the same make commands as above (the DEVSTUDIO variable
should be set to the top level of the Microsoft Developer Studio, e.g.
set DEVSTUDIO=c:\progra~1\devstu~1")
or
NMAKE /f pcl6_msvc.mak DEBUG=1 DEVSTUDIO=c:\progra~1\micros~3
make -f pcl6_gcc.mak CC_=cc CCLD=cc \
CCAUX=cc CFLAGS=-g CC_NO_WARN=cc GCFLAGS=
If you intend to do development using the software a dedicated makefile should be constructed.
The following make targets are available:
PCL or PCL-XL can be built together in a language switching environment
or each can be built alone with the supporting PJL interpreter. The
simplest way to implement one language is simply to remove the unwanted
implementation from the pdl implementation table located in pl/plimpl.c:
For example, this is the default table with two implementations: PCL and XL.
/* Zero-terminated list of pointers to implementations
*/
pl_interp_implementation_t const * const pdl_implementation[]
= {
&pcl_implementation,
&pxl_implementation,
0
};
If you only wish to use the pcl interpreter use the following table:
/* Zero-terminated list of pointers to implementations
*/
pl_interp_implementation_t const * const pdl_implementation[]
= {
&pcl_implementation,
0
};
All options supplied to the interpreter in the following examples are described in the Ghostscript documentation. (local)
pcl6 -sDEVICE=x11 mypcl.pcl
interpret a pcl file called mypcl.pcl and render to the x11 device.
pcl6 -sDEVICE=ljet4 -sOutputFile="| lpr" -dNOPAUSE mypcl.pcl
interpret mypcl.pcl and send the Laserjet 4 formatted output to the command lpr, lpr should then send it to a real printer. Note this is for unix systems.
pcl6 -sDEVICE=pcxcmyk -sOutputFile="pcxpage.%d" -dNOPAUSE mypcl.pcl
interpret mypcl.pcl and generate CMYK output. Pages are to be put in files named pcxpage.1, pcxpage.2, pcxpage.3, etc.
pcl6 -r72 -sDEVICE=x11mono mypcl.pcl -r100 -sDEVICE=x11 mypcl.pcl
render a pcl file at 72dpi on the monochrome X11 device, then render the same file at 100 dpi on color X11 device. This demonstrates on-the-fly device switching.
pcl6
simply running the interpreter should generate some useful information
about the available options and devices.
The PCL emulation comes in three flavors: PCL5E, PCL5C, and RTL.
The PCL5E personality thresholds colors to black and white irrespective
of the color parameters of the output device. PCL5C is the color
personality, used with a monochrome device it will grayscale colors.
The RTL personality can be used to print HPGL/2 RTL plot files.
pcl6 -PRTL myrtl.rtl
run the interpreter with the rtl personality.
pcl6 -PPCL5E -sDEVICE=ljet4 mypcl.pcl
run the interpreter with the pcl5e personality. This will threshold colors to black and white (ljet4 is a 1 bit device).
pcl6 -PPCL5C -sDEVICE=ljet4 mypcl.pcl
run the interpreter with the pcl5c personality. This will grayscale colors on the 1 bit output device.
If not set on the command line the pcl interpreter personality will be set to PCL5E if the output device is 1 bit per pixel otherwise it is set to PCL5C. RTL must be explicitly set on the command line. RTL always grayscales and never thresholds colors to black and white.
Fonts from a third-party vendor such as Agfa or Bitstream may also be used. There is an existing interface for hooking in the AGFA Universal Font Scaler Technology, several Artifex customers currently use this solution. The software can use Hewlett Packard FONTSMART version 1.5 or Windows TrueType fonts, using either of these font solutions require minor PCL code modifications.
A frequently asked question file is under construction here.
Please send comments about this documentation to bug-pcl@ghostscript.com .