ignore manpage.[refs|links]
[samba.git] / docs / htmldocs / cups-printing.html
1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2 <HTML
3 ><HEAD
4 ><TITLE
5 >CUPS Printing Support</TITLE
6 ><META
7 NAME="GENERATOR"
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
9 REL="HOME"
10 TITLE="SAMBA Project Documentation"
11 HREF="samba-howto-collection.html"><LINK
12 REL="UP"
13 TITLE="Advanced Configuration"
14 HREF="optional.html"><LINK
15 REL="PREVIOUS"
16 TITLE="Printing Support"
17 HREF="printing.html"><LINK
18 REL="NEXT"
19 TITLE="Unified Logons between Windows NT and UNIX using Winbind"
20 HREF="winbind.html"></HEAD
21 ><BODY
22 CLASS="CHAPTER"
23 BGCOLOR="#FFFFFF"
24 TEXT="#000000"
25 LINK="#0000FF"
26 VLINK="#840084"
27 ALINK="#0000FF"
28 ><DIV
29 CLASS="NAVHEADER"
30 ><TABLE
31 SUMMARY="Header navigation table"
32 WIDTH="100%"
33 BORDER="0"
34 CELLPADDING="0"
35 CELLSPACING="0"
36 ><TR
37 ><TH
38 COLSPAN="3"
39 ALIGN="center"
40 >SAMBA Project Documentation</TH
41 ></TR
42 ><TR
43 ><TD
44 WIDTH="10%"
45 ALIGN="left"
46 VALIGN="bottom"
47 ><A
48 HREF="printing.html"
49 ACCESSKEY="P"
50 >Prev</A
51 ></TD
52 ><TD
53 WIDTH="80%"
54 ALIGN="center"
55 VALIGN="bottom"
56 ></TD
57 ><TD
58 WIDTH="10%"
59 ALIGN="right"
60 VALIGN="bottom"
61 ><A
62 HREF="winbind.html"
63 ACCESSKEY="N"
64 >Next</A
65 ></TD
66 ></TR
67 ></TABLE
68 ><HR
69 ALIGN="LEFT"
70 WIDTH="100%"></DIV
71 ><DIV
72 CLASS="CHAPTER"
73 ><H1
74 ><A
75 NAME="CUPS-PRINTING"
76 ></A
77 >Chapter 14. CUPS Printing Support</H1
78 ><DIV
79 CLASS="TOC"
80 ><DL
81 ><DT
82 ><B
83 >Table of Contents</B
84 ></DT
85 ><DT
86 >14.1. <A
87 HREF="cups-printing.html#AEN2034"
88 >Introduction</A
89 ></DT
90 ><DT
91 >14.2. <A
92 HREF="cups-printing.html#AEN2041"
93 >Configuring <TT
94 CLASS="FILENAME"
95 >smb.conf</TT
96 > for CUPS</A
97 ></DT
98 ><DT
99 >14.3. <A
100 HREF="cups-printing.html#AEN2061"
101 >CUPS - RAW Print Through Mode</A
102 ></DT
103 ><DT
104 >14.4. <A
105 HREF="cups-printing.html#AEN2118"
106 >CUPS as a network PostScript RIP -- CUPS drivers working on server, Adobe
107 PostScript driver with CUPS-PPDs downloaded to clients</A
108 ></DT
109 ><DT
110 >14.5. <A
111 HREF="cups-printing.html#AEN2139"
112 >Windows Terminal Servers (WTS) as CUPS clients</A
113 ></DT
114 ><DT
115 >14.6. <A
116 HREF="cups-printing.html#AEN2143"
117 >Setting up CUPS for driver download</A
118 ></DT
119 ><DT
120 >14.7. <A
121 HREF="cups-printing.html#AEN2156"
122 >Sources of CUPS drivers / PPDs</A
123 ></DT
124 ><DT
125 >14.8. <A
126 HREF="cups-printing.html#AEN2212"
127 >The CUPS Filter Chains</A
128 ></DT
129 ><DT
130 >14.9. <A
131 HREF="cups-printing.html#AEN2251"
132 >CUPS Print Drivers and Devices</A
133 ></DT
134 ><DT
135 >14.10. <A
136 HREF="cups-printing.html#AEN2328"
137 >Limiting the number of pages users can print</A
138 ></DT
139 ><DT
140 >14.11. <A
141 HREF="cups-printing.html#AEN2424"
142 >Advanced Postscript Printing from MS Windows</A
143 ></DT
144 ><DT
145 >14.12. <A
146 HREF="cups-printing.html#AEN2439"
147 >Auto-Deletion of CUPS spool files</A
148 ></DT
149 ></DL
150 ></DIV
151 ><DIV
152 CLASS="SECT1"
153 ><H1
154 CLASS="SECT1"
155 ><A
156 NAME="AEN2034"
157 >14.1. Introduction</A
158 ></H1
159 ><P
160 >The Common Unix Print System (CUPS) has become very popular, but to many it is
161 a very mystical tool. There is a great deal of uncertainty regarding CUPS and how
162 it works. The result is seen in a large number of posting on the samba mailing lists
163 expressing frustration when MS Windows printers appear not to work with a CUPS
164 backr-end.</P
165 ><P
166 >This is a good time to point out how CUPS can be used and what it does. CUPS is more
167 than just a print spooling system - it is a complete printer management system that
168 complies with HTTP and IPP protocols. It can be managed remotely via a web browser
169 and it can print using http and ipp protocols.</P
170 ><P
171 >CUPS allows to creation of RAW printers (ie: NO file format translation) as well as
172 SMART printers (ie: CUPS does file format conversion as required for the printer). In
173 many ways this gives CUPS similar capabilities to the MS Windows print monitoring
174 system. Of course, if you are a CUPS advocate, you would agrue that CUPS is better!
175 In any case, let us now move on to explore how one may configure CUPS for interfacing
176 with MS Windows print clients via Samba.</P
177 ><P
178 ><A
179 HREF="http://www.cups.org/"
180 TARGET="_top"
181 >CUPS</A
182 > is a newcomer in the UNIX printing scene,
183 which has convinced many people upon first trial already. However, it has quite a few
184 new features, which make it different from other, more traditional printing systems.</P
185 ></DIV
186 ><DIV
187 CLASS="SECT1"
188 ><H1
189 CLASS="SECT1"
190 ><A
191 NAME="AEN2041"
192 >14.2. Configuring <TT
193 CLASS="FILENAME"
194 >smb.conf</TT
195 > for CUPS</A
196 ></H1
197 ><P
198 >Printing with CUPS in the most basic <TT
199 CLASS="FILENAME"
200 >smb.conf</TT
201 >
202 setup in Samba-3  only needs two settings: <B
203 CLASS="COMMAND"
204 >printing = cups</B
205 > and
206 <B
207 CLASS="COMMAND"
208 >printcap = cups</B
209 >. While CUPS itself doesn't need a printcap
210 anymore, the <TT
211 CLASS="FILENAME"
212 >cupsd.conf</TT
213 > configuration file knows two directives
214 (example: <B
215 CLASS="COMMAND"
216 >Printcap /etc/printcap</B
217 > and <B
218 CLASS="COMMAND"
219 >PrintcapFormat
220 BSD</B
221 >), which control if such a file should be created for the
222 convenience of third party applications. Make sure it is set! For details see
223 <B
224 CLASS="COMMAND"
225 >man cupsd.conf</B
226 > and other CUPS-related documentation.</P
227 ><P
228 >If SAMBA is compiled against libcups, then <B
229 CLASS="COMMAND"
230 >printcap = cups</B
231 > uses the
232 CUPS API to list printers, submit jobs, etc. Otherwise it maps to the System V commands
233 with an additional <VAR
234 CLASS="PARAMETER"
235 >-oraw</VAR
236 > option for printing. On a Linux system,
237 you can use the <B
238 CLASS="COMMAND"
239 >ldd</B
240 > command to find out details (ldd may not be
241 present on other OS platforms, or its function may be embodied by a different command):</P
242 ><P
243 ><PRE
244 CLASS="PROGRAMLISTING"
245 >transmeta:/home/kurt # ldd `which smbd`
246         libssl.so.0.9.6 =&#62; /usr/lib/libssl.so.0.9.6 (0x4002d000)
247         libcrypto.so.0.9.6 =&#62; /usr/lib/libcrypto.so.0.9.6 (0x4005a000)
248         libcups.so.2 =&#62; /usr/lib/libcups.so.2 (0x40123000)
249         libdl.so.2 =&#62; /lib/libdl.so.2 (0x401e8000)
250         libnsl.so.1 =&#62; /lib/libnsl.so.1 (0x401ec000)
251         libpam.so.0 =&#62; /lib/libpam.so.0 (0x40202000)
252         libc.so.6 =&#62; /lib/libc.so.6 (0x4020b000)
253         /lib/ld-linux.so.2 =&#62; /lib/ld-linux.so.2 (0x40000000)</PRE
254 ></P
255 ><P
256 >The line "libcups.so.2 =&#62; /usr/lib/libcups.so.2
257 (0x40123000)" shows there is CUPS support compiled into this version of
258 Samba. If this is the case, and <B
259 CLASS="COMMAND"
260 >printing = cups</B
261 > is set, then any
262 otherwise manually set print command in <TT
263 CLASS="FILENAME"
264 >smb.conf</TT
265 > is ignored.</P
266 ></DIV
267 ><DIV
268 CLASS="SECT1"
269 ><H1
270 CLASS="SECT1"
271 ><A
272 NAME="AEN2061"
273 >14.3. CUPS - RAW Print Through Mode</A
274 ></H1
275 ><DIV
276 CLASS="NOTE"
277 ><P
278 ></P
279 ><TABLE
280 CLASS="NOTE"
281 WIDTH="100%"
282 BORDER="0"
283 ><TR
284 ><TD
285 WIDTH="25"
286 ALIGN="CENTER"
287 VALIGN="TOP"
288 ><IMG
289 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif"
290 HSPACE="5"
291 ALT="Note"></TD
292 ><TD
293 ALIGN="LEFT"
294 VALIGN="TOP"
295 ><P
296 >When used in raw print through mode is will be necessary to use the printer
297 vendor's drivers in each Windows client PC.</P
298 ></TD
299 ></TR
300 ></TABLE
301 ></DIV
302 ><P
303 >When CUPS printers are configured for RAW print-through mode operation it is the
304 responsibility of the Samba client to fully render the print job (file) in a format
305 that is suitable for direct delivery to the printer. In this case CUPS will NOT
306 do any print file format conversion work.</P
307 ><P
308 >The CUPS files that need to be correctly set for RAW mode printers to work are:
309
310 <P
311 ></P
312 ><UL
313 ><LI
314 ><P
315 ><TT
316 CLASS="FILENAME"
317 >/etc/cups/mime.types</TT
318 ></P
319 ></LI
320 ><LI
321 ><P
322 ><TT
323 CLASS="FILENAME"
324 >/etc/cups/mime.convs</TT
325 ></P
326 ></LI
327 ></UL
328 >
329
330 Both contain entries that must be uncommented to allow <SPAN
331 CLASS="emphasis"
332 ><I
333 CLASS="EMPHASIS"
334 >RAW</I
335 ></SPAN
336 > mode
337 operation.</P
338 ><P
339 >Firstly, to enable CUPS based printing from Samba the following options must be
340 enabled in your <TT
341 CLASS="FILENAME"
342 >smb.conf</TT
343 > file [globals] section:
344
345 <P
346 ></P
347 ><UL
348 ><LI
349 ><P
350 >printing = CUPS</P
351 ></LI
352 ><LI
353 ><P
354 >printcap = CUPS</P
355 ></LI
356 ></UL
357 >
358
359 When these parameters are specified the print directives in <TT
360 CLASS="FILENAME"
361 >smb.conf</TT
362 > (as well as in
363 samba itself) will be ignored because samba will directly interface with CUPS through
364 it's application program interface (API) - so long as Samba has been compiled with
365 CUPS library (libcups) support. If samba has NOT been compiled with CUPS support then
366 printing will use the System V AT&#38;T command set with the <SPAN
367 CLASS="emphasis"
368 ><I
369 CLASS="EMPHASIS"
370 >-oraw</I
371 ></SPAN
372
373 option automatically passing through.</P
374 ><P
375 >Cupsomatic (an enhanced printing utility that is part of some CUPS implementations) 
376 on the Samba/CUPS server does *not* add any features if a file is really
377 printed "raw".  However, if you have loaded the driver for the Windows client from
378 the CUPS server, using the "cupsaddsmb" utility, and if this driver is one using
379 a "Foomatic" PPD, the PJL header in question is already added on the Windows client,
380 at the time when the driver initially generated the PostScript data and CUPS in true
381 "-oraw" manner doesn't remove this PJL header and passes the file "as is" to its
382 printer communication backend.</P
383 ><DIV
384 CLASS="NOTE"
385 ><P
386 ></P
387 ><TABLE
388 CLASS="NOTE"
389 WIDTH="100%"
390 BORDER="0"
391 ><TR
392 ><TD
393 WIDTH="25"
394 ALIGN="CENTER"
395 VALIGN="TOP"
396 ><IMG
397 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif"
398 HSPACE="5"
399 ALT="Note"></TD
400 ><TD
401 ALIGN="LEFT"
402 VALIGN="TOP"
403 ><P
404 >NOTE: editing in the "mime.convs" and the "mime.types" file does not *enforce*
405 "raw" printing, it only *allows* it.</P
406 ></TD
407 ></TR
408 ></TABLE
409 ></DIV
410 ><P
411 >Print files that arrive from MS Windows printing are "auto-typed" by CUPS. This aids
412 the process of determining proper treatment while in the print queue system.
413
414 <P
415 ></P
416 ><UL
417 ><LI
418 ><P
419 >       Files generated by PCL drivers and directed at PCK printers get auto-typed as
420         <TT
421 CLASS="FILENAME"
422 >application/octet-stream</TT
423 >. Unknown file format types also
424         get auto-typed with this tag.
425         </P
426 ></LI
427 ><LI
428 ><P
429 >       Files generated by a Postscript driver and directed at a Postscript printer
430         are auto-typed depending on the auto-detected most suitable MIME type as:
431
432         <P
433 ></P
434 ><UL
435 ><LI
436 ><P
437 >* application/postscript</P
438 ></LI
439 ><LI
440 ><P
441 >* application/vnd.cups-postscript</P
442 ></LI
443 ></UL
444 >
445         </P
446 ></LI
447 ></UL
448 ></P
449 ><P
450 >"application/postscript" first goes thru the "pstops" filter (where the page counting
451 and accounting takes place). The outcome will be of MIME type
452 "application/vnd.cups-postscript". The pstopsfilter reads and uses information from
453 the PPD and inserts user-provided options into the PostScript file. As a consequence,
454 the filtered file could possibly have an unwanted PJL header.</P
455 ><P
456 >"application/postscript" will be all files with a ".ps", ".ai", ".eps" suffix or which
457 have as their first character string one of "%!" or "&#62;04&#60;%".</P
458 ><P
459 >"application/vnd.cups-postscript" will files which contain the string
460 "LANGUAGE=POSTSCRIPT" (or similar variations with different capitalization) in the
461 first 512 bytes, and also contain the "PJL super escape code" in the first 128 bytes
462 ("&#62;1B&#60;%-12345X"). Very likely, most PostScript files generated on Windows using a CUPS
463 or other PPD, will have to be auto-typed as "vnd.cups-postscript".  A file produced
464 with a "Generic PostScript driver" will just be tagged "application/postscript".</P
465 ><P
466 >Once the file is in "application/vnd.cups-postscript" format, either "pstoraster"
467 or "cupsomatic" will take over (depending on the printer configuration, as
468 determined by the PPD in use).</P
469 ><DIV
470 CLASS="NOTE"
471 ><P
472 ></P
473 ><TABLE
474 CLASS="NOTE"
475 WIDTH="100%"
476 BORDER="0"
477 ><TR
478 ><TD
479 WIDTH="25"
480 ALIGN="CENTER"
481 VALIGN="TOP"
482 ><IMG
483 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif"
484 HSPACE="5"
485 ALT="Note"></TD
486 ><TD
487 ALIGN="LEFT"
488 VALIGN="TOP"
489 ><P
490 >A printer queue with *no* PPD associated to it is a "raw" printer and all files
491 will go directly there as received by the spooler. The exeptions are file types
492 "application/octet-stream" which need "passthrough feature" enabled.
493 "Raw" queues don't do any filtering at all, they hand the file directly to the
494 CUPS backend. This backend is responsible for the sending of the data to the device
495 (as in the "device URI" notation as lpd://, socket://, smb://, ipp://, http://,
496 parallel:/, serial:/, usb:/ etc.)</P
497 ></TD
498 ></TR
499 ></TABLE
500 ></DIV
501 ><DIV
502 CLASS="NOTE"
503 ><P
504 ></P
505 ><TABLE
506 CLASS="NOTE"
507 WIDTH="100%"
508 BORDER="0"
509 ><TR
510 ><TD
511 WIDTH="25"
512 ALIGN="CENTER"
513 VALIGN="TOP"
514 ><IMG
515 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif"
516 HSPACE="5"
517 ALT="Note"></TD
518 ><TD
519 ALIGN="LEFT"
520 VALIGN="TOP"
521 ><P
522 >"cupsomatic"/Foomatic are *not* native CUPS drivers and they don't ship with CUPS.
523 They are a Third Party add-on, developed at Linuxprinting.org.  As such, they are
524 a brilliant hack to make all models (driven by Ghostscript drivers/filters in
525 traditional spoolers) also work via CUPS, with the same (good or bad!) quality
526 as in these other spoolers. "cupsomatic" is only a vehicle to execute a ghostscript
527 commandline at that stage in the CUPS filtering chain, where "normally" the native
528 CUPS "pstoraster" filter would kick in.  cupsomatic by-passes pstoraster, "kidnaps"
529 the printfile from CUPS away and re-directs it to go through Ghostscipt. CUPS accepts this,
530 because the associated CUPS-O-Matic-/Foomatic-PPD specifies:</P
531 ><PRE
532 CLASS="PROGRAMLISTING"
533 >   *cupsFilter:  "application/vnd.cups-postscript 0 cupsomatic"</PRE
534 ><P
535 >This line persuades CUPS to hand the file to cupsomatic, once it has successfully
536 converted it to the MIME type "application/vnd.cups-postscript". This conversion will not
537 happen for Jobs arriving from Windows which are auto-typed "application/octet-stream",
538 with the according changes in "/etc/cups/mime.types" in place.</P
539 ></TD
540 ></TR
541 ></TABLE
542 ></DIV
543 ><P
544 >CUPS is widely configurable and flexible, even regarding its filtering mechanism.
545 Another workaround in some situations would be to have
546 in "/etc/cups/mime.types" entries as follows:</P
547 ><PRE
548 CLASS="PROGRAMLISTING"
549 >   application/postscript           application/vnd.cups-raw  0  -
550    application/vnd.cups-postscript  application/vnd.cups-raw  0  -</PRE
551 ><P
552 >This would prevent all Postscript files from being filtered (rather, they will go
553 thru the virtual "nullfilter" denoted with "-"). This could only be useful for
554 PS printers. If you want to print PS code on non-PS printers an entry as follows
555 could be useful:</P
556 ><PRE
557 CLASS="PROGRAMLISTING"
558 >   */*           application/vnd.cups-raw  0  -</PRE
559 ><P
560 >and would effectively send *all* files to the backend without further processing.</P
561 ><P
562 >Lastly, you could have the following entry:</P
563 ><PRE
564 CLASS="PROGRAMLISTING"
565 >   application/vnd.cups-postscript  application/vnd.cups-raw  0  my_PJL_stripping_filter</PRE
566 ><P
567 >You will need to write a "my_PJL_stripping_filter" (could be a shellscript) that
568 parses the PostScript and removes the unwanted PJL. This would need to conform to
569 CUPS filter design (mainly, receive and pass the parameters printername, job-id,
570 username, jobtitle, copies, print options and possibly the filename). It would
571 be installed as world executable into "/usr/lib/cups/filters/" and will be called
572 by CUPS if it encounters a MIME type "application/vnd.cups-postscript".</P
573 ><P
574 >CUPS can handle "-o job-hold-until=indefinite". This keeps the job in the queue
575 "on hold". It will only be printed upon manual release by the printer operator.
576 This is a requirement in many "central reproduction departments", where a few
577 operators manage the jobs of hundreds of users on some big machine, where no
578 user is allowed to have direct access. (The operators often need to load the
579 proper paper type before running the 10.000 page job requested by marketing
580 for the mailing, etc.).</P
581 ></DIV
582 ><DIV
583 CLASS="SECT1"
584 ><H1
585 CLASS="SECT1"
586 ><A
587 NAME="AEN2118"
588 >14.4. CUPS as a network PostScript RIP -- CUPS drivers working on server, Adobe
589 PostScript driver with CUPS-PPDs downloaded to clients</A
590 ></H1
591 ><P
592 >CUPS is perfectly able to use PPD files (PostScript
593 Printer Descriptions). PPDs can control all print device options. They
594 are usually provided by the manufacturer -- if you own a PostSript printer,
595 that is. PPD files are always a component of PostScript printer drivers on MS
596 Windows or Apple Mac OS systems. They are ASCII files containing
597 user-selectable print options, mapped to appropriate PostScript, PCL or PJL
598 commands for the target printer. Printer driver GUI dialogs translate these
599 options "on-the-fly" into buttons and drop-down lists for the user to
600 select.</P
601 ><P
602 >CUPS can load, without any conversions, the PPD file from
603 any Windows (NT is recommended) PostScript driver and handle the options.
604 There is a web browser interface to the print options (select
605 http://localhost:631/printers/ and click on one "Configure Printer" button
606 to see it), a commandline interface (see <B
607 CLASS="COMMAND"
608 >man lpoptions</B
609 > or
610 try if you have <B
611 CLASS="COMMAND"
612 >lphelp</B
613 > on your system) plus some different GUI frontends on Linux
614 UNIX, which can present PPD options to the users. PPD options are normally
615 meant to become evaluated by the PostScript RIP on the real PostScript
616 printer.</P
617 ><P
618 >CUPS doesn't stop at "real" PostScript printers in its
619 usage of PPDs. The CUPS developers have extended the PPD concept, to also
620 describe available device and driver options for non-PostScript printers
621 through  CUPS-PPDs.</P
622 ><P
623 >This is logical, as CUPS includes a fully featured
624 PostScript interpreter (RIP). This RIP is based on Ghostscript. It can
625 process all received PostScript (and additionally many other file formats)
626 from clients. All CUPS-PPDs geared to non-PostScript printers contain an
627 additional line, starting with the keyword <VAR
628 CLASS="PARAMETER"
629 >*cupsFilter</VAR
630 >.
631 This line
632 tells the CUPS print system which printer-specific filter to use for the
633 interpretation of the accompanying PostScript. Thus CUPS lets all its
634 printers appear as PostScript devices to its clients, because it can act as a
635 PostScript RIP for those printers, processing the received PostScript code
636 into a proper raster print format.</P
637 ><P
638 >CUPS-PPDs can also be used on Windows-Clients, on top of a
639 PostScript driver (recommended is the Adobe one).</P
640 ><P
641 >This feature enables CUPS to do a few tricks no other
642 spooler can do:</P
643 ><P
644 ></P
645 ><UL
646 ><LI
647 ><P
648 >act as a networked PostScript RIP (Raster Image Processor), handling
649     printfiles from all client platforms in a uniform way;</P
650 ></LI
651 ><LI
652 ><P
653 >act as a central accounting and billing server, as all files are passed
654     through the <B
655 CLASS="COMMAND"
656 >pstops</B
657 > Filter and are therefor logged in
658     the CUPS <TT
659 CLASS="FILENAME"
660 >page&lowbar;log</TT
661 >. - <SPAN
662 CLASS="emphasis"
663 ><I
664 CLASS="EMPHASIS"
665 >NOTE: </I
666 ></SPAN
667 >this
668     can not happen with "raw" print jobs, which always remain unfiltered
669     per definition;</P
670 ></LI
671 ><LI
672 ><P
673 >enable clients to consolidate on a single PostScript driver, even for
674     many different target printers.</P
675 ></LI
676 ></UL
677 ></DIV
678 ><DIV
679 CLASS="SECT1"
680 ><H1
681 CLASS="SECT1"
682 ><A
683 NAME="AEN2139"
684 >14.5. Windows Terminal Servers (WTS) as CUPS clients</A
685 ></H1
686 ><P
687 >This setup may be of special interest to people
688 experiencing major problems in WTS environments. WTS need often a multitude
689 of non-PostScript drivers installed to run their clients' variety of
690 different printer models. This often imposes the price of much increased
691 instability. In many cases, in an attempt to overcome this problem, site
692 administrators have resorted to restrict the allowed drivers installed on
693 their WTS to one generic PCL- and one PostScript driver. This however
694 restricts the clients in the amount of printer options available for them --
695 often they can't get out more then simplex prints from one standard paper
696 tray, while their devices could do much better, if driven by a different
697 driver!</P
698 ><P
699 >Using an Adobe PostScript driver, enabled with a CUPS-PPD,
700 seems to be a very elegant way to overcome all these shortcomings. The
701 PostScript driver is not known to cause major stability problems on WTS (even
702 if used with many different PPDs). The clients will be able to (again) chose
703 paper trays, duplex printing and other settings. However, there is a certain
704 price for this too: a  CUPS server acting as a PostScript RIP for its clients
705 requires more CPU and RAM than just to act as  a "raw spooling" device. Plus,
706 this setup is not yet widely tested, although the first feedbacks look very
707 promising...</P
708 ></DIV
709 ><DIV
710 CLASS="SECT1"
711 ><H1
712 CLASS="SECT1"
713 ><A
714 NAME="AEN2143"
715 >14.6. Setting up CUPS for driver download</A
716 ></H1
717 ><P
718 >The <B
719 CLASS="COMMAND"
720 >cupsadsmb</B
721 > utility (shipped with all current
722 CUPS versions) makes the sharing of any (or all) installed CUPS printers very
723 easy. Prior to using it, you need the following settings in <TT
724 CLASS="FILENAME"
725 >smb.conf</TT
726 >:</P
727 ><P
728 ><PRE
729 CLASS="PROGRAMLISTING"
730 >[global]
731                  load printers = yes
732                  printing = cups
733                  printcap name = cups
734
735         [printers]
736                  comment = All Printers
737                  path = /var/spool/samba
738                  browseable = no
739                  public = yes
740                  guest ok = yes
741                  writable = no
742                  printable = yes
743                  printer admin = root
744
745         [print$]
746                  comment = Printer Drivers
747                  path = /etc/samba/drivers
748                  browseable = yes
749                  guest ok = no
750                  read only = yes
751                  write list = root
752         </PRE
753 ></P
754 ><P
755 >For licensing reasons the necessary files of the Adobe
756 Postscript driver can not be distributed with either Samba or CUPS. You need
757 to download them yourself from the Adobe website. Once extracted, create a
758 <TT
759 CLASS="FILENAME"
760 >drivers</TT
761 > directory in the CUPS data directory (usually
762 <TT
763 CLASS="FILENAME"
764 >/usr/share/cups/</TT
765 >). Copy the Adobe files using
766 UPPERCASE filenames, to this directory as follows:</P
767 ><P
768 ><PRE
769 CLASS="PROGRAMLISTING"
770 >               ADFONTS.MFM
771                 ADOBEPS4.DRV
772                 ADOBEPS4.HLP
773                 ADOBEPS5.DLL
774                 ADOBEPSU.DLL
775                 ADOBEPSU.HLP
776                 DEFPRTR2.PPD
777                 ICONLIB.DLL
778         </PRE
779 ></P
780 ><P
781 >Users of the ESP Print Pro software are able to install
782 their "Samba Drivers" package for this purpose with no problem.</P
783 ></DIV
784 ><DIV
785 CLASS="SECT1"
786 ><H1
787 CLASS="SECT1"
788 ><A
789 NAME="AEN2156"
790 >14.7. Sources of CUPS drivers / PPDs</A
791 ></H1
792 ><P
793 >On the internet you can find now many thousand CUPS-PPD
794 files (with their companion filters), in many national languages,
795 supporting more than 1.000 non-PostScript models.</P
796 ><P
797 ></P
798 ><UL
799 ><LI
800 ><P
801 ><A
802 HREF="http://wwwl.easysw.com/printpro/"
803 TARGET="_top"
804 >ESP PrintPro
805     (http://wwwl.easysw.com/printpro/)</A
806 >
807     (commercial, non-Free) is packaged with more than 3.000 PPDs, ready for
808     successful usage "out of the box" on Linux, IBM-AIX, HP-UX, Sun-Solaris,
809     SGI-IRIX, Compaq Tru64, Digital Unix and some more commercial Unices (it
810     is written by the CUPS developers themselves and its sales help finance
811     the further development of CUPS, as they feed their creators)</P
812 ></LI
813 ><LI
814 ><P
815 >the <A
816 HREF="http://gimp-print.sourceforge.net/"
817 TARGET="_top"
818 >Gimp-Print-Project
819     (http://gimp-print.sourceforge.net/)</A
820 >
821     (GPL, Free Software) provides around 120 PPDs (supporting nearly 300
822     printers, many driven to photo quality output), to be used alongside the
823     Gimp-Print CUPS filters;</P
824 ></LI
825 ><LI
826 ><P
827 ><A
828 HREF="http://www.turboprint.com/"
829 TARGET="_top"
830 >TurboPrint
831     (http://www.turboprint.com/)</A
832 >
833     (Shareware, non-Freee) supports roughly the same amount of printers in
834     excellent quality;</P
835 ></LI
836 ><LI
837 ><P
838 ><A
839 HREF="http://www-124.ibm.com/developerworks/oss/linux/projects/omni/"
840 TARGET="_top"
841 >OMNI
842     (http://www-124.ibm.com/developerworks/oss/linux/projects/omni/)</A
843 >
844     (LPGL, Free) is a package made by IBM, now containing support for more
845     than 400 printers, stemming from the inheritance of IBM OS/2 KnowHow
846     ported over to Linux (CUPS support is in a Beta-stage at present);</P
847 ></LI
848 ><LI
849 ><P
850 ><A
851 HREF="http://hpinkjet.sourceforge.net/"
852 TARGET="_top"
853 >HPIJS
854     (http://hpinkjet.sourceforge.net/)</A
855 >
856     (BSD-style licnes, Free) supports around 120 of HP's own printers and is
857     also providing excellent print quality now;</P
858 ></LI
859 ><LI
860 ><P
861 ><A
862 HREF="http://www.linuxprinting.org/"
863 TARGET="_top"
864 >Foomatic/cupsomatic (http://www.linuxprinting.org/)</A
865 >
866     (LPGL, Free) from Linuxprinting.org are providing PPDs for practically every
867     Ghostscript filter known to the world, now usable with CUPS.</P
868 ></LI
869 ></UL
870 ><P
871 ><SPAN
872 CLASS="emphasis"
873 ><I
874 CLASS="EMPHASIS"
875 >NOTE: </I
876 ></SPAN
877 >the cupsomatic trick from Linuxprinting.org is
878 working different from the other drivers. While the other drivers take the
879 generic CUPS raster (produced by CUPS' own pstoraster PostScript RIP) as
880 their input, cupsomatic "kidnaps" the PostScript inside CUPS, before
881 RIP-ping, deviates it to an external Ghostscript installation (which now
882 becomes the RIP) and gives it back to a CUPS backend once Ghostscript is
883 finished. -- CUPS versions from 1.1.15 and later will provide their pstoraster
884 PostScript RIP function again inside a system-wide Ghostscript
885 installation rather than in "their own" pstoraster filter. (This
886 CUPS-enabling Ghostscript version may be installed either as a
887 patch to GNU or AFPL Ghostscript, or as a complete ESP Ghostscript package).
888 However, this will not change the cupsomatic approach of guiding the printjob
889 along a different path through the filtering system than the standard CUPS
890 way...</P
891 ><P
892 >Once you installed a printer inside CUPS with one of the
893 recommended methods (the lpadmin command, the web browser interface or one of
894 the available GUI wizards), you can use <B
895 CLASS="COMMAND"
896 >cupsaddsmb</B
897 > to share the
898 printer via Samba. <B
899 CLASS="COMMAND"
900 >cupsaddsmb</B
901 > prepares the driver files for
902 comfortable client download and installation upon their first contact with
903 this printer share.</P
904 ><DIV
905 CLASS="SECT2"
906 ><H2
907 CLASS="SECT2"
908 ><A
909 NAME="AEN2183"
910 >14.7.1. <B
911 CLASS="COMMAND"
912 >cupsaddsmb</B
913 ></A
914 ></H2
915 ><P
916 >The <B
917 CLASS="COMMAND"
918 >cupsaddsmb</B
919 > command copies the needed files
920 for convenient Windows client installations from the previously prepared CUPS
921 data directory to your [print$] share. Additionally, the PPD
922 associated with this printer is copied from <TT
923 CLASS="FILENAME"
924 >/etc/cups/ppd/</TT
925 > to
926 [print$].</P
927 ><P
928 ><PRE
929 CLASS="PROGRAMLISTING"
930 ><SAMP
931 CLASS="PROMPT"
932 >root# </SAMP
933 > <B
934 CLASS="COMMAND"
935 >cupsaddsmb -U root infotec_IS2027</B
936 >
937 Password for root required to access localhost via SAMBA: <KBD
938 CLASS="USERINPUT"
939 >[type in password 'secret']</KBD
940 ></PRE
941 ></P
942 ><P
943 >To share all printers and drivers, use the <VAR
944 CLASS="PARAMETER"
945 >-a</VAR
946 >
947 parameter instead of a printer name.</P
948 ><P
949 >Probably you want to see what's going on. Use the
950 <VAR
951 CLASS="PARAMETER"
952 >-v</VAR
953 > parameter to get a more verbose output:</P
954 ><P
955 >Probably you want to see what's going on. Use the
956 <VAR
957 CLASS="PARAMETER"
958 >-v</VAR
959 > parameter to get a more verbose output:</P
960 ><P
961 ><PRE
962 CLASS="PROGRAMLISTING"
963 >Note: The following line shave been wrapped so that information is not lost.
964  
965 <SAMP
966 CLASS="PROMPT"
967 >root# </SAMP
968 > cupsaddsmb -v -U root infotec_IS2027
969     Password for root required to access localhost via SAMBA:
970     Running command: smbclient //localhost/print\$ -N -U'root%secret' -c 'mkdir W32X86;put
971        /var/spool/cups/tmp/3cd1cc66376c0 W32X86/infotec_IS2027.PPD;put /usr/share/cups/drivers/
972        ADOBEPS5.DLL W32X86/ADOBEPS5.DLL;put /usr/share/cups/drivers/ADOBEPSU.DLLr
973        W32X86/ADOBEPSU.DLL;put /usr/share/cups/drivers/ADOBEPSU.HLP W32X86/ADOBEPSU.HLP'
974     added interface ip=10.160.16.45 bcast=10.160.31.255 nmask=255.255.240.0
975     added interface ip=192.168.182.1 bcast=192.168.182.255 nmask=255.255.255.0
976     added interface ip=172.16.200.1 bcast=172.16.200.255 nmask=255.255.255.0
977     Domain=[TUX-NET] OS=[Unix] Server=[Samba 2.2.3a.200204262025cvs]
978     NT_STATUS_OBJECT_NAME_COLLISION making remote directory \W32X86
979     putting file /var/spool/cups/tmp/3cd1cc66376c0 as \W32X86/infotec_IS2027.PPD (17394.6 kb/s)
980       (average 17395.2 kb/s)
981     putting file /usr/share/cups/drivers/ADOBEPS5.DLL as \W32X86/ADOBEPS5.DLL (10877.4 kb/s)
982       (average 11343.0 kb/s)
983     putting file /usr/share/cups/drivers/ADOBEPSU.DLL as \W32X86/ADOBEPSU.DLL (5095.2 kb/s)
984       (average 9260.4 kb/s)
985     putting file /usr/share/cups/drivers/ADOBEPSU.HLP as \W32X86/ADOBEPSU.HLP (8828.7 kb/s)
986       (average 9247.1 kb/s)
987
988     Running command: smbclient //localhost/print\$ -N -U'root%secret' -c 'mkdir WIN40;put
989       /var/spool/cups/tmp/3cd1cc66376c0 WIN40/infotec_IS2027.PPD;put
990       /usr/share/cups/drivers/ADFONTS.MFM WIN40/ADFONTS.MFM;put
991       /usr/share/cups/drivers/ADOBEPS4.DRV WIN40/ADOBEPS4.DRV;put
992       /usr/share/cups/drivers/ADOBEPS4.HLP WIN40/ADOBEPS4.HLP;put
993       /usr/share/cups/drivers/DEFPRTR2.PPD WIN40/DEFPRTR2.PPD;put
994       /usr/share/cups/drivers/ICONLIB.DLL WIN40/ICONLIB.DLL;put
995       /usr/share/cups/drivers/PSMON.DLL WIN40/PSMON.DLL;'
996     added interface ip=10.160.16.45 bcast=10.160.31.255 nmask=255.255.240.0
997     added interface ip=192.168.182.1 bcast=192.168.182.255 nmask=255.255.255.0
998     added interface ip=172.16.200.1 bcast=172.16.200.255 nmask=255.255.255.0
999     Domain=[TUX-NET] OS=[Unix] Server=[Samba 2.2.3a.200204262025cvs]
1000     NT_STATUS_OBJECT_NAME_COLLISION making remote directory \WIN40
1001     putting file /var/spool/cups/tmp/3cd1cc66376c0 as \WIN40/infotec_IS2027.PPD (26091.5 kb/s)
1002       (average 26092.8 kb/s)
1003     putting file /usr/share/cups/drivers/ADFONTS.MFM as \WIN40/ADFONTS.MFM (11241.6 kb/s)
1004       (average 11812.9 kb/s)
1005     putting file /usr/share/cups/drivers/ADOBEPS4.DRV as \WIN40/ADOBEPS4.DRV (16640.6 kb/s)
1006       (average 14679.3 kb/s)
1007     putting file /usr/share/cups/drivers/ADOBEPS4.HLP as \WIN40/ADOBEPS4.HLP (11285.6 kb/s)
1008       (average 14281.5 kb/s)
1009     putting file /usr/share/cups/drivers/DEFPRTR2.PPD as \WIN40/DEFPRTR2.PPD (823.5 kb/s)
1010       (average 12944.0 kb/s)
1011     putting file /usr/share/cups/drivers/ICONLIB.DLL as \WIN40/ICONLIB.DLL (19226.2 kb/s)
1012       (average 13169.7 kb/s)
1013     putting file /usr/share/cups/drivers/PSMON.DLL as \WIN40/PSMON.DLL (18666.1 kb/s)
1014       (average 13266.7 kb/s)
1015
1016     Running command: rpcclient localhost -N -U'root%secret' -c 'adddriver "Windows NT x86"
1017        "infotec_IS2027:ADOBEPS5.DLL:infotec_IS2027.PPD:ADOBEPSU.DLL:ADOBEPSU.HLP:NULL:RAW:NULL"'
1018     cmd = adddriver "Windows NT x86" "infotec_IS2027:ADOBEPS5.DLL:infotec_IS2027.PPD:ADOBEPSU.DLL:
1019        ADOBEPSU.HLP:NULL:RAW:NULL"
1020     Printer Driver infotec_IS2027 successfully installed.
1021
1022     Running command: rpcclient localhost -N -U'root%secret' -c 'adddriver "Windows 4.0"
1023        "infotec_IS2027:ADOBEPS4.DRV:infotec_IS2027.PPD:NULL:ADOBEPS4.HLP:PSMON.DLL:RAW:
1024        ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"'
1025     cmd = adddriver "Windows 4.0" "infotec_IS2027:ADOBEPS4.DRV:infotec_IS2027.PPD:NULL:
1026        ADOBEPS4.HLP:PSMON.DLL:RAW:ADFONTS.MFM,DEFPRTR2.PPD,ICONLIB.DLL"
1027     Printer Driver infotec_IS2027 successfully installed.
1028
1029     Running command: rpcclient localhost -N -U'root%secret'
1030        -c 'setdriver infotec_IS2027 infotec_IS2027'
1031     cmd = setdriver infotec_IS2027 infotec_IS2027
1032     Succesfully set infotec_IS2027 to driver infotec_IS2027.
1033
1034     <SAMP
1035 CLASS="PROMPT"
1036 >root# </SAMP
1037 ></PRE
1038 ></P
1039 ><P
1040 >If you look closely, you'll discover your root password was transfered unencrypted over
1041 the wire, so beware! Also, if you look further her, you'll discover error messages like
1042 <CODE
1043 CLASS="CONSTANT"
1044 >NT_STATUS_OBJECT_NAME_COLLISION</CODE
1045 > in between. They occur, because
1046 the directories <TT
1047 CLASS="FILENAME"
1048 >WIN40</TT
1049 > and <TT
1050 CLASS="FILENAME"
1051 >W32X86</TT
1052 > already
1053 existed in the [print$] driver download share (from a previous driver
1054 installation). They are harmless here.</P
1055 ><P
1056 >Now your printer is prepared for the clients to use. From
1057 a client, browse to the CUPS/Samba server, open the "Printers"
1058 share, right-click on this printer and select "Install..." or
1059 "Connect..." (depending on the Windows version you use). Now their
1060 should be a new printer in your client's local "Printers" folder,
1061 named (in my case) "infotec_IS2027 on kdebitshop"</P
1062 ><P
1063 ><SPAN
1064 CLASS="emphasis"
1065 ><I
1066 CLASS="EMPHASIS"
1067 >NOTE: </I
1068 ></SPAN
1069 >
1070 <B
1071 CLASS="COMMAND"
1072 >cupsaddsmb</B
1073 > will only reliably work i
1074 with CUPS version 1.1.15 or higher
1075 and Samba from 2.2.4. If it doesn't work, or if the automatic printer
1076 driver download to the clients doesn't succeed, you can still manually
1077 install the CUPS printer PPD on top of the Adobe PostScript driver on
1078 clients and then point the client's printer queue to the Samba printer
1079 share for connection, should you desire to use the CUPS networked
1080 PostScript RIP functions.</P
1081 ></DIV
1082 ></DIV
1083 ><DIV
1084 CLASS="SECT1"
1085 ><H1
1086 CLASS="SECT1"
1087 ><A
1088 NAME="AEN2212"
1089 >14.8. The CUPS Filter Chains</A
1090 ></H1
1091 ><P
1092 >The following diagrams reveal how CUPS handles print jobs.</P
1093 ><PRE
1094 CLASS="PROGRAMLISTING"
1095 >#########################################################################
1096 #
1097 # CUPS in and of itself has this (general) filter chain (CAPITAL
1098 # letters are FILE-FORMATS or MIME types, other are filters (this is
1099 # true for pre-1.1.15 of pre-4.3 versions of CUPS and ESP PrintPro):
1100 #
1101 # <VAR
1102 CLASS="REPLACEABLE"
1103 >SOMETHNG</VAR
1104 >-FILEFORMAT
1105 #      |
1106 #      |
1107 #      V
1108 #     <VAR
1109 CLASS="REPLACEABLE"
1110 >something</VAR
1111 >tops
1112 #      |
1113 #      |
1114 #      V
1115 # APPLICATION/POSTSCRIPT
1116 #      |
1117 #      |
1118 #      V
1119 #     pstops
1120 #      |
1121 #      |
1122 #      V
1123 # APPLICATION/VND.CUPS-POSTSCRIPT
1124 #      |
1125 #      |
1126 #      V
1127 #     pstoraster   # as shipped with CUPS, independent from any Ghostscipt
1128 #      |           # installation on the system
1129 #      |  (= "postscipt interpreter")
1130 #      |
1131 #      V
1132 # APPLICATION/VND.CUPS-RASTER
1133 #      |
1134 #      |
1135 #      V
1136 #     rasterto<VAR
1137 CLASS="REPLACEABLE"
1138 >something</VAR
1139 >  (f.e. Gimp-Print filters may be plugged in here)
1140 #      |   (= "raster driver")
1141 #      |
1142 #      V
1143 # SOMETHING-DEVICE-SPECIFIC
1144 #      |
1145 #      |
1146 #      V
1147 #     backend
1148 #
1149 #
1150 # ESP PrintPro has some enhanced "rasterto<VAR
1151 CLASS="REPLACEABLE"
1152 >something</VAR
1153 >" filters as compared to
1154 # CUPS, and also a somewhat improved "pstoraster" filter.
1155 #
1156 # NOTE: Gimp-Print and some other 3rd-Party-Filters (like TurboPrint) to
1157 #       CUPS and ESP PrintPro plug-in where rasterto<VAR
1158 CLASS="REPLACEABLE"
1159 >something</VAR
1160 > is noted.
1161 #
1162 #########################################################################</PRE
1163 ><PRE
1164 CLASS="PROGRAMLISTING"
1165 >#########################################################################
1166 #
1167 # This is how "cupsomatic" comes into play:
1168 # =========================================
1169 #
1170 # <VAR
1171 CLASS="REPLACEABLE"
1172 >SOMETHNG</VAR
1173 >-FILEFORMAT
1174 #      |
1175 #      |
1176 #      V
1177 #    <VAR
1178 CLASS="REPLACEABLE"
1179 >something</VAR
1180 >tops
1181 #      |
1182 #      |
1183 #      V
1184 # APPLICATION/POSTSCRIPT
1185 #      |
1186 #      |
1187 #      V
1188 #    pstops
1189 #      |
1190 #      |
1191 #      V
1192 # APPLICATION/VND.CUPS-POSTSCRIPT ----------------+
1193 #      |                                          |
1194 #      |                                          V
1195 #      V                                         cupsomatic
1196 #    pstoraster                                  (constructs complicated
1197 #      |  (= "postscipt interpreter")            Ghostscript commandline
1198 #      |                                         to let the file be
1199 #      V                                         processed by a
1200 # APPLICATION/VND.CUPS-RASTER                    "-sDEVICE=<VAR
1201 CLASS="REPLACEABLE"
1202 >s.th.</VAR
1203 >"
1204 #      |                                         call...)
1205 #      |                                          |
1206 #      V                                          |
1207 #    rasterto<VAR
1208 CLASS="REPLACEABLE"
1209 >something</VAR
1210 >                          V
1211 #      |    (= "raster driver")     +-------------------------+
1212 #      |                            | Ghostscript at work.... |
1213 #      V                            |                         |
1214 # SOMETHING-DEVICE-SPECIFIC         *-------------------------+
1215 #      |                                          |
1216 #      |                                          |
1217 #      V                                          |
1218 #    backend &#62;------------------------------------+
1219 #      |
1220 #      |
1221 #      V
1222 #    THE PRINTER
1223 #
1224 #
1225 # Note, that cupsomatic "kidnaps" the printfile after the
1226 # "APPLICATION/VND.CUPS-POSTSCRPT" stage and deviates it through
1227 # the CUPS-external, systemwide Ghostscript installation, bypassing the
1228 # "pstoraster" filter (therefor also bypassing the CUPS-raster-drivers
1229 # "rasterto<VAR
1230 CLASS="REPLACEABLE"
1231 >something</VAR
1232 >", and hands the rasterized file directly to the CUPS
1233 # backend...
1234 #
1235 # cupsomatic is not made by the CUPS developers. It is an independent
1236 # contribution to printing development, made by people from
1237 # Linuxprinting.org. (see also http://www.cups.org/cups-help.html)
1238 #
1239 # NOTE: Gimp-Print and some other 3rd-Party-Filters (like TurboPrint) to
1240 #       CUPS and ESP PrintPro plug-in where rasterto<VAR
1241 CLASS="REPLACEABLE"
1242 >something</VAR
1243 > is noted.
1244 #
1245 #########################################################################</PRE
1246 ><PRE
1247 CLASS="PROGRAMLISTING"
1248 >#########################################################################
1249 #
1250 # And this is how it works for ESP PrintPro from 4.3:
1251 # ===================================================
1252 #
1253 # <VAR
1254 CLASS="REPLACEABLE"
1255 >SOMETHNG</VAR
1256 >-FILEFORMAT
1257 #      |
1258 #      |
1259 #      V
1260 #     <VAR
1261 CLASS="REPLACEABLE"
1262 >something</VAR
1263 >tops
1264 #      |
1265 #      |
1266 #      V
1267 # APPLICATION/POSTSCRIPT
1268 #      |
1269 #      |
1270 #      V
1271 #     pstops
1272 #      |
1273 #      |
1274 #      V
1275 # APPLICATION/VND.CUPS-POSTSCRIPT
1276 #      |
1277 #      |
1278 #      V
1279 #     gsrip
1280 #      |  (= "postscipt interpreter")
1281 #      |
1282 #      V
1283 # APPLICATION/VND.CUPS-RASTER
1284 #      |
1285 #      |
1286 #      V
1287 #     rasterto<VAR
1288 CLASS="REPLACEABLE"
1289 >something</VAR
1290 >  (f.e. Gimp-Print filters may be plugged in here)
1291 #      |   (= "raster driver")
1292 #      |
1293 #      V
1294 # SOMETHING-DEVICE-SPECIFIC
1295 #      |
1296 #      |
1297 #      V
1298 #     backend
1299 #
1300 # NOTE: Gimp-Print and some other 3rd-Party-Filters (like TurboPrint) to
1301 #       CUPS and ESP PrintPro plug-in where rasterto<VAR
1302 CLASS="REPLACEABLE"
1303 >something</VAR
1304 > is noted.
1305 #
1306 #########################################################################</PRE
1307 ><PRE
1308 CLASS="PROGRAMLISTING"
1309 >#########################################################################
1310 #
1311 # This is how "cupsomatic" would come into play with ESP PrintPro:
1312 # ================================================================
1313 #
1314 #
1315 # <VAR
1316 CLASS="REPLACEABLE"
1317 >SOMETHNG</VAR
1318 >-FILEFORMAT
1319 #      |
1320 #      |
1321 #      V
1322 #    <VAR
1323 CLASS="REPLACEABLE"
1324 >something</VAR
1325 >tops
1326 #      |
1327 #      |
1328 #      V
1329 # APPLICATION/POSTSCRIPT
1330 #      |
1331 #      |
1332 #      V
1333 #    pstops
1334 #      |
1335 #      |
1336 #      V
1337 # APPLICATION/VND.CUPS-POSTSCRIPT ----------------+
1338 #      |                                          |
1339 #      |                                          V
1340 #      V                                         cupsomatic
1341 #    gsrip                                       (constructs complicated
1342 #      |  (= "postscipt interpreter")            Ghostscript commandline
1343 #      |                                         to let the file be
1344 #      V                                         processed by a
1345 # APPLICATION/VND.CUPS-RASTER                    "-sDEVICE=<VAR
1346 CLASS="REPLACEABLE"
1347 >s.th.</VAR
1348 >"
1349 #      |                                         call...)
1350 #      |                                          |
1351 #      V                                          |
1352 #    rasterto<VAR
1353 CLASS="REPLACEABLE"
1354 >something</VAR
1355 >                          V
1356 #      |   (= "raster driver")      +-------------------------+
1357 #      |                            | Ghostscript at work.... |
1358 #      V                            |                         |
1359 # SOMETHING-DEVICE-SPECIFIC         *-------------------------+
1360 #      |                                          |
1361 #      |                                          |
1362 #      V                                          |
1363 #    backend &#62;------------------------------------+
1364 #      |
1365 #      |
1366 #      V
1367 #    THE PRINTER
1368 #
1369 # NOTE: Gimp-Print and some other 3rd-Party-Filters (like TurboPrint) to
1370 #       CUPS and ESP PrintPro plug-in where rasterto<VAR
1371 CLASS="REPLACEABLE"
1372 >something</VAR
1373 > is noted.
1374 #
1375 #########################################################################</PRE
1376 ><PRE
1377 CLASS="PROGRAMLISTING"
1378 >#########################################################################
1379 #
1380 # And this is how it works for CUPS from 1.1.15:
1381 # ==============================================
1382 #
1383 # <VAR
1384 CLASS="REPLACEABLE"
1385 >SOMETHNG</VAR
1386 >-FILEFORMAT
1387 #      |
1388 #      |
1389 #      V
1390 #     <VAR
1391 CLASS="REPLACEABLE"
1392 >something</VAR
1393 >tops
1394 #      |
1395 #      |
1396 #      V
1397 # APPLICATION/POSTSCRIPT
1398 #      |
1399 #      |
1400 #      V
1401 #     pstops
1402 #      |
1403 #      |
1404 #      V
1405 # APPLICATION/VND.CUPS-POSTSCRIPT-----+
1406 #                                     |
1407 #                  +------------------v------------------------------+
1408 #                  | Ghostscript                                     |
1409 #                  | at work...                                      |
1410 #                  | (with                                           |
1411 #                  | "-sDEVICE=cups")                                |
1412 #                  |                                                 |
1413 #                  |         (= "postscipt interpreter")             |
1414 #                  |                                                 |
1415 #                  +------------------v------------------------------+
1416 #                                     |
1417 #                                     |
1418 # APPLICATION/VND.CUPS-RASTER &#62;-------+
1419 #      |
1420 #      |
1421 #      V
1422 #     rasterto<VAR
1423 CLASS="REPLACEABLE"
1424 >something</VAR
1425 >
1426 #      |   (= "raster driver")
1427 #      |
1428 #      V
1429 # SOMETHING-DEVICE-SPECIFIC
1430 #      |
1431 #      |
1432 #      V
1433 #     backend
1434 #
1435 #
1436 # NOTE: since version 1.1.15 CUPS "outsourced" the pstoraster process to
1437 #       Ghostscript. GNU Ghostscript needs to be patched to handle the
1438 #       CUPS requirement; ESP Ghostscript has this builtin. In any case,
1439 #       "gs -h" needs to show up a "cups" device. pstoraster is now a
1440 #       calling an appropriate "gs -sDEVICE=cups..." commandline to do
1441 #       the job. It will output "application/vnd.cup-raster", which will
1442 #       be finally processed by a CUPS raster driver "rasterto<VAR
1443 CLASS="REPLACEABLE"
1444 >something</VAR
1445 >"
1446 #       Note the difference to "cupsomatic", which will *not* output
1447 #       CUPS-raster, but a final version of the printfile, ready to be
1448 #       sent to the printer. cupsomatic also doesn't use the "cups"
1449 #       devicemode in Ghostscript, but one of the classical devicemodes....
1450 #
1451 # NOTE: Gimp-Print and some other 3rd-Party-Filters (like TurboPrint) to
1452 #       CUPS and ESP PrintPro plug-in where rasterto<VAR
1453 CLASS="REPLACEABLE"
1454 >something</VAR
1455 > is noted.
1456 #
1457 #########################################################################</PRE
1458 ><PRE
1459 CLASS="PROGRAMLISTING"
1460 >#########################################################################
1461 #
1462 # And this is how it works for CUPS from 1.1.15, with cupsomatic included:
1463 # ========================================================================
1464 #
1465 # <VAR
1466 CLASS="REPLACEABLE"
1467 >SOMETHNG</VAR
1468 >-FILEFORMAT
1469 #      |
1470 #      |
1471 #      V
1472 #     <VAR
1473 CLASS="REPLACEABLE"
1474 >something</VAR
1475 >tops
1476 #      |
1477 #      |
1478 #      V
1479 # APPLICATION/POSTSCRIPT
1480 #      |
1481 #      |
1482 #      V
1483 #     pstops
1484 #      |
1485 #      |
1486 #      V
1487 # APPLICATION/VND.CUPS-POSTSCRIPT-----+
1488 #                                     |
1489 #                  +------------------v------------------------------+
1490 #                  | Ghostscript        . Ghostscript at work....    |
1491 #                  | at work...         . (with "-sDEVICE=           |
1492 #                  | (with              .            <VAR
1493 CLASS="REPLACEABLE"
1494 >s.th.</VAR
1495 >"        |
1496 #                  | "-sDEVICE=cups")   .                            |
1497 #                  |                    .                            |
1498 #                  | (CUPS standard)    .      (cupsomatic)          |
1499 #                  |                    .                            |
1500 #                  |          (= "postscript interpreter")           |
1501 #                  |                    .                            |
1502 #                  +------------------v--------------v---------------+
1503 #                                     |              |
1504 #                                     |              |
1505 # APPLICATION/VND.CUPS-RASTER &#62;-------+              |
1506 #      |                                             |
1507 #      |                                             |
1508 #      V                                             |
1509 #     rasterto<VAR
1510 CLASS="REPLACEABLE"
1511 >something</VAR
1512 >                            |
1513 #      |   (= "raster driver")                       |
1514 #      |                                             |
1515 #      V                                             |
1516 # SOMETHING-DEVICE-SPECIFIC &#62;------------------------+
1517 #      |
1518 #      |
1519 #      V
1520 #     backend
1521 #
1522 #
1523 # NOTE: Gimp-Print and some other 3rd-Party-Filters (like TurboPrint) to
1524 #       CUPS and ESP PrintPro plug-in where rasterto<VAR
1525 CLASS="REPLACEABLE"
1526 >something</VAR
1527 > is noted.
1528 #
1529 ##########################################################################</PRE
1530 ></DIV
1531 ><DIV
1532 CLASS="SECT1"
1533 ><H1
1534 CLASS="SECT1"
1535 ><A
1536 NAME="AEN2251"
1537 >14.9. CUPS Print Drivers and Devices</A
1538 ></H1
1539 ><P
1540 >CUPS ships with good support for HP LaserJet type printers. You can install
1541 the driver as follows:
1542
1543 <P
1544 ></P
1545 ><UL
1546 ><LI
1547 ><P
1548 >       lpadmin -p laserjet4plus -v parallel:/dev/lp0 -E -m laserjet.ppd
1549         </P
1550 ></LI
1551 ></UL
1552 >
1553
1554 (The "-m" switch will retrieve the "laserjet.ppd" from the standard repository
1555 for not-yet-installed-PPDs, which CUPS typically stores in 
1556 <TT
1557 CLASS="FILENAME"
1558 >/usr/share/cups/model</TT
1559 >. Alternatively, you may use
1560 "-P /absolute/filesystem/path/to/where/there/is/PPD/your.ppd").</P
1561 ><DIV
1562 CLASS="SECT2"
1563 ><H2
1564 CLASS="SECT2"
1565 ><A
1566 NAME="AEN2258"
1567 >14.9.1. Further printing steps</A
1568 ></H2
1569 ><P
1570 >Always also consult the database on linuxprinting.org for all recommendations
1571 about which driver is best used for each printer:</P
1572 ><P
1573 ><A
1574 HREF="http://www.linuxprinting.org/printer_list.cgi"
1575 TARGET="_top"
1576 >http://www.linuxprinting.org/printer_list.cgi</A
1577 ></P
1578 ><P
1579 >There select your model and click on "Show". You'll arrive at a page listing
1580 all drivers working with your model. There will always be *one* 
1581 <SPAN
1582 CLASS="emphasis"
1583 ><I
1584 CLASS="EMPHASIS"
1585 >recommended</I
1586 ></SPAN
1587 > one. Try this one first. In your case
1588 ("HP LaserJet 4 Plus"), you'll arrive here:</P
1589 ><P
1590 ><A
1591 HREF="http://www.linuxprinting.org/show_printer.cgi?recnum=75104"
1592 TARGET="_top"
1593 >http://www.linuxprinting.org/show_printer.cgi?recnum=75104</A
1594 ></P
1595 ><P
1596 >The recommended driver is "ljet4". It has a link to the page for the ljet4
1597 driver too:</P
1598 ><P
1599 ><A
1600 HREF="http://www.linuxprinting.org/show_driver.cgi?driver=ljet4"
1601 TARGET="_top"
1602 >http://www.linuxprinting.org/show_driver.cgi?driver=ljet4</A
1603 ></P
1604 ><P
1605 >On the driver's page, you'll find important and detailed info about how to use
1606 that driver within the various available spoolers. You can generate a PPD for
1607 CUPS. The PPD contains all the info about how to use your model and the driver;
1608 this is, once installed, working transparently for the user -- you'll only
1609 need to choose resolution, paper size etc. from the web-based menu or from
1610 the print dialog GUI or from the commandline...</P
1611 ><P
1612 >On the driver's page, choose to use the "PPD-O-Matic" online PPD generator
1613 program. Select your model and click "Generate PPD file". When you safe the
1614 appearing ASCII text file, don't use "cut'n'past" (as it could possiblly corrupt
1615 line endings and tabs), but use "Save as..." in your browser's menu. Save it
1616 at "/some/path/on/your/filesystem/somewhere/my-name-for-my-printer.ppd"</P
1617 ><P
1618 >Then install the printer:</P
1619 ><P
1620 ><PRE
1621 CLASS="PROGRAMLISTING"
1622 >    "lpadmin -p laserjet4plus -v parallel:/dev/lp0 -E \
1623           -P /some/path/on/your/filesystem/somewhere/my-name-for-my-printer.ppd"</PRE
1624 ></P
1625 ><P
1626 >Note, that for all the "Foomatic-PPDs" from Linuxprinting.org, you also need
1627 a special "CUPS filter" named "cupsomatic". Get the latest version of
1628 "cupsomatic" from:</P
1629 ><P
1630 ><A
1631 HREF="http://www.linuxprinting.org/cupsomatic"
1632 TARGET="_top"
1633 >http://www.linuxprinting.org/cupsomatic</A
1634 ></P
1635 ><P
1636 >This needs to be copied to <TT
1637 CLASS="FILENAME"
1638 >/usr/lib/cups/filter/cupsomatic</TT
1639 >
1640 and be made world executable. This filter is needed to read and act upon the
1641 specially encoded Foomatic comments, embedded in the printfile, which in turn
1642 are used to construct (transparently for you, the user) the complicated
1643 ghostscript command line needed for your printer/driver combo.</P
1644 ><P
1645 >You can have a look at all the options for the Ghostscript commandline supported
1646 by your printer and the ljet4 driver by going to the section "Execution details",
1647 selecting your model (Laserjet 4 Plus) and clicking on "Show execution details".
1648 This will bring up this web page:</P
1649 ><P
1650 ><A
1651 HREF="http://www.linuxprinting.org/execution.cgi?driver=ljet4&printer=75104&.submit=Show+execution+details"
1652 TARGET="_top"
1653 >http://www.linuxprinting.org/execution.cgi?driver=ljet4&#38;printer=75104&#38;.submit=Show+execution+details</A
1654 ></P
1655 ><P
1656 >The ingenious thing is that the database is kept current. If there
1657 is a bug fix and an improvement somewhere in the database, you will
1658 always get the most current and stable and feature-rich driver by following
1659 the steps described above.</P
1660 ><DIV
1661 CLASS="NOTE"
1662 ><P
1663 ></P
1664 ><TABLE
1665 CLASS="NOTE"
1666 WIDTH="100%"
1667 BORDER="0"
1668 ><TR
1669 ><TD
1670 WIDTH="25"
1671 ALIGN="CENTER"
1672 VALIGN="TOP"
1673 ><IMG
1674 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif"
1675 HSPACE="5"
1676 ALT="Note"></TD
1677 ><TD
1678 ALIGN="LEFT"
1679 VALIGN="TOP"
1680 ><P
1681 >Till Kamppeter from MandrakeSoft is doing an excellent job here that too few
1682 people are aware of. (So if you use it often, please send him a note showing
1683 your appreciation).</P
1684 ></TD
1685 ></TR
1686 ></TABLE
1687 ></DIV
1688 ><P
1689 >The latest and greatest improvement now is support for "custom page sizes"
1690 for all those printers which support it.</P
1691 ><P
1692 >"cupsomatic" is documented here:</P
1693 ><P
1694 ><A
1695 HREF="http://www.linuxprinting.org/cups-doc.html"
1696 TARGET="_top"
1697 >http://www.linuxprinting.org/cups-doc.html</A
1698 ></P
1699 ><P
1700 >More printing tutorial info may be found here:</P
1701 ><P
1702 ><A
1703 HREF="http://www.linuxprinting.org/kpfeifle/LinuxKongress2002/Tutorial/"
1704 TARGET="_top"
1705 >http://www.linuxprinting.org/kpfeifle/LinuxKongress2002/Tutorial/</A
1706 ></P
1707 ><P
1708 >Note, that *all* the Foomatic drivers listed on Linuxprinting.org (now
1709 approaching the "all-time high" number of 1.000 for the supported models)
1710 are using a special filtering chain involving Ghostscript, as described
1711 in this document.</P
1712 ><P
1713 >Summary - You need:</P
1714 ><P
1715 ><P
1716 ></P
1717 ><TABLE
1718 BORDER="0"
1719 ><TBODY
1720 ><TR
1721 ><TD
1722 >A "foomatic+<VAR
1723 CLASS="REPLACEABLE"
1724 >something</VAR
1725 >" PPD is not enough to print with CUPS (but it is *one* important component)</TD
1726 ></TR
1727 ><TR
1728 ><TD
1729 >The "cupsomatic" filter script (Perl) in <TT
1730 CLASS="FILENAME"
1731 >/usr/lib/cups/filters/</TT
1732 ></TD
1733 ></TR
1734 ><TR
1735 ><TD
1736 >Perl to make cupsomatic run</TD
1737 ></TR
1738 ><TR
1739 ><TD
1740 >Ghostscript (because it is called and controlled by the PPD/cupsomatic combo in a way to fit your printermodel/driver combo.</TD
1741 ></TR
1742 ><TR
1743 ><TD
1744 >Ghostscript *must*, depending on the driver/model, contain support for a certain "device" (as shown by "gs -h")</TD
1745 ></TR
1746 ></TBODY
1747 ></TABLE
1748 ><P
1749 ></P
1750 ></P
1751 ><P
1752 >In the case of the "hpijs" driver, you need a Ghostscript version, which
1753 has "ijs" amongst its supported devices in "gs -h". In the case of
1754 "hpijs+foomatic", a valid ghostscript commandline would be reading like this:</P
1755 ><P
1756 ><PRE
1757 CLASS="PROGRAMLISTING"
1758 >       gs -q -dBATCH -dPARANOIDSAFER -dQUIET -dNOPAUSE -sDEVICE=ijs       \
1759              -sIjsServer=hpijs<VAR
1760 CLASS="REPLACEABLE"
1761 >PageSize</VAR
1762 > -dDuplex=<VAR
1763 CLASS="REPLACEABLE"
1764 >Duplex</VAR
1765 > <VAR
1766 CLASS="REPLACEABLE"
1767 >Model</VAR
1768 >        \
1769              -r<VAR
1770 CLASS="REPLACEABLE"
1771 >Resolution</VAR
1772 >,PS:MediaPosition=<VAR
1773 CLASS="REPLACEABLE"
1774 >InputSlot</VAR
1775 > -dIjsUseOutputFD \
1776              -sOutputFile=- -</PRE
1777 ></P
1778 ><DIV
1779 CLASS="NOTE"
1780 ><P
1781 ></P
1782 ><TABLE
1783 CLASS="NOTE"
1784 WIDTH="100%"
1785 BORDER="0"
1786 ><TR
1787 ><TD
1788 WIDTH="25"
1789 ALIGN="CENTER"
1790 VALIGN="TOP"
1791 ><IMG
1792 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif"
1793 HSPACE="5"
1794 ALT="Note"></TD
1795 ><TD
1796 ALIGN="LEFT"
1797 VALIGN="TOP"
1798 ><P
1799 >Note, that with CUPS and the "hpijs+foomatic" PPD (plus Perl and cupsomatic)
1800 you don't need to remember this. You can choose the available print options
1801 thru a GUI print command (like "glp" from ESP's commercially supported
1802 PrintPro software, or KDE's "kprinter", or GNOME's "gtklp" or the independent
1803 "xpp") or the CUPS web interface via human-readable drop-down selection
1804 menus.</P
1805 ></TD
1806 ></TR
1807 ></TABLE
1808 ></DIV
1809 ><P
1810 >If you use "ESP Ghostscript" (also under the GPL, provided by Easy Software
1811 Products, the makers of CUPS, downloadable from
1812 <A
1813 HREF="http://www.cups.org/software.html"
1814 TARGET="_top"
1815 >http://www.cups.org/software.html</A
1816 >,
1817 co-maintained by the developers of linuxprinting.org), you are guaranteed to
1818 have in use the most uptodate, bug-fixed, enhanced and stable version of a Free
1819 Ghostscript. It contains support for ~300 devices, whereas plain vanilla
1820 GNU Ghostscript 7.05 only has ~200.</P
1821 ><P
1822 >If you print only one CUPS test page, from the web interface and when you try to
1823 print a windows test page, it acts like the job was never sent:
1824
1825 <P
1826 ></P
1827 ><TABLE
1828 BORDER="0"
1829 ><TBODY
1830 ><TR
1831 ><TD
1832 >Can you print "standard" jobs from the CUPS machine?</TD
1833 ></TR
1834 ><TR
1835 ><TD
1836 >Are the jobs from Windows visible in the Web interface on CUPS (http://localhost:631/)?</TD
1837 ></TR
1838 ><TR
1839 ><TD
1840 ><SPAN
1841 CLASS="emphasis"
1842 ><I
1843 CLASS="EMPHASIS"
1844 >Most important:</I
1845 ></SPAN
1846 > What kind of printer driver are you using on the Windows clients?</TD
1847 ></TR
1848 ></TBODY
1849 ></TABLE
1850 ><P
1851 ></P
1852 >
1853
1854 You can try to get a more detailed debugging info by setting "LogLevel debug" in
1855 <TT
1856 CLASS="FILENAME"
1857 >/etc/cups/cupsd.conf</TT
1858 >, re-start cupsd and investigate <TT
1859 CLASS="FILENAME"
1860 >/var/log/cups/error_log</TT
1861 >
1862 for the whereabouts of your Windows-originating printjobs:</P
1863 ><P
1864 ></P
1865 ><TABLE
1866 BORDER="0"
1867 ><TBODY
1868 ><TR
1869 ><TD
1870 >what does the "auto-typing" line say? which is the "MIME type" CUPS thinks is arriving from the Windows clients?</TD
1871 ></TR
1872 ><TR
1873 ><TD
1874 >are there "filter" available for this MIME type?</TD
1875 ></TR
1876 ><TR
1877 ><TD
1878 >are there "filter rules" defined in "/etc/cups/mime.convs" for this MIME type?</TD
1879 ></TR
1880 ></TBODY
1881 ></TABLE
1882 ><P
1883 ></P
1884 ></DIV
1885 ></DIV
1886 ><DIV
1887 CLASS="SECT1"
1888 ><H1
1889 CLASS="SECT1"
1890 ><A
1891 NAME="AEN2328"
1892 >14.10. Limiting the number of pages users can print</A
1893 ></H1
1894 ><P
1895 >The feature you want is dependent on the real print subsystem you're using.
1896 Samba's part is always to receive the job files from the clients (filtered
1897 *or* unfiltered) and hand it over to this printing subsystem.</P
1898 ><P
1899 >Of course one could "hack" things with one's own scripts.</P
1900 ><P
1901 >But there is CUPS (Common Unix Printing System). CUPS supports "quotas".
1902 Quotas can be based on sizes of jobs or on the number of pages or both,
1903 and are spanning any time period you want.</P
1904 ><P
1905 >This is an example command how root would set a print quota in CUPS,
1906 assuming an existing printer named "quotaprinter":</P
1907 ><PRE
1908 CLASS="PROGRAMLISTING"
1909 >  lpadmin -p quotaprinter -o job-quota-period=604800 -o job-k-limit=1024 \
1910        -o job-page-limit=100</PRE
1911 ><P
1912 >This would limit every single user to print 100 pages or 1024 KB of
1913 data (whichever comes first) within the last 604.800 seconds ( = 1 week).</P
1914 ><P
1915 >For CUPS to count correctly, the printfile needs to pass the CUPS "pstops" filter,
1916 otherwise it uses a "dummy" count of "1". Some printfiles don't pass it
1917 (eg: image files) but then those are mostly 1 page jobs anyway. This also means,
1918 proprietary drivers for the target printer running on the client computers and
1919 CUPS/Samba then spooling these files as "raw" (i.e. leaving them untouched, not
1920 filtering them), will be counted as "1-pagers" too!</P
1921 ><P
1922 >You need to send PostScript from the clients (i.e. run a PostScript driver there)
1923 for having the chance to get accounting done. If the printer is a non-PostScript model,
1924 you need to let CUPS do the job to convert the file to a print-ready format for the
1925 target printer. This will be working for currently ~1.000 different printer models, see</P
1926 ><PRE
1927 CLASS="PROGRAMLISTING"
1928 >     http://www.linuxprinting.org/printer_list.cgi</PRE
1929 ><P
1930 >Before CUPS-1.1.16 your only option was to use the Adobe PostScript
1931 Driver on the Windows clients. The output of this driver was not always
1932 passed thru the "pstops" filter on the CUPS/Samba side, and therefor was
1933 not counted correctly (the reason is that it often --- depending on the
1934 "PPD" being used --- did write a "PJL"-header in front of the real
1935 PostScript which made CUPS to skip the pstops and go directy to
1936 the "pstoraster" stage).</P
1937 ><P
1938 >From CUPS-1.1.16 onward you can use the "CUPS PostScript Driver
1939 for Windows NT/2K/XP clients" (it is tagged in the download area of
1940 http://www.cups.org/ as the "cups-samba-1.1.16.tar.gz" package).
1941 It is *not* working for Win9x/ME clients. But it:</P
1942 ><P
1943 ></P
1944 ><TABLE
1945 BORDER="0"
1946 ><TBODY
1947 ><TR
1948 ><TD
1949 >it guarantees to not write an PJL-header</TD
1950 ></TR
1951 ><TR
1952 ><TD
1953 >it guarantees to still read and support all PJL-options named in the driver PPD with its own means</TD
1954 ></TR
1955 ><TR
1956 ><TD
1957 >it guarantees the file going thru the "pstops" filter on the CUPS/Samba server</TD
1958 ></TR
1959 ><TR
1960 ><TD
1961 >it guarantees to page-count correctly the printfile</TD
1962 ></TR
1963 ></TBODY
1964 ></TABLE
1965 ><P
1966 ></P
1967 ><P
1968 >You can read more about the setup of this combination in the
1969 manpage for "cupsaddsmb" (only present with CUPS installed, only
1970 current with CUPS 1.1.16).</P
1971 ><P
1972 >These are the items CUPS logs in the "page_log" for every single *page* of a job:</P
1973 ><P
1974 ><P
1975 ></P
1976 ><TABLE
1977 BORDER="0"
1978 ><TBODY
1979 ><TR
1980 ><TD
1981 >Printer name</TD
1982 ></TR
1983 ><TR
1984 ><TD
1985 >User name</TD
1986 ></TR
1987 ><TR
1988 ><TD
1989 >Job ID</TD
1990 ></TR
1991 ><TR
1992 ><TD
1993 >Time of printing</TD
1994 ></TR
1995 ><TR
1996 ><TD
1997 >the page number</TD
1998 ></TR
1999 ><TR
2000 ><TD
2001 >the number of copies</TD
2002 ></TR
2003 ><TR
2004 ><TD
2005 >a billing info string (optional)</TD
2006 ></TR
2007 ></TBODY
2008 ></TABLE
2009 ><P
2010 ></P
2011 ></P
2012 ><P
2013 >Here is an extract of my CUPS server's page_log file to illustrate
2014 the format and included items:</P
2015 ><P
2016 ><SAMP
2017 CLASS="COMPUTEROUTPUT"
2018 >       infotec_IS2027 kurt 40 [22/Nov/2002:13:18:03 +0100] 1 2  #marketing
2019         infotec_IS2027 kurt 40 [22/Nov/2002:13:18:03 +0100] 2 2  #marketing
2020         infotec_IS2027 kurt 40 [22/Nov/2002:13:18:03 +0100] 3 2  #marketing
2021         infotec_IS2027 kurt 40 [22/Nov/2002:13:18:03 +0100] 4 2  #marketing
2022         infotec_IS2027 kurt 40 [22/Nov/2002:13:18:03 +0100] 5 2  #marketing
2023         infotec_IS2027 kurt 40 [22/Nov/2002:13:18:03 +0100] 6 2  #marketing</SAMP
2024 ></P
2025 ><P
2026 >This was Job ID "40", printed on "infotec_IS2027" by user "kurt", a 6-page job
2027 printed in 2 copies and billed to "#marketing"...</P
2028 ><P
2029 >What flaws or shortcomings are there?</P
2030 ><P
2031 ></P
2032 ><TABLE
2033 BORDER="0"
2034 ><TBODY
2035 ><TR
2036 ><TD
2037 >the ones named above</TD
2038 ></TR
2039 ><TR
2040 ><TD
2041 >       CUPS really counts the job pages being *processsed in software*
2042         (going thru the "RIP") rather than the physical sheets successfully
2043         leaving the printing device -- if there is a jam while printing
2044         the 5th sheet out of 1000 and the job is aborted by the printer,
2045         the "page count" will still show the figure of 1000 for that job
2046         </TD
2047 ></TR
2048 ><TR
2049 ><TD
2050 >       all quotas are the same for all users (no flexibility to give the
2051         boss a higher quota than the clerk) no support for groups
2052         </TD
2053 ></TR
2054 ><TR
2055 ><TD
2056 >       no means to read out the current balance or "used-up" number of current quota
2057         </TD
2058 ></TR
2059 ><TR
2060 ><TD
2061 >       a user having used up 99 sheets of 100 quota will still be able to send and print a 1.000 sheet job
2062         </TD
2063 ></TR
2064 ><TR
2065 ><TD
2066 >       a user being denied a job because of a filled-up quota doesn't get a meaningful
2067         error message from CUPS other than "client-error-not-possible".
2068         </TD
2069 ></TR
2070 ></TBODY
2071 ></TABLE
2072 ><P
2073 ></P
2074 ><P
2075 >But this is the best system out there currently. And there are
2076 huge improvements under development:</P
2077 ><P
2078 ></P
2079 ><TABLE
2080 BORDER="0"
2081 ><TBODY
2082 ><TR
2083 ><TD
2084 >page counting will go into the "backends" (these talk
2085         directly to the printer and will increase the count in sync with the
2086          actual printing process -- a jam at the 5th sheet will lead to a stop in the counting)</TD
2087 ></TR
2088 ><TR
2089 ><TD
2090 >quotas will be handled more flexibly</TD
2091 ></TR
2092 ><TR
2093 ><TD
2094 >probably there will be support for users to inquire their "accounts" in advance</TD
2095 ></TR
2096 ><TR
2097 ><TD
2098 >probably there will be support for some other tools around this topic</TD
2099 ></TR
2100 ></TBODY
2101 ></TABLE
2102 ><P
2103 ></P
2104 ><P
2105 >Other than the current stage of the CUPS development, I don't
2106 know any other ready-to-use tool which you could consider.</P
2107 ><P
2108 >You can download the driver files from
2109 <A
2110 HREF="http://www.cups.org/software.html"
2111 TARGET="_top"
2112 >http://www.cups.org/software.html</A
2113 >.
2114 It is a separate package from the CUPS base software files, tagged as "CUPS 1.1.16
2115 Windows NT/2k/XP Printer Driver for SAMBA (tar.gz, 192k)". The filename to
2116 download is "cups-samba-1.1.16.tar.gz". Upon untar-/unzip-ping it will reveal
2117 the files:</P
2118 ><P
2119 >       <SAMP
2120 CLASS="COMPUTEROUTPUT"
2121 >          cups-samba.install
2122            cups-samba.license
2123            cups-samba.readme
2124            cups-samba.remove
2125            cups-samba.ss
2126         </SAMP
2127 >
2128         </P
2129 ><P
2130 >These have been packaged with the ESP meta packager software "EPM". The
2131 *.install and *.remove files are simple shell script, which untars the
2132 *.ss (which is nothing else than a tar-archive) and puts its contents
2133 into <TT
2134 CLASS="FILENAME"
2135 >/usr/share/cups/drivers/</TT
2136 >. Its contents are 3 files:</P
2137 ><P
2138 >       <SAMP
2139 CLASS="COMPUTEROUTPUT"
2140 >          cupsdrvr.dll
2141            cupsui.dll
2142            cups.hlp
2143         </SAMP
2144 >
2145         </P
2146 ><DIV
2147 CLASS="CAUTION"
2148 ><P
2149 ></P
2150 ><TABLE
2151 CLASS="CAUTION"
2152 WIDTH="100%"
2153 BORDER="0"
2154 ><TR
2155 ><TD
2156 WIDTH="25"
2157 ALIGN="CENTER"
2158 VALIGN="TOP"
2159 ><IMG
2160 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/caution.gif"
2161 HSPACE="5"
2162 ALT="Caution"></TD
2163 ><TD
2164 ALIGN="LEFT"
2165 VALIGN="TOP"
2166 ><P
2167 >Due to a bug one CUPS release puts the <TT
2168 CLASS="FILENAME"
2169 >cups.hlp</TT
2170 >
2171 into <TT
2172 CLASS="FILENAME"
2173 >/usr/share/drivers/</TT
2174 > instead of
2175 <TT
2176 CLASS="FILENAME"
2177 >/usr/share/cups/drivers/</TT
2178 >. To work around this, copy/move
2179 the file after running the "./cups-samba.install" script manually to the right place:</P
2180 ><P
2181 >       <KBD
2182 CLASS="USERINPUT"
2183 > cp /usr/share/drivers/cups.hlp /usr/share/cups/drivers/
2184         </KBD
2185 >
2186         </P
2187 ></TD
2188 ></TR
2189 ></TABLE
2190 ></DIV
2191 ><DIV
2192 CLASS="NOTE"
2193 ><P
2194 ></P
2195 ><TABLE
2196 CLASS="NOTE"
2197 WIDTH="100%"
2198 BORDER="0"
2199 ><TR
2200 ><TD
2201 WIDTH="25"
2202 ALIGN="CENTER"
2203 VALIGN="TOP"
2204 ><IMG
2205 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif"
2206 HSPACE="5"
2207 ALT="Note"></TD
2208 ><TD
2209 ALIGN="LEFT"
2210 VALIGN="TOP"
2211 ><P
2212 >This new CUPS PostScript driver is currently binary-only, but free
2213 no source code is provided (yet). The reason is this: it has
2214 been developed with the help of the Microsoft Driver Developer Kit (DDK)
2215 and compiled with Microsoft Visual Studio 6. It is not clear to the driver
2216 developers if they are allowed to distribute the whole of the source code
2217 as Free Software. However, they will likely release the "diff" in source
2218 code under the GPL, so anybody with a license of Visual Studio and a DDK
2219 will be able to compile for him/herself.</P
2220 ><P
2221 >Once you have run the install script (and possibly manually moved the
2222 "cups.hlp" file to "/usr/share/cups/drivers/"), the driver is ready to be
2223 put into Samba's [print$] share (which often maps to "/etc/samba/drivers/"
2224 and contains a subdir tree with WIN40 and W32X86 branches), by running
2225 "cupsaddsmb" (see also "man cupsaddsmb" for CUPS 1.1.16). [Don't forget to
2226 put root into the smbpasswd file by running "smbpasswd" should you run
2227 this whole procedure for the first time.] Once the driver files are in the
2228 [print$] share, they are ready to be downloaded and installed by the
2229 Win NT/2k/XP clients.</P
2230 ></TD
2231 ></TR
2232 ></TABLE
2233 ></DIV
2234 ><DIV
2235 CLASS="NOTE"
2236 ><P
2237 ></P
2238 ><TABLE
2239 CLASS="NOTE"
2240 WIDTH="100%"
2241 BORDER="0"
2242 ><TR
2243 ><TD
2244 WIDTH="25"
2245 ALIGN="CENTER"
2246 VALIGN="TOP"
2247 ><IMG
2248 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif"
2249 HSPACE="5"
2250 ALT="Note"></TD
2251 ><TD
2252 ALIGN="LEFT"
2253 VALIGN="TOP"
2254 ><P
2255 >       Win 9x/ME clients won't work with this driver. For these you'd
2256         still need to use the ADOBE*.* drivers as previously.
2257         </P
2258 ></TD
2259 ></TR
2260 ></TABLE
2261 ></DIV
2262 ><DIV
2263 CLASS="NOTE"
2264 ><P
2265 ></P
2266 ><TABLE
2267 CLASS="NOTE"
2268 WIDTH="100%"
2269 BORDER="0"
2270 ><TR
2271 ><TD
2272 WIDTH="25"
2273 ALIGN="CENTER"
2274 VALIGN="TOP"
2275 ><IMG
2276 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif"
2277 HSPACE="5"
2278 ALT="Note"></TD
2279 ><TD
2280 ALIGN="LEFT"
2281 VALIGN="TOP"
2282 ><P
2283 >       It is not harming if you've still the ADOBE*.* driver files from
2284         previous installations in the "/usr/share/cups/drivers/" directory.
2285         The new cupsaddsmb (from 1.1.16) will automatically use the
2286         "newest" installed driver (which here then is the CUPS drivers).
2287         </P
2288 ></TD
2289 ></TR
2290 ></TABLE
2291 ></DIV
2292 ><DIV
2293 CLASS="NOTE"
2294 ><P
2295 ></P
2296 ><TABLE
2297 CLASS="NOTE"
2298 WIDTH="100%"
2299 BORDER="0"
2300 ><TR
2301 ><TD
2302 WIDTH="25"
2303 ALIGN="CENTER"
2304 VALIGN="TOP"
2305 ><IMG
2306 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif"
2307 HSPACE="5"
2308 ALT="Note"></TD
2309 ><TD
2310 ALIGN="LEFT"
2311 VALIGN="TOP"
2312 ><P
2313 >       Should your Win clients have had the old ADOBE*.* files and the
2314         Adobe PostScript drivers installed, the download and installation
2315         of the new CUPS PostScript driver for Windows NT/2k/XP will fail
2316         at first.
2317         </P
2318 ><P
2319 >       It is not enough to "delete" the printer (as the driver files
2320         will still be kept by the clients and re-used if you try to
2321         re-install the printer). To really get rid of the Adobe driver
2322         files on the clients, open the "Printers" folder (possibly via
2323         "Start --&#62; Settings --&#62; Control Panel --&#62; Printers"), right-click
2324         onto the folder background and select "Server Properties". A
2325         new dialog opens; select the "Drivers" tab; on the list select
2326         the driver you want to delete and click on the "Delete" button.
2327         (This will only work if there is no single printer left which
2328         uses that particular driver -- you need to "delete" all printers
2329         using this driver in the "Printers" folder first.)
2330         </P
2331 ></TD
2332 ></TR
2333 ></TABLE
2334 ></DIV
2335 ><DIV
2336 CLASS="NOTE"
2337 ><P
2338 ></P
2339 ><TABLE
2340 CLASS="NOTE"
2341 WIDTH="100%"
2342 BORDER="0"
2343 ><TR
2344 ><TD
2345 WIDTH="25"
2346 ALIGN="CENTER"
2347 VALIGN="TOP"
2348 ><IMG
2349 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif"
2350 HSPACE="5"
2351 ALT="Note"></TD
2352 ><TD
2353 ALIGN="LEFT"
2354 VALIGN="TOP"
2355 ><P
2356 >       Once you have successfully downloaded the CUPS PostScript driver
2357         to a client, you can easily switch all printers to this one
2358         by proceeding as described elsewhere in the "Samba HOWTO
2359         Collection" to change a driver for an existing printer.
2360         </P
2361 ></TD
2362 ></TR
2363 ></TABLE
2364 ></DIV
2365 ><P
2366 >What are the benefits with the "CUPS PostScript driver for Windows NT/2k/XP"
2367 as compared to the Adobe drivers?</P
2368 ><P
2369 ><P
2370 ></P
2371 ><UL
2372 ><LI
2373 ><P
2374 >       no hassle with the Adobe EULA
2375         </P
2376 ></LI
2377 ><LI
2378 ><P
2379 >       no hassle with the question "where do I get the ADOBE*.* driver files from?"
2380         </P
2381 ></LI
2382 ><LI
2383 ><P
2384 >       the Adobe drivers (depending on the printer PPD associated with them)
2385         often put a PJL header in front of the core PostScript part of the print
2386         file (thus the file starts with "<VAR
2387 CLASS="REPLACEABLE"
2388 >1B</VAR
2389 >%-12345X" or "<VAR
2390 CLASS="REPLACEABLE"
2391 >escape</VAR
2392 >%-12345X"
2393         instead of "%!PS"). This leads to the CUPS daemon autotyping the
2394         arriving file as a print-ready file, not requiring a pass thru the
2395         "pstops" filter (to speak more technical, it is not regarded as the
2396         generic MIME type "application/postscript", but as the more special
2397         MIME type "application/cups.vnd-postscript"), which therefore also
2398         leads to the page accounting in "/var/log/cups/page_log" not receiving
2399         the exact mumber of pages; instead the dummy page number of "1" is
2400         logged in a standard setup)
2401         </P
2402 ></LI
2403 ><LI
2404 ><P
2405 >       the Adobe driver has more options to "mis-configure" the PostScript
2406         generated by it (like setting it inadvertedly to "Optimize for Speed",
2407         instead of "Optimize for Portability", which could lead to CUPS being
2408         unable to process it)
2409         </P
2410 ></LI
2411 ><LI
2412 ><P
2413 >       the CUPS PostScript driver output sent by Windows clients to the CUPS
2414         server will be guaranteed to be auto-typed as generic MIME type
2415         "application/postscript", thusly passing thru the CUPS "pstops" filter
2416         and logging the correct number of pages in the page_log for accounting
2417         and quota purposes
2418         </P
2419 ></LI
2420 ><LI
2421 ><P
2422 >       the CUPS PostScript driver supports the sending of additional print
2423         options by the Win NT/2k/XP clients, such as naming the CUPS standard
2424         banner pages (or the custom ones, should they be installed at the time
2425         of driver download), using the CUPS "page-label" option, setting a
2426         job-priority and setting the scheduled time of printing (with the option
2427         to support additional useful IPP job attributes in the future).
2428         </P
2429 ></LI
2430 ><LI
2431 ><P
2432 >       the CUPS PostScript driver supports the inclusion of the new
2433         "*cupsJobTicket" comments at the beginnig of the PostScript file (which
2434         could be used in the future for all sort of beneficial extensions on
2435         the CUPS side, but which will not disturb any other application as those
2436         will regard it as a comment and simply ignore it).
2437         </P
2438 ></LI
2439 ><LI
2440 ><P
2441 >       the CUPS PostScript driver will be the heart of the fully fledged CUPS
2442         IPP client for Windows NT/2k/XP to be released soon (probably alongside
2443         the first Beta release for CUPS 1.2).
2444         </P
2445 ></LI
2446 ></UL
2447 ></P
2448 ></DIV
2449 ><DIV
2450 CLASS="SECT1"
2451 ><H1
2452 CLASS="SECT1"
2453 ><A
2454 NAME="AEN2424"
2455 >14.11. Advanced Postscript Printing from MS Windows</A
2456 ></H1
2457 ><P
2458 >Let the Windows Clients use a PostScript driver to deliver poistscript to
2459 the samba print server (just like any Linux or Unix Client would also use
2460 PostScript to send to the server)</P
2461 ><P
2462 >Make the Unix printing subsystem to which Samba sends the job convert the
2463 incoming PostScript files to the native print format of the target printers
2464 (would be PCL if you have an HP printer)</P
2465 ><P
2466 >Now if you are afraid that this would just mean using a *Generic* PostScript
2467 driver for the clients that has no Simplex/Duplex selection, and no paper tray
2468 choice, but you need them to be able to set up print jobs, with all the bells
2469 and whistles of your printers:-</P
2470 ><P
2471 ></P
2472 ><TABLE
2473 BORDER="0"
2474 ><TBODY
2475 ><TR
2476 ><TD
2477 >Not possible with traditional spooling systems</TD
2478 ></TR
2479 ><TR
2480 ><TD
2481 >       But perfectly supported by CUPS (which uses "PPD" files to
2482         describe how to control the print options for PostScript and
2483         non-PostScript devices alike...
2484         </TD
2485 ></TR
2486 ></TBODY
2487 ></TABLE
2488 ><P
2489 ></P
2490 ><P
2491 >CUPS PPDs are working perfectly on Windows clients who use Adobe PostScript
2492 drivers (or the new CUPS PostScript driver for Windows NT/2K/XP). Clients can use
2493 them to setup the job to their liking and CUPS will use the received job options
2494 to make the (PCL-, ESC/P- or PostScript-) printer behave as required.</P
2495 ><P
2496 >If you want to have the additional benefit of page count logging and accounting
2497 then the CUPS PostScript driver is the best choice (better than the Adobe one).</P
2498 ><P
2499 >If you want to make the drivers downloadable for the clients then "cupsaddsmb" is
2500 your friend. It will setup the [print$] share on the Samba host to be ready to serve
2501 the clients for a "point and print" driver installation.</P
2502 ><DIV
2503 CLASS="WARNING"
2504 ><P
2505 ></P
2506 ><TABLE
2507 CLASS="WARNING"
2508 WIDTH="100%"
2509 BORDER="0"
2510 ><TR
2511 ><TD
2512 WIDTH="25"
2513 ALIGN="CENTER"
2514 VALIGN="TOP"
2515 ><IMG
2516 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/warning.gif"
2517 HSPACE="5"
2518 ALT="Warning"></TD
2519 ><TD
2520 ALIGN="LEFT"
2521 VALIGN="TOP"
2522 ><P
2523 >What strings are attached?</P
2524 ></TD
2525 ></TR
2526 ></TABLE
2527 ></DIV
2528 ><P
2529 >There are some. But, given the sheer CPU power you can buy nowadays,
2530 these can be overcome easily. The strings:</P
2531 ><P
2532 >Well, if the CUPS/Samba side will have to print to many printers serving many users,
2533 you probably will need to set up a second server (which can do automatic load balancing
2534 with the first one, plus a degree of fail-over mechanism). Converting the incoming
2535 PostScript jobs, "interpreting" them for non-PostScript printers, amounts to the work
2536 of a "RIP" (Raster Image Processor) done in software. This requires more CPU and RAM
2537 than for the mere "raw spooling" task your current setup is solving. It all depends
2538 on the avarage and peak printing load the server should be able to handle.</P
2539 ></DIV
2540 ><DIV
2541 CLASS="SECT1"
2542 ><H1
2543 CLASS="SECT1"
2544 ><A
2545 NAME="AEN2439"
2546 >14.12. Auto-Deletion of CUPS spool files</A
2547 ></H1
2548 ><P
2549 >Samba print files pass thru two "spool" directories. One the incoming directory
2550 managed by Samba, (set eg: in the <B
2551 CLASS="COMMAND"
2552 >path = /var/spool/samba</B
2553 > directive in the [printers]
2554 section of <TT
2555 CLASS="FILENAME"
2556 >smb.conf</TT
2557 >). Second is the spool directory of your UNIX print subsystem.
2558 For CUPS it is normally "/var/spool/cups/", as set by the cupsd.conf directive
2559 "RequestRoot /var/spool/cups".</P
2560 ><P
2561 >I am not sure, which one of your directories keeps the files.  From what you say,
2562 it is most likely the Samba part.</P
2563 ><P
2564 >For the CUPS part, you may want to consult:</P
2565 ><P
2566 ></P
2567 ><TABLE
2568 BORDER="0"
2569 ><TBODY
2570 ><TR
2571 ><TD
2572 >http://localhost:631/sam.html#PreserveJobFiles</TD
2573 ></TR
2574 ><TR
2575 ><TD
2576 >http://localhost:631/sam.html#PreserveJobHistory</TD
2577 ></TR
2578 ><TR
2579 ><TD
2580 >http://localhost:631/sam.html#MaxJobs</TD
2581 ></TR
2582 ></TBODY
2583 ></TABLE
2584 ><P
2585 ></P
2586 ><P
2587 >There are the settings described for your CUPS daemon, which could lead to completed
2588 job files not being deleted.</P
2589 ><P
2590 >"PreserveJobHistory Yes" -- keeps some details of jobs in
2591 cupsd's mind (well it keeps the "c12345", "c12346" etc. files
2592 in the CUPS spool directory, which do a similar job as the
2593 old-fashioned BSD-LPD control files). This is set to "Yes"
2594 as a default.</P
2595 ><P
2596 >"PreserveJobFiles Yes" -- keeps the job files themselves in
2597 cupsd's mind (well it keeps the "d12345", "d12346" etc. files
2598 in the CUPS spool directory...). This is set to "No" as the
2599 CUPS default.</P
2600 ><P
2601 >"MaxJobs 500" -- this directive controls the maximum number
2602 of jobs that are kept in memory. Once the number of jobs
2603 reaches the limit, the oldest completed job is automatically
2604 purged from the system to make room for the new one. If all
2605 of the known jobs are still pending or active then the new
2606 job will be rejected. Setting the maximum to 0 disables this
2607 functionality. The default setting is 0.</P
2608 ><P
2609 >(There are also additional settings for "MaxJobsPerUser" and
2610 "MaxJobsPerPrinter"...)</P
2611 ><P
2612 >For everything to work as announced, you need to have three things:</P
2613 ><P
2614 ></P
2615 ><TABLE
2616 BORDER="0"
2617 ><TBODY
2618 ><TR
2619 ><TD
2620 >       a Samba-<SPAN
2621 CLASS="APPLICATION"
2622 >smbd</SPAN
2623 > which is compiled against "libcups" (Check on Linux by running <KBD
2624 CLASS="USERINPUT"
2625 >ldd `which smbd`</KBD
2626 >)
2627         </TD
2628 ></TR
2629 ><TR
2630 ><TD
2631 >       a Samba-<TT
2632 CLASS="FILENAME"
2633 >smb.conf</TT
2634 > setting of <B
2635 CLASS="COMMAND"
2636 >printing = cups</B
2637 >
2638         </TD
2639 ></TR
2640 ><TR
2641 ><TD
2642 >       another Samba-<TT
2643 CLASS="FILENAME"
2644 >smb.conf</TT
2645 > setting of <B
2646 CLASS="COMMAND"
2647 >printcap = cups</B
2648 >
2649         </TD
2650 ></TR
2651 ></TBODY
2652 ></TABLE
2653 ><P
2654 ></P
2655 ><DIV
2656 CLASS="NOTE"
2657 ><P
2658 ></P
2659 ><TABLE
2660 CLASS="NOTE"
2661 WIDTH="100%"
2662 BORDER="0"
2663 ><TR
2664 ><TD
2665 WIDTH="25"
2666 ALIGN="CENTER"
2667 VALIGN="TOP"
2668 ><IMG
2669 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif"
2670 HSPACE="5"
2671 ALT="Note"></TD
2672 ><TD
2673 ALIGN="LEFT"
2674 VALIGN="TOP"
2675 ><P
2676 >Note, that in this case all other manually set printing-related
2677 commands (like "print command", "lpq command", "lprm command",
2678 "lppause command" or "lpresume command") are ignored and they
2679 should normally have no influence what-so-ever on your printing.</P
2680 ></TD
2681 ></TR
2682 ></TABLE
2683 ></DIV
2684 ><P
2685 >If you want to do things manually, replace the "printing = cups"
2686 by "printing = bsd". Then your manually set commands may work
2687 (haven't tested this), and a "print command = lp -d %P %s; rm %s"
2688 may do what you need.</P
2689 ><P
2690 >You forgot to mention the CUPS version you're using. If you did
2691 set things up as described in the man pages, then the Samba
2692 spool files should be deleted. Otherwise it may be a bug. On
2693 the CUPS side, you can control the behaviour as described
2694 above.</P
2695 ><P
2696 >If you have more problems, post the output of these commands:</P
2697 ><P
2698 ><KBD
2699 CLASS="USERINPUT"
2700 >   grep -v ^# /etc/cups/cupsd.conf | grep -v ^$
2701    grep -v ^# /etc/samba/smb.conf | grep -v ^$ | grep -v "^;"</KBD
2702 ></P
2703 ><P
2704 >(adapt paths as needed). These commands sanitize the files
2705 and cut out the empty lines and lines with comments, providing
2706 the "naked settings" in a compact way.</P
2707 ></DIV
2708 ></DIV
2709 ><DIV
2710 CLASS="NAVFOOTER"
2711 ><HR
2712 ALIGN="LEFT"
2713 WIDTH="100%"><TABLE
2714 SUMMARY="Footer navigation table"
2715 WIDTH="100%"
2716 BORDER="0"
2717 CELLPADDING="0"
2718 CELLSPACING="0"
2719 ><TR
2720 ><TD
2721 WIDTH="33%"
2722 ALIGN="left"
2723 VALIGN="top"
2724 ><A
2725 HREF="printing.html"
2726 ACCESSKEY="P"
2727 >Prev</A
2728 ></TD
2729 ><TD
2730 WIDTH="34%"
2731 ALIGN="center"
2732 VALIGN="top"
2733 ><A
2734 HREF="samba-howto-collection.html"
2735 ACCESSKEY="H"
2736 >Home</A
2737 ></TD
2738 ><TD
2739 WIDTH="33%"
2740 ALIGN="right"
2741 VALIGN="top"
2742 ><A
2743 HREF="winbind.html"
2744 ACCESSKEY="N"
2745 >Next</A
2746 ></TD
2747 ></TR
2748 ><TR
2749 ><TD
2750 WIDTH="33%"
2751 ALIGN="left"
2752 VALIGN="top"
2753 >Printing Support</TD
2754 ><TD
2755 WIDTH="34%"
2756 ALIGN="center"
2757 VALIGN="top"
2758 ><A
2759 HREF="optional.html"
2760 ACCESSKEY="U"
2761 >Up</A
2762 ></TD
2763 ><TD
2764 WIDTH="33%"
2765 ALIGN="right"
2766 VALIGN="top"
2767 >Unified Logons between Windows NT and UNIX using Winbind</TD
2768 ></TR
2769 ></TABLE
2770 ></DIV
2771 ></BODY
2772 ></HTML
2773 >