There is many ways to add cups printers to samba and for a long time I used the “common” solution:
But this solution implies one driver for linux and another one for windows. This lead to driver version problems and others. So there is another solution based on the cupsaddsmb tool provided by the debian cups-client package.
This website provides a good explanation to start:
together with both cups man pages:
and finally with the Windows Driver
For me there was two major points:
Each time you call the cupsaddsmb tool, the windows ppd file in the /var/spool/cups/drivers/W32X86/3 directory is modified!
Finally a short word about a problem while printing pdf through Adobe Acrobat Reader causing an OFFENDING COMMAND: findresource error. There is a workaround which is clearly described by Michael D. Valentine in the post entitled Acrobat to Samba to CUPS to Papercut to Lexmark...What could possibly go wrong?. The solution is to add a key (“bOptimizePSForSpeed”=dword:00000000) in the registry under the HKEY_CURRENT_USER\Software\Adobe\Acrobat Reader\8.0\Originals section. This will preset adobe acrobat for sending Font and Resource Policy with the Send for Each Page option. This option is usually found in the Advanced tab of the adobe acrobat Print window .