[Software] CUPS Printer Configuration

If none of the specific sub-forums seem right for your thread, ask here.
Post Reply
Message
Author
johnwmstevens2
Posts: 6
Joined: 2024-11-12 19:41

[Software] CUPS Printer Configuration

#1 Post by johnwmstevens2 »

I am running cups on Debian with the lp emulation installed.

Using the a2ps program I generate Postscript to send to pipe to the lp command. Works great, except that at the end of printing out the file, I always get a single additional page that contains one line:

request id is <printer name> (0 files(s))

I've tried adding options to the lp command of:

-o job-sheets=none -o banner=never,never

Still get the request ID page. This is wasting a lot of paper and ink, so I really want to turn this off. Anybody know how? My web searches turned up very little on this, and I can't find any option in the CUPS web UI that controls this.

arzgi
Posts: 1486
Joined: 2008-02-21 17:03
Location: Finland
Been thanked: 66 times

Re: [Software] CUPS Printer Configuration

#2 Post by arzgi »

Hello and welcome!

I have used a2ps and course cups too. Check from the cups localhost:631 that the printers default paper size is right.

johnwmstevens2
Posts: 6
Joined: 2024-11-12 19:41

Re: [Software] CUPS Printer Configuration

#3 Post by johnwmstevens2 »

arzgi wrote: 2024-11-13 10:20 Hello and welcome!

I have used a2ps and course cups too. Check from the cups localhost:631 that the printers default paper size is right.
The default paper size matches actual loaded paper.

The request ID almost certainly comes in from the LP system emulation, as printing a web page from Chrome does not print this extraneous page.

johnwmstevens2
Posts: 6
Joined: 2024-11-12 19:41

Re: [Software] CUPS Printer Configuration

#4 Post by johnwmstevens2 »

arzgi wrote: 2024-11-13 10:20 Hello and welcome!

I have used a2ps and course cups too. Check from the cups localhost:631 that the printers default paper size is right.
In case it helps, the printer.conf contains:

Code: Select all

<DefaultPrinter Brother_MFC-J6555DW>
PrinterId 303
UUID urn:uuid:bf62d553-23a3-3320-6233-2ea498d38a1a
AuthInfoRequired none
Info Brother MFC-J6555DW
Location Bedroom Office
MakeModel Printer - IPP Everywhere
DeviceURI dnssd://Brother%20MFC-J6555DW._ipp._tcp.local/?uuid=e3248000-80ce-11db-8000-b42200a3fa10
State Idle
StateTime 1731442194
ConfigTime 1731523778
Type 45084
Accepting Yes
Shared Yes
JobSheets none none
QuotaPeriod 0
PageLimit 0
KLimit 0
OpPolicy default
ErrorPolicy retry-job
Attribute marker-levels 86,87,87,100
Attribute marker-low-levels 4,4,4,3
Attribute marker-high-levels 100,100,100,100
Attribute marker-types ink-cartridge,ink-cartridge,ink-cartridge,ink-cartridge
Attribute marker-change-time 1731442184
</DefaultPrinter>
So the job sheets setting is none, and as I understand the documentation, this should disable CUPS production of such banner or other pages.

The lp command I'm piping the output of a2ps to:

lp -o job-sheets=none,none -o banner=none,none

User avatar
NorthEast
Posts: 356
Joined: 2018-11-18 04:35
Has thanked: 12 times
Been thanked: 31 times

Re: [Software] CUPS Printer Configuration

#5 Post by NorthEast »

Perhaps consider the lpr command from the cups-bsd package. It's used here without printing extra pages. YMMV

johnwmstevens2
Posts: 6
Joined: 2024-11-12 19:41

Re: [Software] CUPS Printer Configuration

#6 Post by johnwmstevens2 »

NorthEast wrote: 2024-11-13 22:39 Perhaps consider the lpr command from the cups-bsd package. It's used here without printing extra pages. YMMV
Thanks, tried it, still get the extraneous job page.

johnwmstevens2
Posts: 6
Joined: 2024-11-12 19:41

Re: [Software] CUPS Printer Configuration

#7 Post by johnwmstevens2 »

More experiments reveal that the request ID page is not printed when using lp to send a file to the printer, only when used as a filter. Another difference is that when using lp to send the Postscript file to the printer, the lp program prints the request id line to standard out.

When used as a filter, it appears that lp sends this line to the printer, instead. LPR also sends the request id line to the printer when used as a filter. For now, I'm going to modify my script to write to a temporary file instead of piping to the lp or lpr programs.

I believe this is a behavioral change from the original (non-CUPS) programs, but cannot verify that.

User avatar
fabien
Forum Helper
Forum Helper
Posts: 1158
Joined: 2019-12-03 12:51
Location: Anarres (Toulouse, France actually)
Has thanked: 101 times
Been thanked: 264 times

Re: [Software] CUPS Printer Configuration

#8 Post by fabien »

johnwmstevens2 wrote: 2024-11-15 14:56 Another difference is that when using lp to send the Postscript file to the printer, the lp program prints the request id line to standard out.

When used as a filter, it appears that lp sends this line to the printer, instead.
Hello,
Then I would try the -s option.
man 1 lp wrote:-s Do not report the resulting job IDs (silent mode.)
ImageShare your Debian SCRIPTS
There will be neither barrier nor walls, neither official nor guard, there will be no more desert and the entire world will become a garden. — Anacharsis Cloots

johnwmstevens2
Posts: 6
Joined: 2024-11-12 19:41

Re: [Software] CUPS Printer Configuration

#9 Post by johnwmstevens2 »

fabien wrote: 2024-11-15 20:36
johnwmstevens2 wrote: 2024-11-15 14:56 Another difference is that when using lp to send the Postscript file to the printer, the lp program prints the request id line to standard out.

When used as a filter, it appears that lp sends this line to the printer, instead.
Hello,
Then I would try the -s option.
man 1 lp wrote:-s Do not report the resulting job IDs (silent mode.)
Thanks! I did that, and while it stopped printing the request ID to standard output, it sill printed the request ID page to the printer in filter mode.

The temporary file solution works, but I really don't like this so am looking into the code now.

I've found where in the code it prints the request ID to standard output, and indeed it is guarded by the silent option.

It has been some time since I used the original BSD printer code, so I may be mis-remembering, but I don't think it used to work this way.

Post Reply