[Samba] Letter instead of A4 with driver installed via Samba's Point'n'Print

Kay Obermueller kobermueller at web.de
Thu Jan 18 15:10:32 GMT 2007


Hello everyone,
I have already asked for this the cups list/newsgroup, but it seems to me that this might be more a question about Samba. According (hopefully) to these howtos I have setup printers and prepared their cups postscript drivers to be installed automatically via Samba and the so called Point'n'Print method:

https://forums.gentoo.org/viewtopic-t-456501-highlight-.html
http://www.linuxprinting.org/kpfeifle/SambaPrintHOWTO/Samba-HOWTO-Collection-3.0-PrintingChapter-11th-draft.html

Everything works pretty well except that a new windows client that installs the driver tries to print out as Letter instead of A4. I can then change this setting and it is correctly saved, but only on this particular client. Is there a way to set this beforehand in the driver on the server?
In smb.conf this is set:
default devmode = Yes
Does this have influence on this issue?
When I grep for A4 in R020-magicolor.ppd
I get:
*DefaultPageSize: A4
*DefaultPageRegion: A4
*DefaultImageableArea: A4
*DefaultPaperDimension: A4

In both ppd's. In /etc/cups/ppd and in /var/lib/samba/printers/W32X86/3 it is the same. And I already printed correctly in A4 to this printer from Linux and OS X via IPP before using cupsaddsmb.
But here I can find Letter and no A4:
#strings /var/lib/samba/ntprinters.tdb | grep Letter
result:
Letter
Letter

It seemed to me to be related to what is described here:
http://www.linuxprinting.org/kpfeifle/SambaPrintHOWTO/Samba-HOWTO-Collection-3.0-PrintingChapter-11th-draft.html#AEN851
So I did repeat cupsaddsmb with "default devmode = no" instead of yes in smb.conf. This gave mixed results.
I tried to delete the driver this way, but it was still set to the printer and didn't work:
#rpcclient -U'root%xxxxx' cups.server.loc -c'deldriver R020-magicolor'
Failed to remove driver R020-magicolor for arch [Windows NT x86] - error
0xbb9!
Failed to remove driver R020-magicolor for arch [Windows NT x86] - error
0xbb9!
result was WERR_UNKNOWN_PRINTER_DRIVER

Because I didn't find out how to "unset" the driver I set a non existent driver "NULL":
#rpcclient -U'root%xxxxx' cups.server.loc -c'setdriver R020-magicolor NULL'
Succesfully set R020-magicolor to driver NULL.

I hope this was a correct deletion:
#rpcclient -U'root%xxxxx' cups.server.loc -c"deldriver R020-magicolor"
Driver R020-magicolor removed for arch [Windows NT x86].
result was WERR_UNKNOWN_PRINTER_DRIVER

This time I hopefully prevented Samba from interfere with the device mode in smb.conf:
default devmode = No

Then I executed cupsaddsmb and specified the driver:
#cupsaddsmb -U root -H localhost -h localhost -v R020-magicolor
It wrote in it's output that all of it's operations were successfull. As a result on the Magicolor it still tries to print as Letter on the first printout without correction of the setting. But on the the server is also another printer, which I thought I didn't change in that procedure and it's driver was correctly set instead!

#rpcclient -U'root%xxxxx' cups.server.loc -c'enumprinters'
        flags:[0x800000]
        name:[\\cups\R020-magicolor]
        description:[\\cups\R020-magicolor,NULL,R020-magicolor]
        comment:[R020-magicolor]

        flags:[0x800000]
        name:[\\mini\LaserJet2200DN]
        description:[\\cups\LaserJet2200DN,LaserJet2200DN,HP LaserJet in
R411]
        comment:[HP LaserJet in R411]

The LaserJet now works perfectly although it ignored the wrong paper for the print job and just printed. Unfortunately the Magicolor is too "intelligent"... How are settings in device mode influenced? Could naming the driver the
same as it's printer cause problems?

Kay



More information about the samba mailing list