[cups.general] Letter instead of A4 after install via Point'n'Print

Kay Obermueller kobermueller at web.de
Tue Jan 16 07:30:56 PST 2007


Helge Blischke schrieb:

>Kay Obermueller wrote:
>  
>
>>Helge Blischke schrieb:
>>
>>
>>    
>>
>>>Kay Obermueller wrote:
>>>
>>>
>>>
>>>      
>>>
>>>>Hello everyone,
>>>>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?
>>>>Just this "little" problem needs to be solved then this Cups server works
>>>>_perfectly_. Who has an idea and would like to help me?
>>>>
>>>>Kay
>>>>
>>>>  
>>>>
>>>>        
>>>>
>>>You should set the default attributes on the CUPS server before. The cupsaddsmb stuff
>>>uses the PPDs as configured for the CUPS server (from /etc/cups/ppd directory).
>>>
>>>Helge
>>>
>>>
>>>
>>>
>>>      
>>>
>>When I do:
>>#grep A4 R020-magicolor.ppd
>>I get:
>>*DefaultPageSize: A4
>>*PageSize A4/A4: "%% FoomaticRIPOptionSetting: PageSize=A4"
>>*FoomaticRIPOptionSetting PageSize=A4: "-p9 "
>>*DefaultPageRegion: A4
>>*PageRegion A4/A4: "%% FoomaticRIPOptionSetting: PageSize=A4"
>>*DefaultImageableArea: A4
>>*ImageableArea A4/A4: "11.34 11.34 583.66 830.66"
>>*DefaultPaperDimension: A4
>>*PaperDimension A4/A4: "595 842"
>>
>>#grep Letter /etc/cups/ppd/R020-magicolor.ppd
>>gives this:
>>*PageSize Letter/Letter: "%% FoomaticRIPOptionSetting: PageSize=Letter"
>>*FoomaticRIPOptionSetting PageSize=Letter: "-p1 "
>>*PageRegion Letter/Letter: "%% FoomaticRIPOptionSetting: PageSize=Letter"
>>*ImageableArea Letter/Letter: "11.34 11.34 600.66 780.66"
>>*PaperDimension Letter/Letter: "612 792"
>>*MediaType Letterhead/Letterhead: "%% FoomaticRIPOptionSetting:
>>MediaType=Letterhead"
>>*FoomaticRIPOptionSetting MediaType=Letterhead: "-m259 "
>>
>>
>>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
>>
>>Maybe it is related to what is described here:
>>http://www.linuxprinting.org/kpfeifle/SambaPrintHOWTO/Samba-HOWTO-Collection-3.0-PrintingChapter-11th-draft.html#AEN851
>>/* */
>>Should I better not use "default devmode = yes" in smb.conf and repeat
>>cupsaddsmb?/**///
>>
>>Kay
>>
>>    
>>
>That might be, though I never encountered an issue like you described.
>
>Helge
>
>
>  
>

To repeat cupsaddsmb 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? Shall I ask in the Samba mailing
list about these issues?

Kay






More information about the cups mailing list