Network printer: remote jobs hang,print if requeued locally

Kurt Pfeifle kurt.pfeifle at
Sun Jun 24 08:11:52 PDT 2007

> Kurt!
>   *** It works! * It works! * It works! * It works! ***


> It sounds as if I could have -- in _theory_ --
> somehow edited a "failing" job's spool _control_ file (e.g.
> c00082), replacing the "raw" with "application/vnd.cups-postscript",
> and the job would have printed properly.

The spool file is not supposed to be edited by the user.

The way it works is to tell Samba and CUPS in their config files how to behave.

If Samba's config contains "cups options = raw" this option will be passed to CUPS, forcing unfiltered printing.

If Samba's config contains "cups options = ''" this option will force "auto-typing" of the arrived job file by cups, and then an auto-configuring of the needed filtering chain.

>   cups options = "application/vnd.cups-postscript"
> With that set, suddenly the printer started working just fine!

Well, this is not formatted in the way CUPS will understand it. And because it will not understand it, it will silently ignore the option. At least now it will no longer use "-o raw" for printing [which it *did* understand].

The correct syntax to use that line in smb.conf would be

    cups options = "document-format=application/vnd.cups-postscript"

OK, syntax now correct.... semantic still incorrect  :-)

Because this now tells CUPS that *every* arriving job file should be treated as a 'ready-made' PostScript that is equivalent as if it just came out of the builtin CUPS 'pstops' filter. (This is what the respective line in '/etc/cups/mime.convs' means.)

> I then set it to the full string:
>   "application/vnd.cups-postscript 0 brlpdwrapperMFC420CN"
> and it _still_ worked.

That's certainly also wrong, and it works because you are still lucky.   :-)

(When CUPS [and all its filters] see this string, it handles each one of the space separated portions as separate options; options they don't understand they'll silently ignore.)

I'd recommend to use an empty string for "cups options" in smb.conf to allow auto-typing. (In which case you can send any printable format as per /etc/cups/mime.types from Windows; yes, maybe only from an "lpr" command line in the DOS box...)

Should you *need* to set a mime type, use this:

    cups options = "document-format=application/application/postscript"

> > ...  You can check that by running
> >this command
> >
> >  testparm -vs | grep -i cups
> >
> >("testparm -v" shows you *all* the settings used by Samba, even the
> > ones it uses "silently").
> Here's what it says (now).
>   ----
>   manticore:/var/log/cups # testparm -vs | grep -i cups
>   Load smb config files from /etc/samba/smb.conf
>   Processing section "[homes]"
>   Processing section "[profiles]"
>   Processing section "[users]"
>   Processing section "[groups]"
>   Processing section "[printers]"
>   Processing section "[print$]"
>   Processing section "[work]"
>   Processing section "[mfc420cn]"
>   Loaded services file OK.
>   Invalid combination of parameters for service mfc420cn.                                            Level II oplocks can only be set if oplocks are also set.
>   Server role: ROLE_STANDALONE
>         printcap name = cups
>         cups server =
>         printing = cups
>         cups options = raw
>         cups options = "application/vnd.cups-postscript 0 brlpdwrapperMFC420CN"

When Samba sees several same-named option lines, the last one wins.  :-)


Kurt Pfeifle
System & Network Printing Consultant --- Linux/Unix/Windows/Samba/CUPS
Infotec Deutschland GmbH - A RICOH Company ......... Stuttgart/Germany

More information about the cups mailing list