summaryrefslogtreecommitdiff
path: root/doc/index.html
blob: 98e597d5ddd739e7684334848fe420d625f941df (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
<!doctype html public "-//w3c//dtd html 4.0 transitional//en">
<html>
<head>
   <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
   <meta name="GENERATOR" content="Mozilla/4.7 [en] (X11; I; Linux 2.2.5-15 i686) [Netscape]">
   <title>GhostPCL5e, GhostPCL5c, and GhostPXL</title>
</head>
<body text="#000000" bgcolor="#FFFFFF" link="#0000EF" vlink="#51188E" alink="#FF0000">

<h1>
<img SRC="ghost64.gif" height=64 width=56> GhostPCL5e, GhostPCL5c, and
GhostPXL</h1>

<hr>
<br>This page discusses configuration, compilation and running of the&nbsp;
PCL family of products:&nbsp; GhostPCL5E, GhostPCL5c and GhostPXL.&nbsp;
All of the PCL products use the Ghostscript Graphic Library for graphics,
imaging and driver support.&nbsp; A brief tour of the <a href="http://www.cs.wisc.edu/~ghost/">Ghostscript
documentation</a> will be helpful to understand this document.
<p>GhostPCL6 consists of GhostPCL5e or GhostPCL5c, GhostPXL and a supporting
language switching implementation which includes a partial implementation
of the PJL interpreter.
<h2>
Quick Start For Unix environment with GCC.</h2>
<font size=+0>mkdir -p /windows/fonts/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# make a font directory.</font>
<br><font size=+0>cd /windows/fonts/&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# move to the new font directory.</font>
<br><font size=+0>tar zxvf fonts.tar.gz&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# unpack the fonts</font>
<br><font size=+0>cd&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# move to home or work directory.</font>
<br><font size=+0>tar zxvf pcl132.tar.gz&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# unpack the source.</font>
<br><font size=+0>cd pcl132/main&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# change to main build directory.</font>
<br><font size=+0>make -f pcl6_gcc.mak&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# build PCL and PCLXL.</font>
<br><font size=+0>cd obj;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
# move to the executable's directory.</font>
<br><font size=+0>pcl6 ../../tools/owl.pcl&nbsp; ../../tools/frs96.pxl&nbsp;&nbsp;&nbsp;
# test sample PCL and PXL file.</font>
<h2>
Supported development environments</h2>

<ul>
<li>
<a href="#MSVC Compile">Windows NT and '95 with Microsoft Visual C/C++</a></li>

<li>
<a href="#Linux GCC">Linux with gcc</a></li>

<li>
<a href="#Generic Unix">Unix environments without GCC</a></li>
</ul>

<h2>
<a NAME="UNPACKING"></a>Unpacking the source</h2>
The source code will either be on CD-ROM (without any archiving or compression)
or in a archived compressed format.&nbsp; Zip is used for Windows environments
and compressed tar format for Unix environments.&nbsp; If you have a CD-ROM
release you will want to replicate the directory structure from the CD-ROM
to a development directory on a hard drive.&nbsp; The compile process does
not require a special directory name.
<p>For Windows use:
<p>pkunzip -d &lt;archive_name>
<p>For Unix use:
<p>gunzip &lt;archive_name.gz>
<br>tar xvf &lt;archive_name>
<p>or
<p>Some versions of tar can uncompress the archive as well:
<p>tar zxvf &lt;archive_name.gz>
<p>After unpacking the resulting directory hierarchy should look like this:
<br>&nbsp;
<br>&nbsp;
<table BORDER COLS=2 WIDTH="100%" NOSAVE >
<tr>
<td>pcl</td>

<td>pcl interpreter</td>
</tr>

<tr>
<td>pl</td>

<td>pxl and pcl common library</td>
</tr>

<tr>
<td>common</td>

<td>pcl and pxl shared makefiles</td>
</tr>

<tr>
<td>tools</td>

<td>miscellaneous tools</td>
</tr>

<tr>
<td>gs</td>

<td>Ghostscript Graphics Library</td>
</tr>

<tr>
<td>gs/jpeg</td>

<td>JPEG library</td>
</tr>

<tr>
<td>gs/libpng</td>

<td>Portable network graphics library</td>
</tr>

<tr>
<td>gs/zlib</td>

<td>compression library</td>
</tr>

<tr>
<td>pxl</td>

<td>XL interpreter</td>
</tr>

<tr>
<td>main&nbsp;</td>

<td>main makefile and build directory</td>
</tr>
</table>

<p>This directory structure is the default, but the directories can be
rearranged with minor modifications to the makefiles.
<h2>
<a NAME="MSVC Compile"></a>Building with Microsoft Visual C/C++</h2>
The PCL tools are known to build with Visual C/C++ 4.0 and 5.0.&nbsp; There
are 2 ways of building the PCL components with Microsoft Visual C/C++:&nbsp;
Convert the current makefile environment to a Visual C/C++ project ; or
compile the source directly using nmake.&nbsp; The following steps take
you through converting the supplied makefile environment to a Visual C++
project:
<ul>
<li>
Unpack the source code, see&nbsp; <a href="#UNPACKING">Unpacking the source</a>
.</li>

<li>
Start MSVC++.</li>

<li>
Choose `New' under the `File' menu.</li>

<li>
Next MSVC++ will prompt for a project type, select `makefile'</li>

<li>
In the same window create a name for the project and specify the directory
where the sources are located.</li>

<li>
After confirming your selections MSVC++ will ask if you want to go to `Project
Settings`.&nbsp; Choose `yes'.</li>

<li>
Here you will specify how to run the build command, nmake.&nbsp; The simplest
arrangement for PCL is:</li>
</ul>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
nmake /f pcl6_msvc.mak
<p>This will build both the PCL and XL language and supporting language
switching code.
<p>Now PCL6 is set to be compiled, debugged and use other features of the
MSVC++ IDE.
<p>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").
<h2>
<a NAME="Linux GCC"></a>Building with Linux GCC</h2>
The pcl tools have been compiled on Linux using GCC.&nbsp; The makefile
should only require minor modification to work on other UNIX environments
using the GCC compiler and supporting tools.
<br>&nbsp;
<ul>
<li>
Unpack the source code, see&nbsp; <a href="#UNPACKING">Unpacking the source</a>
.</li>

<li>
Create a symbolic link to the makefile:</li>
</ul>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
make /f pcl6_gcc.mak
<ul>
<li>
Configure makefile variables, see configuration</li>

<li>
Change to the desired directory pcl or pxl and use make to build the desired
configuration.</li>
</ul>

<h2>
<a NAME="Generic Unix"></a>Building on a generic UNIX platform</h2>
The PCL tools have been compiled on Solaris with the Sun Development Tools
and SGI with the native SGI C compiler.&nbsp; We provide makefiles for
the latter.&nbsp; There should be a trivial number of changes required
to get PCL to compile on other UNIX platforms and Artifex will support
efforts to port the code.
<h1>
<b>Customizing the build process</b></h1>
The build process is completely configurable.&nbsp; Here is a list of things
that are most likely to change:
<ul>
<li>
Directory location of source directories.</li>

<li>
Directory location of objects, executables, and other compile-time generated
files.</li>

<li>
Selection of devices.</li>
</ul>
All of these can be configured in the top level makefile or can be specified
on the make command line.
<p>The following make targets are available:
<ul>
<li>
debug - build tools with symbols and debugging information</li>

<li>
product - builds optimized code.</li>

<li>
pg-fp - builds profiling code for hardware with floating point.</li>

<li>
pg-nofp - builds profiling code for hardware with no floating point (i.e.
with floating point emulation software).</li>
</ul>

<h1>
Building only one Language</h1>

<p><br>PCL or PCL-XL can be built together in a language switching environment
or each can be built alone with the supporting PJL interpreter.&nbsp; The
simplest way to implement one language is simply to remove the unwanted
implementation from the pdl implementation table located in pl/plimpl.c:
<p>For example, this is the default table with two implementations: PCL
and XL.
<p>&nbsp;&nbsp;&nbsp; /* Zero-terminated list of pointers to implementations
*/
<br>&nbsp;&nbsp;&nbsp; pl_interp_implementation_t const * const pdl_implementation[]
= {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;pcl_implementation,
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;pxl_implementation,
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0
<br>&nbsp;&nbsp;&nbsp; };
<p>If you only wish to use the pcl interpreter use the following table:
<p>&nbsp;&nbsp; /* Zero-terminated list of pointers to implementations
*/
<br>&nbsp;&nbsp;&nbsp; pl_interp_implementation_t const * const pdl_implementation[]
= {
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &amp;pcl_implementation,
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 0
<br>&nbsp;&nbsp;&nbsp; };
<h1>
Running the products.</h1>
<i>"Few things are harder to put up with than a good example"&nbsp; - Mark
Twain</i>
<p>All options supplied to the interpreter in the following examples are
described in the&nbsp; <a href="http://www.cs.wisc.edu/~ghost/">Ghostscript
documentation</a>
<p><b>pcl5 -sDEVICE=x11 mypcl.pcl</b>
<p>interpret a pcl file called mypcl.pcl and render to the x11 device.
<p><b>pcl5 -sDEVICE=ljet4 -sOutputFile="| lpr" -dNOPAUSE mypcl.pcl</b>
<p>interpret mypcl.pcl and send the Laserjet 4 formatted output to the
command lpr, lpr should then send it to a real printer.&nbsp; Note this
is for unix systems.
<p><b>pcl5 -sDEVICE=pcxcmyk -sOutputFile="pcxpage.%d" -dNOPAUSE mypcl.pcl</b>
<p>interpret mypcl.pcl and generate CMYK output. Pages are to be put in
files named pcxpage.1, pcxpage.2, pcxpage.3, etc.
<p><b>pcl5</b>
<p>simply running the interpreter should generate some useful information
about the available options and devices.
<h2>
Fonts</h2>
Customers should obtain fonts from a third-party vendor such as&nbsp; <a href="http://www.agfa.com">Agfa</a>&nbsp;
or&nbsp; <a href="http://www.bitstream.com">Bitstream</a> .&nbsp; The software
can use Hewlett Packard FONTSMART version 1.5.&nbsp; Also, Windows TrueType
fonts can be used as well but minor <a href="#PCL Code modifications to use Windows TrueType fonts">PCL
code modifications</a> are required and the Windows TrueType fonts are
not exactly like the fonts used in HP Laserjet 4, 5, &amp; 6 products.
<h1>
<a NAME="PCL Code modifications to use Windows TrueType fonts"></a>PCL
Code modifications to use Windows TrueType fonts</h1>
The source files pclfont.c and pxffont.c contain the names of the TrueType
font files used by pcl and pxl.&nbsp; These filenames will need to be modified
to the filenames that Windows uses for the corresponding TrueType font
filenames.&nbsp; Additionally, the font search path is set in pjparse.c.&nbsp;
The current search path is a colon separated list associated with the structure
that maintains pjl internal resource.&nbsp; See pjparse.c for details.
<h1>
Reporting bugs</h1>
Use the <a href="http://meerkat.dimensional.com/pcldocs/pclbug.html">bug
reporting form</a> .
<p>A frequently asked question file is under construction&nbsp; <a href="pclfaq.htm">here.</a>
<p>Please send comments about this documentation to <a href="mailto:henrys@artifex.com">Henry
Stiles</a> .
</body>
</html>