1 <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
5 >Printing Support</TITLE
8 CONTENT="Modular DocBook HTML Stylesheet Version 1.7"><LINK
10 TITLE="SAMBA Project Documentation"
11 HREF="samba-howto-collection.html"><LINK
13 TITLE="Advanced Configuration"
14 HREF="optional.html"><LINK
16 TITLE="Configuring Group Mapping"
17 HREF="groupmapping.html"><LINK
19 TITLE="CUPS Printing Support"
20 HREF="cups-printing.html"></HEAD
31 SUMMARY="Header navigation table"
40 >SAMBA Project Documentation</TH
48 HREF="groupmapping.html"
62 HREF="cups-printing.html"
77 >Chapter 12. Printing Support</H1
84 >12.1. Introduction</A
87 >Beginning with the 2.2.0 release, Samba supports
88 the native Windows NT printing mechanisms implemented via
89 MS-RPC (i.e. the SPOOLSS named pipe). Previous versions of
90 Samba only supported LanMan printing calls.</P
92 >The additional functionality provided by the new
93 SPOOLSS support includes:</P
99 >Support for downloading printer driver
100 files to Windows 95/98/NT/2000 clients upon demand.
105 >Uploading of printer drivers via the
106 Windows NT Add Printer Wizard (APW) or the
107 Imprints tool set (refer to <A
108 HREF="http://imprints.sourceforge.net"
110 >http://imprints.sourceforge.net</A
116 >Support for the native MS-RPC printing
117 calls such as StartDocPrinter, EnumJobs(), etc... (See
118 the MSDN documentation at <A
119 HREF="http://msdn.microsoft.com/"
121 >http://msdn.microsoft.com/</A
123 for more information on the Win32 printing API)
128 >Support for NT Access Control Lists (ACL)
129 on printer objects</P
133 >Improved support for printer queue manipulation
134 through the use of an internal databases for spooled job
139 >There has been some initial confusion about what all this means
140 and whether or not it is a requirement for printer drivers to be
141 installed on a Samba host in order to support printing from Windows
142 clients. As a side note, Samba does not use these drivers in any way to process
143 spooled files. They are utilized entirely by the clients.</P
145 >The following MS KB article, may be of some help if you are dealing with
146 Windows 2000 clients: <SPAN
150 >How to Add Printers with No User
151 Interaction in Windows 2000</I
156 HREF="http://support.microsoft.com/support/kb/articles/Q189/1/05.ASP"
158 >http://support.microsoft.com/support/kb/articles/Q189/1/05.ASP</A
167 >12.2. Configuration</A
183 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/warning.gif"
190 >[print$] vs. [printer$]</B
200 >Previous versions of Samba recommended using a share named [printer$].
201 This name was taken from the printer$ service created by Windows 9x
202 clients when a printer was shared. Windows 9x printer servers always have
203 a printer$ service which provides read-only access via no
204 password in order to support printer driver downloads.</P
206 >However, the initial implementation allowed for a
209 >printer driver location</VAR
211 to be used on a per share basis to specify the location of
212 the driver files associated with that printer. Another
217 a means of defining the printer driver name to be sent to
229 >12.2.1. Creating [print$]</A
232 >In order to support the uploading of printer driver
233 files, you must first configure a file share named [print$].
234 The name of this share is hard coded in Samba's internals so
235 the name is very important (print$ is the service used by
236 Windows NT print servers to provide support for printer driver
239 >You should modify the server's smb.conf file to add the global
240 parameters and to create the
241 following file share (of course, some of the parameter values,
242 such as 'path' are arbitrary and should be replaced with
243 appropriate values for your site):</P
246 CLASS="PROGRAMLISTING"
248 ; members of the ntadmin group should be able
249 ; to add drivers and set printer properties
250 ; root is implicitly a 'printer admin'
251 printer admin = @ntadmin
254 path = /usr/local/samba/printers
258 ; since this share is configured as read only, then we need
259 ; a 'write list'. Check the file system permissions to make
260 ; sure this account can copy files to the share. If this
261 ; is setup to a non-root account, then it should also exist
262 ; as a 'printer admin'
263 write list = @ntadmin,root</PRE
267 HREF="smb.conf.5.html#WRITELIST"
273 > is used to allow administrative
274 level user accounts to have write access in order to update files
275 on the share. See the <A
276 HREF="smb.conf.5.html"
280 > for more information on configuring file shares.</P
282 >The requirement for <A
283 HREF="smb.conf.5.html#GUESTOK"
290 > depends upon how your
291 site is configured. If users will be guaranteed to have
292 an account on the Samba host, then this is a non-issue.</P
307 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/note.gif"
324 >The non-issue is that if all your Windows NT users are guaranteed to be
325 authenticated by the Samba server (such as a domain member server and the NT
326 user has already been validated by the Domain Controller in
327 order to logon to the Windows NT console), then guest access
328 is not necessary. Of course, in a workgroup environment where
329 you just want to be able to print without worrying about
330 silly accounts and security, then configure the share for
331 guest access. You'll probably want to add <A
332 HREF="smb.conf.5.html#MAPTOGUEST"
336 >map to guest = Bad User</B
338 > in the [global] section as well. Make sure
339 you understand what this parameter does before using it
346 >In order for a Windows NT print server to support
347 the downloading of driver files by multiple client architectures,
348 it must create subdirectories within the [print$] service
349 which correspond to each of the supported client architectures.
350 Samba follows this model as well.</P
352 >Next create the directory tree below the [print$] share
353 for each architecture you wish to support.</P
356 CLASS="COMPUTEROUTPUT"
358 |-W32X86 ; "Windows NT x86"
359 |-WIN40 ; "Windows 95/98"
360 |-W32ALPHA ; "Windows NT Alpha_AXP"
361 |-W32MIPS ; "Windows NT R4000"
362 |-W32PPC ; "Windows NT PowerPC"</SAMP
378 SRC="/usr/share/sgml/docbook/stylesheet/dsssl/modular/images/warning.gif"
385 >ATTENTION! REQUIRED PERMISSIONS</B
395 >In order to currently add a new driver to you Samba host,
396 one of two conditions must hold true:</P
402 >The account used to connect to the Samba host
403 must have a uid of 0 (i.e. a root account)</P
407 >The account used to connect to the Samba host
408 must be a member of the <A
409 HREF="smb.conf.5.html#PRINTERADMIN"
420 >Of course, the connected account must still possess access
421 to add files to the subdirectories beneath [print$]. Remember
422 that all file shares are set to 'read only' by default.</P
428 >Once you have created the required [print$] service and
429 associated subdirectories, simply log onto the Samba server using
434 from a Windows NT 4.0/2k client. Open "Network Neighbourhood" or
435 "My Network Places" and browse for the Samba host. Once you have located
436 the server, navigate to the "Printers..." folder.
437 You should see an initial listing of printers
438 that matches the printer shares defined on your Samba host.</P
446 >12.2.2. Setting Drivers for Existing Printers</A
449 >The initial listing of printers in the Samba host's
450 Printers folder will have no real printer driver assigned
451 to them. This defaults to a NULL string to allow the use
452 of the local Add Printer Wizard on NT/2000 clients.
453 Attempting to view the printer properties for a printer
454 which has this default driver assigned will result in
455 the error message:</P
461 >Device settings cannot be displayed. The driver
462 for the specified printer is not installed, only spooler
463 properties will be displayed. Do you want to install the
468 >Click "No" in the error dialog and you will be presented with
469 the printer properties window. The way to assign a driver to a
470 printer is to either</P
476 >Use the "New Driver..." button to install
477 a new printer driver, or</P
481 >Select a driver from the popup list of
482 installed drivers. Initially this list will be empty.</P
486 >If you wish to install printer drivers for client
487 operating systems other than "Windows NT x86", you will need
488 to use the "Sharing" tab of the printer properties dialog.</P
490 >Assuming you have connected with a root account, you
491 will also be able modify other printer properties such as
492 ACLs and device settings using this dialog box.</P
494 >A few closing comments for this section, it is possible
495 on a Windows NT print server to have printers
496 listed in the Printers folder which are not shared. Samba does
497 not make this distinction. By definition, the only printers of
498 which Samba is aware are those which are specified as shares in
504 >Another interesting side note is that Windows NT clients do
505 not use the SMB printer share, but rather can print directly
506 to any printer on another Windows NT host using MS-RPC. This
507 of course assumes that the printing client has the necessary
508 privileges on the remote host serving the printer. The default
509 permissions assigned by Windows NT to a printer gives the "Print"
510 permissions to the "Everyone" well-known group.</P
518 >12.2.3. Support a large number of printers</A
521 >One issue that has arisen during the development
522 phase of Samba 2.2 is the need to support driver downloads for
523 100's of printers. Using the Windows NT APW is somewhat
524 awkward to say the list. If more than one printer are using the
526 HREF="rpcclient.1.html"
533 > can be used to set the driver
534 associated with an installed driver. The following is example
535 of how this could be accomplished:</P
542 >rpcclient pogo -U root%secret -c "enumdrivers"</KBD
545 CLASS="PROGRAMLISTING"
547 Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3]
550 Printer Driver Info 1:
551 Driver Name: [HP LaserJet 4000 Series PS]
553 Printer Driver Info 1:
554 Driver Name: [HP LaserJet 2100 Series PS]
556 Printer Driver Info 1:
557 Driver Name: [HP LaserJet 4Si/4SiMX PS]</PRE
564 >rpcclient pogo -U root%secret -c "enumprinters"</KBD
567 CLASS="PROGRAMLISTING"
568 >Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3]
570 name:[\\POGO\hp-print]
571 description:[POGO\\POGO\hp-print,NO DRIVER AVAILABLE FOR THIS PRINTER,]
580 >rpcclient pogo -U root%secret -c "setdriver hp-print \"HP LaserJet 4000 Series PS\""</KBD
583 CLASS="PROGRAMLISTING"
584 >Domain=[NARNIA] OS=[Unix] Server=[Samba 2.2.0-alpha3]
585 Successfully set hp-print to driver HP LaserJet 4000 Series PS.</PRE
594 >12.2.4. Adding New Printers via the Windows NT APW</A
597 >By default, Samba offers all printer shares defined in <TT
601 in the "Printers..." folder. Also existing in this folder is the Windows NT
602 Add Printer Wizard icon. The APW will be show only if</P
608 >The connected user is able to successfully
609 execute an OpenPrinterEx(\\server) with administrative
610 privileges (i.e. root or <VAR
619 HREF="smb.conf.5.html#SHOWADDPRINTERWIZARD"
624 add printer wizard = yes</VAR
631 >In order to be able to use the APW to successfully add a printer to a Samba
633 HREF="smb.conf.5.html#ADDPRINTERCOMMAND"
640 > must have a defined value. The program
641 hook must successfully add the printer to the system (i.e.
645 > or appropriate files) and
651 >When using the APW from a client, if the named printer share does
655 > will execute the <VAR
659 > and reparse to the <TT
663 to attempt to locate the new printer share. If the share is still not defined,
664 an error of "Access Denied" is returned to the client. Note that the
667 >add printer program</VAR
668 > is executed under the context
669 of the connected user, not necessarily a root account.</P
671 >There is a complementary <A
672 HREF="smb.conf.5.html#DELETEPRINTERCOMMAND"
679 > for removing entries from the "Printers..."
682 >The following is an example <A
683 HREF="smb.conf.5.html#ADDPRINTERCOMMAN"
687 >add printer command</VAR
689 > script. It adds the appropriate entries to <TT
691 >/etc/printcap.local</TT
692 > (change that to what you need) and returns a line of 'Done' which is needed for the whole process to work.</P
694 CLASS="PROGRAMLISTING"
697 # Script to insert a new printer entry into printcap.local
699 # $1, printer name, used as the descriptive name
700 # $2, share name, used as the printer name for Linux
703 # $5, location, used for the device file of the printer
707 # Make sure we use the location that RedHat uses for local printer defs
708 PRINTCAP=/etc/printcap.local
709 DATE=`date +%Y%m%d-%H%M%S`
711 RESTART="service lpd restart"
714 cp $PRINTCAP $PRINTCAP.$DATE
715 # Add the printer to $PRINTCAP
716 echo "" >> $PRINTCAP
717 echo "$2|$1:\\" >> $PRINTCAP
718 echo " :sd=/var/spool/lpd/$2:\\" >> $PRINTCAP
719 echo " :mx=0:ml=0:sh:\\" >> $PRINTCAP
720 echo " :lp=/usr/local/samba/var/print/$5.prn:" >> $PRINTCAP
722 touch "/usr/local/samba/var/print/$5.prn" >> /tmp/printadd.$$ 2>&1
723 chown $LP "/usr/local/samba/var/print/$5.prn" >> /tmp/printadd.$$ 2>&1
725 mkdir /var/spool/lpd/$2
726 chmod 700 /var/spool/lpd/$2
727 chown $LP /var/spool/lpd/$2
728 #echo $1 >> "/usr/local/samba/var/print/$5.prn"
729 #echo $2 >> "/usr/local/samba/var/print/$5.prn"
730 #echo $3 >> "/usr/local/samba/var/print/$5.prn"
731 #echo $4 >> "/usr/local/samba/var/print/$5.prn"
732 #echo $5 >> "/usr/local/samba/var/print/$5.prn"
733 #echo $6 >> "/usr/local/samba/var/print/$5.prn"
734 $RESTART >> "/usr/local/samba/var/print/$5.prn"
735 # Not sure if this is needed
736 touch /usr/local/samba/lib/smb.conf
738 # You need to return a value, but I am not sure what it means.
749 >12.2.5. Samba and Printer Ports</A
752 >Windows NT/2000 print servers associate a port with each printer. These normally
753 take the form of LPT1:, COM1:, FILE:, etc... Samba must also support the
754 concept of ports associated with a printer. By default, only one printer port,
755 named "Samba Printer Port", exists on a system. Samba does not really a port in
756 order to print, rather it is a requirement of Windows clients. </P
758 >Note that Samba does not support the concept of "Printer Pooling" internally
759 either. This is when a logical printer is assigned to multiple ports as
760 a form of load balancing or fail over.</P
762 >If you require that multiple ports be defined for some reason,
767 HREF="smb.conf.5.html#ENUMPORTSCOMMAND"
774 > which can be used to define an external program
775 that generates a listing of ports on a system.</P
784 >12.3. The Imprints Toolset</A
787 >The Imprints tool set provides a UNIX equivalent of the
788 Windows NT Add Printer Wizard. For complete information, please
789 refer to the Imprints web site at <A
790 HREF="http://imprints.sourceforge.net/"
792 > http://imprints.sourceforge.net/</A
793 > as well as the documentation
794 included with the imprints source distribution. This section will
795 only provide a brief introduction to the features of Imprints.</P
802 >12.3.1. What is Imprints?</A
805 >Imprints is a collection of tools for supporting the goals
812 >Providing a central repository information
813 regarding Windows NT and 95/98 printer driver packages</P
817 >Providing the tools necessary for creating
818 the Imprints printer driver packages.</P
822 >Providing an installation client which
823 will obtain and install printer drivers on remote Samba
824 and Windows NT 4 print servers.</P
834 >12.3.2. Creating Printer Driver Packages</A
837 >The process of creating printer driver packages is beyond
838 the scope of this document (refer to Imprints.txt also included
839 with the Samba distribution for more information). In short,
840 an Imprints driver package is a gzipped tarball containing the
841 driver files, related INF files, and a control file needed by the
842 installation client.</P
850 >12.3.3. The Imprints server</A
853 >The Imprints server is really a database server that
854 may be queried via standard HTTP mechanisms. Each printer
855 entry in the database has an associated URL for the actual
856 downloading of the package. Each package is digitally signed
857 via GnuPG which can be used to verify that package downloaded
858 is actually the one referred in the Imprints database. It is
865 > recommended that this security check
874 >12.3.4. The Installation Client</A
877 >More information regarding the Imprints installation client
878 is available in the <TT
880 >Imprints-Client-HOWTO.ps</TT
882 file included with the imprints source package.</P
884 >The Imprints installation client comes in two forms.</P
890 >a set of command line Perl scripts</P
894 >a GTK+ based graphical interface to
895 the command line perl scripts</P
899 >The installation client (in both forms) provides a means
900 of querying the Imprints database server for a matching
901 list of known printer model names as well as a means to
902 download and install the drivers on remote Samba and Windows
905 >The basic installation process is in four steps and
906 perl code is wrapped around <B
916 CLASS="PROGRAMLISTING"
918 foreach (supported architecture for a given driver)
920 1. rpcclient: Get the appropriate upload directory
922 2. smbclient: Upload the driver files
923 3. rpcclient: Issues an AddPrinterDriver() MS-RPC
926 4. rpcclient: Issue an AddPrinterEx() MS-RPC to actually
927 create the printer</PRE
930 >One of the problems encountered when implementing
931 the Imprints tool set was the name space issues between
932 various supported client architectures. For example, Windows
933 NT includes a driver named "Apple LaserWriter II NTX v51.8"
934 and Windows 95 calls its version of this driver "Apple
935 LaserWriter II NTX"</P
937 >The problem is how to know what client drivers have
938 been uploaded for a printer. As astute reader will remember
939 that the Windows NT Printer Properties dialog only includes
940 space for one printer driver name. A quick look in the
941 Windows NT 4.0 system registry at</P
945 >HKLM\System\CurrentControlSet\Control\Print\Environment
949 >will reveal that Windows NT always uses the NT driver
950 name. This is ok as Windows NT always requires that at least
951 the Windows NT version of the printer driver is present.
952 However, Samba does not have the requirement internally.
953 Therefore, how can you use the NT driver name if is has not
954 already been installed?</P
956 >The way of sidestepping this limitation is to require
957 that all Imprints printer driver packages include both the Intel
958 Windows NT and 95/98 printer drivers and that NT driver is
976 >12.4.1. Introduction</A
979 >This is a short description of how to debug printing problems with
980 Samba. This describes how to debug problems with printing from a SMB
981 client to a Samba server, not the other way around. For the reverse
982 see the examples/printing directory.</P
984 >Ok, so you want to print to a Samba server from your PC. The first
985 thing you need to understand is that Samba does not actually do any
986 printing itself, it just acts as a middleman between your PC client
987 and your Unix printing subsystem. Samba receives the file from the PC
988 then passes the file to a external "print command". What print command
989 you use is up to you.</P
991 >The whole things is controlled using options in smb.conf. The most
992 relevant options (which you should look up in the smb.conf man page)
996 CLASS="PROGRAMLISTING"
998 print command - send a file to a spooler
999 lpq command - get spool queue status
1000 lprm command - remove a job
1002 path = /var/spool/lpd/samba</PRE
1005 >The following are nice to know about:</P
1008 CLASS="PROGRAMLISTING"
1009 > queuepause command - stop a printer or print queue
1010 queueresume command - start a printer or print queue</PRE
1016 CLASS="PROGRAMLISTING"
1017 > print command = /usr/bin/lpr -r -P%p %s
1018 lpq command = /usr/bin/lpq -P%p %s
1019 lprm command = /usr/bin/lprm -P%p %j
1020 queuepause command = /usr/sbin/lpc -P%p stop
1021 queuepause command = /usr/sbin/lpc -P%p start</PRE
1024 >Samba should set reasonable defaults for these depending on your
1025 system type, but it isn't clairvoyant. It is not uncommon that you
1026 have to tweak these for local conditions. The commands should
1027 always have fully specified pathnames, as the smdb may not have
1028 the correct PATH values.</P
1030 >When you send a job to Samba to be printed, it will make a temporary
1031 copy of it in the directory specified in the [printers] section.
1032 and it should be periodically cleaned out. The lpr -r option
1033 requests that the temporary copy be removed after printing; If
1034 printing fails then you might find leftover files in this directory,
1035 and it should be periodically cleaned out. Samba used the lpq
1036 command to determine the "job number" assigned to your print job
1039 >The %>letter< are "macros" that get dynamically replaced with appropriate
1040 values when they are used. The %s gets replaced with the name of the spool
1041 file that Samba creates and the %p gets replaced with the name of the
1042 printer. The %j gets replaced with the "job number" which comes from
1051 >12.4.2. Debugging printer problems</A
1054 >One way to debug printing problems is to start by replacing these
1055 command with shell scripts that record the arguments and the contents
1056 of the print file. A simple example of this kind of things might
1060 CLASS="PROGRAMLISTING"
1061 > print command = /tmp/saveprint %p %s
1064 # we make sure that we are the right user
1065 /usr/bin/id -p >/tmp/tmp.print
1066 # we run the command and save the error messages
1067 # replace the command with the one appropriate for your system
1068 /usr/bin/lpr -r -P$1 $2 2>>&/tmp/tmp.print</PRE
1071 >Then you print a file and try removing it. You may find that the
1072 print queue needs to be stopped in order to see the queue status
1073 and remove the job:</P
1076 CLASS="PROGRAMLISTING"
1077 > h4: {42} % echo hi >/tmp/hi
1078 h4: {43} % smbclient //localhost/lw4
1079 added interface ip=10.0.0.4 bcast=10.0.0.255 nmask=255.255.255.0
1081 Domain=[ASTART] OS=[Unix] Server=[Samba 2.0.7]
1082 smb: \> print /tmp/hi
1083 putting file /tmp/hi as hi-17534 (0.0 kb/s) (average 0.0 kb/s)
1086 smb: \> cancel 1049
1087 Error cancelling job 1049 : code 0
1088 smb: \> cancel 1049
1091 smb: \> exit</PRE
1094 >The 'code 0' indicates that the job was removed. The comment
1095 by the smbclient is a bit misleading on this.
1096 You can observe the command output and then and look at the
1097 /tmp/tmp.print file to see what the results are. You can quickly
1098 find out if the problem is with your printing system. Often people
1099 have problems with their /etc/printcap file or permissions on
1100 various print queues.</P
1108 >12.4.3. What printers do I have?</A
1111 >You can use the 'testprns' program to check to see if the printer
1112 name you are using is recognized by Samba. For example, you can
1116 CLASS="PROGRAMLISTING"
1117 > testprns printer /etc/printcap</PRE
1120 >Samba can get its printcap information from a file or from a program.
1121 You can try the following to see the format of the extracted
1125 CLASS="PROGRAMLISTING"
1126 > testprns -a printer /etc/printcap
1128 testprns -a printer '|/bin/cat printcap'</PRE
1137 >12.4.4. Setting up printcap and print servers</A
1140 >You may need to set up some printcaps for your Samba system to use.
1141 It is strongly recommended that you use the facilities provided by
1142 the print spooler to set up queues and printcap information.</P
1144 >Samba requires either a printcap or program to deliver printcap
1145 information. This printcap information has the format:</P
1148 CLASS="PROGRAMLISTING"
1149 > name|alias1|alias2...:option=value:...</PRE
1152 >For almost all printing systems, the printer 'name' must be composed
1153 only of alphanumeric or underscore '_' characters. Some systems also
1154 allow hyphens ('-') as well. An alias is an alternative name for the
1155 printer, and an alias with a space in it is used as a 'comment'
1156 about the printer. The printcap format optionally uses a \ at the end of lines
1157 to extend the printcap to multiple lines.</P
1159 >Here are some examples of printcap files:</P
1167 >pr just printer name</P
1171 >pr|alias printer name and alias</P
1175 >pr|My Printer printer name, alias used as comment</P
1179 >pr:sh:\ Same as pr:sh:cm= testing
1185 >pr:sh Same as pr:sh:cm= testing
1191 >Samba reads the printcap information when first started. If you make
1192 changes in the printcap information, then you must do the following:</P
1199 >make sure that the print spooler is aware of these changes.
1200 The LPRng system uses the 'lpc reread' command to do this.</P
1204 >make sure that the spool queues, etc., exist and have the
1205 correct permissions. The LPRng system uses the 'checkpc -f'
1206 command to do this.</P
1210 >You now should send a SIGHUP signal to the smbd server to have
1211 it reread the printcap information.</P
1221 >12.4.5. Job sent, no output</A
1224 >This is the most frustrating part of printing. You may have sent the
1225 job, verified that the job was forwarded, set up a wrapper around
1226 the command to send the file, but there was no output from the printer.</P
1228 >First, check to make sure that the job REALLY is getting to the
1229 right print queue. If you are using a BSD or LPRng print spooler,
1230 you can temporarily stop the printing of jobs. Jobs can still be
1231 submitted, but they will not be printed. Use:</P
1234 CLASS="PROGRAMLISTING"
1235 > lpc -Pprinter stop</PRE
1238 >Now submit a print job and then use 'lpq -Pprinter' to see if the
1239 job is in the print queue. If it is not in the print queue then
1240 you will have to find out why it is not being accepted for printing.</P
1242 >Next, you may want to check to see what the format of the job really
1243 was. With the assistance of the system administrator you can view
1244 the submitted jobs files. You may be surprised to find that these
1245 are not in what you would expect to call a printable format.
1246 You can use the UNIX 'file' utitily to determine what the job
1247 format actually is:</P
1250 CLASS="PROGRAMLISTING"
1251 > cd /var/spool/lpd/printer # spool directory of print jobs
1253 file dfA001myhost</PRE
1256 >You should make sure that your printer supports this format OR that
1257 your system administrator has installed a 'print filter' that will
1258 convert the file to a format appropriate for your printer.</P
1266 >12.4.6. Job sent, strange output</A
1269 >Once you have the job printing, you can then start worrying about
1270 making it print nicely.</P
1272 >The most common problem is extra pages of output: banner pages
1273 OR blank pages at the end.</P
1275 >If you are getting banner pages, check and make sure that the
1276 printcap option or printer option is configured for no banners.
1277 If you have a printcap, this is the :sh (suppress header or banner
1278 page) option. You should have the following in your printer.</P
1281 CLASS="PROGRAMLISTING"
1282 > printer: ... :sh</PRE
1285 >If you have this option and are still getting banner pages, there
1286 is a strong chance that your printer is generating them for you
1287 automatically. You should make sure that banner printing is disabled
1288 for the printer. This usually requires using the printer setup software
1289 or procedures supplied by the printer manufacturer.</P
1291 >If you get an extra page of output, this could be due to problems
1292 with your job format, or if you are generating PostScript jobs,
1293 incorrect setting on your printer driver on the MicroSoft client.
1294 For example, under Win95 there is a option:</P
1297 CLASS="PROGRAMLISTING"
1298 > Printers|Printer Name|(Right Click)Properties|Postscript|Advanced|</PRE
1301 >that allows you to choose if a Ctrl-D is appended to all jobs.
1302 This is a very bad thing to do, as most spooling systems will
1303 automatically add a ^D to the end of the job if it is detected as
1304 PostScript. The multiple ^D may cause an additional page of output.</P
1312 >12.4.7. Raw PostScript printed</A
1315 >This is a problem that is usually caused by either the print spooling
1316 system putting information at the start of the print job that makes
1317 the printer think the job is a text file, or your printer simply
1318 does not support PostScript. You may need to enable 'Automatic
1319 Format Detection' on your printer.</P
1327 >12.4.8. Advanced Printing</A
1330 >Note that you can do some pretty magic things by using your
1331 imagination with the "print command" option and some shell scripts.
1332 Doing print accounting is easy by passing the %U option to a print
1333 command shell script. You could even make the print command detect
1334 the type of output and its size and send it to an appropriate
1343 >12.4.9. Real debugging</A
1346 >If the above debug tips don't help, then maybe you need to bring in
1347 the bug guns, system tracing. See Tracing.txt in this directory.</P
1356 SUMMARY="Footer navigation table"
1367 HREF="groupmapping.html"
1376 HREF="samba-howto-collection.html"
1385 HREF="cups-printing.html"
1395 >Configuring Group Mapping</TD
1401 HREF="optional.html"
1409 >CUPS Printing Support</TD