On 19/08/2020 10:26, Mark Rogers wrote:
If I have a large file to print, on Linux it can takes ages spooling - hours even - where on Windows it can be printing in seconds. I've noticed this many times over the years, on all types of printer I've had use of.
(Large typically means graphical, eg I tried printing a 2 page A3 PDF as my Windows PC was offline, and I managed to rebuild my Windows PC, transfer the file and be ready to print before I hear a peep from the printer, and on cancelling the Linux print, Windows had the printer clunking away a few seconds later.)
Is there a good reason for this? Is it just me?
Well......
It depends. It can be slow. It's certainly complicated!
A lot of the time, Linux writes print jobs are translated either to graphics or to postscript which can then be sent over to the printer - these can be huge so can take an age to transfer.
It also depends on your config. I have a linux server running a cups server. My printer is connected to this via USB. I have 2 "devices" set up on my server, both pointing to that printer. One is a "Raw" device - accepts stuff and sends it straight to the printer - this is shared with my network. The other is a normal appropriate printer driver for the printer. If printing on my server, I print to the "Normal" printer.
On my laptop, I have installed a local printer driver, but I get it to send to my network's shared "Raw" device. Why? Well, printing used to "just work" as they say, but something went wrong and I investigated. I used to have the local printer driver print to the server's printer driver, but what this was doing was taking a (say) LibreOffice document, changing it to graphics or postscript (or whatever the printer directly understands), then sending this document to the server's version of cups, which was then sending it through it's own print-processing driver, where it was again transferred into graphics, and then it was sent to the printer. From what I gathered, this 2nd step was superfluous leaving me with 2 options/
Laptop have a Raw device, Server has a printer-driver device. Laptop doesn't process and just sends the files to the server where they're processed.
Laptop has a printer driver, server has a raw device. Laptop processes the document and sends it to the server which just passes it on.
The 2nd approach worked best for me. The Laptop connects to the server's raw device with an IPP URL ipp://192.168.1.1:631/printers/PRINTER_NAME_RAW?waitprinter=false&waitjob=false where 192.168.1.1 is the server IP, 631 is the CUPS port PRINTER_NAME_RAW is the name of the raw printer device.
Then there's another wrinkle. By default CUPS waits until it has received the whole file and for the printer to be online before spooling to the server, and sending the print job. Windows does the opposite and so seems to print faster. This is what the "?waitprinter=false&waitjob=false" parameters do - sends the file to the server's cups even if the printer is off-line, and start printing IMMEDIATELY, without waiting for the whole file to be transferred.
My setup is hampered by GNU's printer utility and cups being determined to try and auto-discover network printers (and to a certain extent, Firefox and Thunderbird doing the same). These add auto-discovered printers to print dialogs and the Printers utility. Without fail, none of these work for me and I can't configure them, becuase they are ephemeral and are re-detected on each log in. (They're detected partially by bonjour/zeroconfig/dlna. As I need that service for something else, I can't disable it. Wish I could).
YMMV of course. It depends where your printer is and how it is connected to your network. In some ways wireless connection is simpler as you don't have to faff with setting up a network's print sharer. If it's connected to a Windows machine, it's probably shared via Samba. If it's connected to a linux machine, and you want windows to print to it, you may have it shared via Samba as well - this works and I used it for years, but I eventually realised that I had the device shared via CUPS as well, and I could do-away with Samba printer share by using IPP, which I think is the more modern way to go.
So, it can be complicated! I hope this may have helped a bit in explaining ways of speeding things up.
Steve