[Software] CUPS Printer Configuration
-
- Posts: 6
- Joined: 2024-11-12 19:41
[Software] CUPS Printer Configuration
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.
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.
Re: [Software] CUPS Printer Configuration
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.
I have used a2ps and course cups too. Check from the cups localhost:631 that the printers default paper size is right.
-
- Posts: 6
- Joined: 2024-11-12 19:41
Re: [Software] CUPS Printer Configuration
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.
-
- Posts: 6
- Joined: 2024-11-12 19:41
Re: [Software] CUPS Printer Configuration
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>
The lp command I'm piping the output of a2ps to:
lp -o job-sheets=none,none -o banner=none,none
-
- Posts: 6
- Joined: 2024-11-12 19:41
-
- Posts: 6
- Joined: 2024-11-12 19:41
Re: [Software] CUPS Printer Configuration
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.
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.
- fabien
- 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
Hello,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.
Then I would try the -s option.
man 1 lp wrote:-s Do not report the resulting job IDs (silent mode.)
Share 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
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
-
- Posts: 6
- Joined: 2024-11-12 19:41
Re: [Software] CUPS Printer Configuration
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.fabien wrote: ↑2024-11-15 20:36Hello,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.
Then I would try the -s option.man 1 lp wrote:-s Do not report the resulting job IDs (silent 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.