Debian Codegraph @

contrib/pcl3/README

raw
1 *******************************************************************************
2 File: @(#)$Id: README,v 2.12 2001/08/19 09:03:27 Martin Rel $
3 Contents: README file for the pcl3 distribution
4 Author: Martin Lottermoser, Greifswaldstrasse 28, 38124 Braunschweig,
5 Germany. E-mail: [email protected].
6
7 *******************************************************************************
8 * *
9 * Copyright (C) 1997, 1998, 1999, 2000, 2001 by Martin Lottermoser *
10 * All rights reserved *
11 * *
12 *******************************************************************************
13
14
15 Table of Contents
16 =================
17 - What is pcl3?
18 - Conditions of use
19 - Status of this release
20 - Files needed
21 - How to compile ghostscript with pcl3
22
23
24
25 What is pcl3?
26 =============
27 pcl3, formerly called hpdj, is a ghostscript device driver for printers
28 understanding Hewlett-Packard's Printer Command Language, Level 3+ (PCL 3+).
29 Some printer models (currently exclusively HP DeskJets) are explicitly
30 supported, but there is also generic support for other PCL-3+ printers.
31 So far I have not heard of any PCL-3 printer for which the driver cannot be
32 used at all and it even works for some printers which claim to be
33 PCL-3-conforming but aren't. For a more positive statement, i.e., a list of
34 printer models for which pcl3 is currently known to work and how, see the file
35 doc/reports.txt.
36
37
38
39 Conditions of use
40 =================
41 pcl3 is free software and can be used under the terms of the GNU Lesser General
42 Public License (LGPL), Version 2.1 (February 1999). You can find a copy of the
43 LGPL in the pcl3 distribution, in several software packages distributed by the
44 Free Software Foundation, and at http://www.gnu.org/copyleft/lesser.html.
45
46 This implies in particular that you are using pcl3 AT YOUR OWN RISK!
47
48
49
50 Status of this release
51 ======================
52 This is version 3.3 of pcl3, released 2001-08-19. This is an ordinary
53 (non-beta) release. Read the manual page to learn about the supported
54 functionality and restrictions.
55
56
57
58 Files needed
59 ============
60 First, you need a ghostscript distribution. This version of pcl3 has been
61 successfully integrated with the following ghostscript distributions:
62
63 - AFPL ghostscript 7.0
64 - GNU ghostscript 6.51
65
66 Other ghostscript versions than those mentioned here are very likely to work,
67 too.
68
69 To obtain a ghostscript distribution, visit http://www.cs.wisc.edu/~ghost.
70 You will also need some third-party archives in addition. See the URL just
71 mentioned or check Make.htm in the ghostscript distribution you have obtained.
72
73 Second, you need a font distribution containing at least a basic set of
74 PostScript fonts. Such a set is distributed with ghostscript as an "std" and an
75 "other" archive. Because font files are PostScript files, they are normally not
76 restricted to a particular version of ghostscript although the archives have a
77 ghostscript version number in their file names. Some of the possibilities are:
78
79 ghostscript-fonts-std-6.0.tar.gz
80 ghostscript-fonts-other-6.0.tar.gz
81 gnu-gs-fonts-std-6.0.tar.gz
82 gnu-gs-fonts-std-5.50.tar.gz
83 gnu-gs-fonts-other-6.0.tar.gz
84 gnu-gs-fonts-other-5.50.tar.gz
85
86 Unless you already have such a set on your system, fetch at least an "std"
87 archive and choose the one with the highest version number you can readily lay
88 your hands on. Different file names do not necessarily mean different contents.
89
90 A side remark: The "StandardSymL" font dated 1998-03-26 (first present in
91 a 5.10 font archive) contains the Euro glyph. However, it has the wrong
92 PostScript name ("euro" instead of "Euro") and the wrong default encoding
93 (decimal 240 instead of octal 240). This is corrected in the version dated
94 1999-10-21. Ghostscript's "SymbolEncoding" encoding vector had the same bugs
95 in gs 5.50 and this was fixed in gs 6.0.
96
97 Third, you need the pcl3 distribution:
98
99 pcl3-<version>.tar.gz
100
101 But if you are reading this file, you should already have it. If not,
102 you can obtain the current distribution through the following URL:
103
104 http://home.t-online.de/home/Martin.Lottermoser/pcl3.html
105
106 I am distributing pcl3 only in the form of gzipped tar archives. If you wish to
107 compile pcl3 on a non-UNIX platform, you need gzip, tar (on a Microsoft Windows
108 system, you can use the Cygnus port of the GNU tools, available from
109 http://sources.redhat.com/cygwin), and a command to convert text files from
110 LF-terminated lines to whatever the line termination conventions are on your
111 system.
112
113
114
115 How to compile ghostscript with pcl3
116 ====================================
117 You need an ISO-C-conforming compiler and library in order to compile pcl3.
118
119 The following description is heavily biased towards UNIX systems and in
120 particular Linux.
121
122 1. Unpack the core distribution
123
124 This is the file ghostscript-N.NN.tar or gnu-gs-N.NN.tar. Unpacking it will
125 create a subdirectory "gsN.NN" in the current directory.
126
127 In order to clearly identify directories I'm going to use the following
128 expressions:
129 - "gs directory": the directory gsN.NN you have just created
130 - "documentation directory": In gs 5.50 this is identical to the
131 gs directory, in newer versions it is the subdirectory "doc" in the
132 gs directory.
133 - "source directory": In gs 5.50 this is identical to the gs directory,
134 in newer versions it is the subdirectory "src" in the gs directory.
135
136 2. Read Make.htm in the documentation directory on how to compile ghostscript.
137 In particular, you should learn
138
139 - which other files you need to unpack and how, and
140 - what the platform-specific make file for your platform is.
141
142 3. Unpack the other files needed (except the font files) as directed by
143 Make.htm.
144
145 4. Unpack pcl3, preferably in the gs directory. The file pcl3-<version>.tar
146 unpacks into a subdirectory pcl3-<version> with only three files:
147
148 README-cover
149 pcl3.tar the distribution proper
150 pcl3.tar.sig an OpenPGP signature for pcl3.tar
151
152 Make the directory accessible under the name "pcl3" from the gs directory,
153 either by renaming it or by creating an appropriate symbolic link. Then
154 change into the pcl3 directory and unpack pcl3.tar from there. This should
155 give you in addition the following regular files in that directory:
156
157 BUGS pcl3's bug list
158 LGPL text of the GNU LGPL
159 NEWS list of user-visible changes between versions
160 README this file
161
162 Furthermore, a number of subdirectories will have been created:
163
164 doc documentation
165 eprn C source code for the eprn device on which pcl3 is based
166 lib cups-pcl3, example.mcf, if-pcl3
167 ppd PostScript printer description files
168 ps PostScript files
169 src C source code and build files for pcl3
170
171 5. Extend contrib.mak in the source directory.
172
173 The pcl3 distribution contains extension files "src/contrib.mak-N.NN.add"
174 for this purpose, where "N.NN" is a ghostscript version (at least for all
175 ghostscript distributions listed in "Files needed" above). These files
176 contain text to be inserted into contrib.mak at some point, for example at
177 the end. An extension file might work for other gs versions in addition to
178 the designated one.
179
180 The extension files contain an initial comment which gives you some
181 further instructions (compile options, files shared with hpdj, available
182 devices).
183
184 6. Add at least "$(DD)pcl3.dev" ("pcl3.dev" in gs 5.50) to one of the
185 DEVICE_DEVS* variables in the platform-specific make file. The conventional
186 place is DEVICE_DEVS3, DEVICE_DEVS4, or DEVICE_DEVS5. For a complete list
187 of pcl3 devices you can define here, see the contrib.mak-N.NN.add file.
188 You might also wish to modify the device and feature lists in other
189 respects.
190
191 On a Linux system, the file to edit is unix-gcc.mak.
192
193 7. Read the file doc/gs-mods.txt about modifications I suggest for making in
194 ghostscript's source code or configuration files.
195
196 8. Other changes to the platform-specific make file
197
198 For a UNIX system and if you wish to install the software in a non-default
199 directory, edit the make variable "prefix" (normally /usr/local).
200 This directory must exist before step 10.
201
202 If you intend to use the X Window System, check whether the values for the
203 variables XINCLUDE, XLIBDIRS, and XLIBS are correct. On Linux, they should
204 usually be "-I/usr/X11R6/include", "-L/usr/X11R6/lib", and
205 "Xt SM ICE Xext X11", respectively. You can ignore XINCLUDE if one of the
206 directories searched by the compiler anyway contains an appropriate "X11"
207 subdirectory (e.g., there is a link from /usr/include/X11 to
208 /usr/X11R6/include/X11).
209
210 9. On a UNIX system, check that the platform-specific make file (unix-gcc.mak
211 for Linux) is available to make from the gs directory (or use "-f"). Then,
212 in the gs directory, type "make" to generate the gs binary, and
213 "make pcl3opts" to generate the pcl3opts binary. The latter step is likely
214 to fail if you are not on an XPG-conforming UNIX system.
215
216 10. Install: "make install pcl3-install".
217
218 If you are not on a UNIX system, you'll probably have to omit the
219 "pcl3-install" part. Instead, copy pcl3's doc/*.html files and the compiled
220 pcl3opts binary (provided it did compile) to appropriate places yourself.
221
222 If "make pcl3-install" gives you a usage message from the "instcopy"
223 command you've forgotten "make pcl3opts" in step 9.
224
225 The "make pcl3opts" call, if successful, has also generated two NLS message
226 catalogues for pcl3opts in ghostscript's object file directory ("obj" in
227 the gs directory): pcl3opts-en.cat (English) and pcl3opts-de.cat (German).
228 These catalogues are not installed automatically. If you wish to use them,
229 copy each file into an appropriate NLS directory under a name matching your
230 NLSPATH conventions with "pcl3opts" for %N. (On Linux the default value for
231 NLSPATH usually includes /usr/share/locale/%L/%N and
232 /usr/share/locale/%L/LC_MESSAGES/%N.) You need the English catalogue only
233 if you want pcl3opts to issue media sizes in inches instead of millimetres.
234
235 Note that pcl3's PostScript example files (subdirectory "ps") are also not
236 installed. If you find them useful, copy them to an appropriate place
237 yourself.
238
239 11. Install the fonts.
240
241 First call the newly generated "gs" with the option "-h". The output will
242 show you ghostscript's search path. The fonts should be present in one of
243 these directories. On UNIX systems, the convention is to use a ".../fonts"
244 directory for this purpose. Note that newer font distributions unpack into
245 "./fonts" and some older ones into ".".
246
247 If you already have a ghostscript installation somewhere else on your
248 system and its font directory is not included in the font path of your new
249 gs binary, you can create a symbolic link from the ".../fonts" directory to
250 your installed fonts, or use the environment variable GS_FONTPATH to direct
251 gs to the directory/ies in question.
252
253 12. This is a good point to take a first look at pcl3's documentation if you
254 haven't done that yet. It is available as a manual page (type "man gs-pcl3")
255 and in HTML format (open gs-pcl3.html in the installed ghostscript's
256 documentation directory with an HTML browser).
257
258 13. If your printer is not directly supported by pcl3 and you wish the driver
259 to be correctly informed about supported media sizes and the associated
260 hardware margins, look into the file lib/example.mcf and then create a
261 media configuration file for your printer from information in its manual.
262 You must at least specify an entry for the default page size (A4 or
263 US Letter as selected in your ghostscript configuration).
264
265 If you have selected to set PCL3_MEDIA_FILE in step 5, the media file
266 you have just created should be installed under that path name.
267
268 14. Integration with a spool system
269
270 This depends on your spooler :-). The minimum you need is the ability to
271 print a file without any modifications by spool commands. In that case
272 you can generate a PCL file by calling ghostscript with option values
273 appropriate for your current needs and pass the generated file through the
274 spool system for printing. Such spool queues are usually called "raw"
275 queues.
276
277 If you are using CUPS (Common UNIX Printing System, http://www.cups.org),
278 you can proceed as follows:
279
280 - Create a file ppd/gs.ppd describing the site-specific properties of
281 your ghostscript installation.
282 - Select a PPD file suitable for your printer model and copy it into
283 CUPS' "model" directory using the ppd/catppd script.
284 - Copy the lib/cups-pcl3 filter to CUPS' "filter" directory.
285 - Install a new print queue based on the new PPD file.
286
287 The details of the first two steps are described in the ppd/README file.
288 You should also at some stage read the initial comments in lib/cups-pcl3.
289
290 Most Linux systems still use a Berkeley spooler (lpr/lprm/lpq) which maps
291 the queue name in the print request to a call to some backend command,
292 based on /etc/printcap. Frequently, the backend is an intelligent filter
293 which will examine the contents of the file to be printed and perform
294 appropriate processing based on the file type.
295
296 Because with an ordinary Berkeley spooler one cannot pass command line
297 options to the backend, it is a good idea to install several print queues
298 for those option combinations one needs frequently. You could for example
299 install seven print queues: one for passing any file to the printer
300 unchanged, three for monochrome and three for colour printing, each of the
301 last two groups having a queue for "draft", "normal" and "presentation"
302 quality.
303
304 If you are on a machine with an AT&T spool system (lp/cancel/lpstat),
305 one queue can be sufficient because you can pass command line options to
306 the backend. However, if your printer has different hardware configurations
307 (either black or CMY cartridge, either banner or tray feed) and you cannot
308 completely control when print jobs are submitted, you should still install
309 separate queues for these configurations, take steps to make it at least
310 likely that the jobs submitted to each queue have the necessary properties,
311 and enable only the queue agreeing with the printer's current configuration.
312
313 You also need only one queue independent of the spool system if you have a
314 spooler frontend capable of inserting PostScript setup commands into the
315 document to be printed or if such a document manager is part of your
316 spooler (the latter applies to CUPS). The pcl3 distribution contains the
317 necessary PPD files for these cases; read the file ppd/README for further
318 instructions. Note that the remarks above on separate queues for distinct
319 hardware configurations apply also to this case.
320
321 The pcl3 distribution contains configurable input filters for the Berkeley
322 spooler and for CUPS in the files "lib/if-pcl3" and "lib/cups-pcl3",
323 respectively. Read the initial comments in these files for further
324 instructions.
325
326 You should also not forget to skim the "OPTIONS" and "CONFIGURATION"
327 sections in pcl3's manual page: some parts are particularly relevant for
328 spooler backends.
329
330 15. Test your configuration by printing a few example documents.
331
332 As a first step and in particular when you are using a media configuration
333 file, print some of the margin test files ps/margins-*.ps appropriate for
334 your current media size. They should show marks with a distance of 25 mm or
335 1 in (depending on the media size) from the margins. If you find deviations
336 from what you expect, read the manual page and in particular the
337 description of how to use the "Margins" or "PageOffset" entries to correct
338 misalignments.
339
340 For trying out various rendering parameters, ps/levels-test.ps is a good
341 test file, in particular if you print through a spooler, because the
342 printed page will tell you which settings were effective.