First, a little background...
The classic procedure for installing drivers to a printer shared via CUPS with a raw Samba frontend, usually is roughly something like this:
- Create printer in CUPS
- Open shared printer properties in Windows
- Install drivers via Advanced tab
For me, this worked great, most of the time, assuming that the driver was either PS or PCL5(e). However, PCL6 drivers rarely loaded properly. They crashed upon upload, and the driver rarely ever worked, if point 'n print even installed the driver. As I understand it, the root of the problem is that the drivers need a valid "form" database specific to the driver to be stored on the server in order to load, but valid form data can only be created by executing the driver. On Windows servers, this isn't a problem, but Samba servers cannot execute the windows driver code in order to generate this form. PCL6 drivers are particularly finicky about this, and often times will refuse properly copy to the server.
The solution I've come up with is to load the driver entirely on a Windows PC first, and tell Samba to copy the drivers and related forms, ACLs, etc over. Some of the values I use here for the printer names, etc, are very generic and only specified to match the naming standards in my environment. Feel free to change your printer setup to suit your needs.
On a Windows PC:
- Install the printer as you would normally for TCP/IP printing on a windows PC.
- Rename the printer to the share name you will be using (i.e., CopierCP5000)
- Open the printer properties
- Share the printer using the same name (CopierCP5000)
- Set the printer description to the printer name (i.e., Copier CP 5000)
- Set the printer location to the office name and city (ACME Abu Dhabi)
- Usually under the Accessories/Options tab, update/get information from the printer
This ensures that we obtain all the correct hardware configuration information for the device (duplexer, trays, hole punch, stapler, etc)
- Open the Advanced tab and click the "Printing Defaults" button
- Click on each tab and allow the tab to load
This ensures that the form values for each tab are created.
- Still inside the Printing Defaults, change the page orientation to Landscape, hit apply, change the page orientation to Portrait, and hit apply. Click OK.
- Close the printer properties by clicking OK
Next, on the server:
### Set up the printer in CUPS, i.e.:
lpadmin -p CopierCP5000 -L "ACME Abu Dhabi" -D "Copier CP 5000" -v lpd://192.168.xx.xx -m raw -E
smbcontrol smbd reload-config
### Copy the drivers, forms, ACLs, etc from the Windows PC
net rpc printer MIGRATE ALL CopierCP5000 -S mypcname -Uusername
Finally, test the driver in Windows:
- Open the local Printers control panel (shortcut command below for Win7 users)
rundll32 shell32.dll,SHHelpShortcuts_RunDLL PrintersFolder
- Delete your shared printer
- Right-click in the control panel window and select "Server Properties"
- Open the Drivers tab
- Select your driver and click "Remove".
- Proceed with removal and close the server properties window.
- Open \\servername\
- Double-click your printer
- Print a test page
If this fails, try restarting the local PC's Print Spooler service
So far I've only tested this on a few of our known-problematic printers that have PCL6 drivers available, and it's worked perfectly in each case. However it you notice this doesn't work for you, post a comment and I'll see what I can do to help.