I have a very old laser printer (at least 20 years) I keep because of its very fine printing (nearly photo quality) and intend to use till I run out of cartridges.
Since it is an antiques piece, it understands only Postscript. Presently, printing technology evolves towards universal PDF adoption and Postscript deprecation (at least internally in the printing managers).
Until a fewq releases back (I don’t remember exactly), I could force CUPS or the printing driver to emit Postscript. This no longer works.
Since there is no matching PPD in CUPS collection, I chose HP 4L driver which gave best results with my printer. HP 4L can output Postscript but also PDF, PCL and possibly others. Therefore, the trend towards PDF is not a problem with this driver but blocks my usage.
I attempted to send directly a Postscript file to the printer with lpd command but this is internally routed through CUPS and Postscript is translated to PDF before being sent to the printer.
Is there any way to constrain CUPS to generate Postscript?
Alternatively, is there a way to systematically process the print file through pdftops just before sending to the printer?
If you have an old CUPS .ppd for the printer you may be able to edit it to work with current CUPS. I did that for an old (now dead) Canon inkjet printer. Many entries in the .ppd file format have been changed to support new printer features. There is now a project to support legacy printers: https://github.com/openprinting/pappl-retrofit. It is available as a Fedora package.
That are many printer models in cups which will send postscript to the printer. For example there is a Generic Postscript model. This models hasn’t been touched for ages as any changes can be tested without access to actual printers.
The pdf workflow does not imply that cups is sending pdf files to the printer. That would only happen if the configured printer model specify that the printer will access pdf as input. Most printer models will send some kind of raster images to the printer. In that case a pdf format is used as an intermediate format.
And it includes the package legacy-printer-app available in the Fedora repository. This will use the exact same printer models as the installed cups would use. There is also some snap packages with the same purposes.
Unfortunately, this model never had a .ppd. It was a printer I salvaged from my company when it disbanded its DTP team (internal newsletter). I can’t even reconfigure it because it requires a special program (not available under Linux, Windows or other common OS) linking through a serial port.
I know PDF is sent to the printer because I have used wireshark to look at the Ethernet packets.
Does your workflow already create the postscript file? Then just send the PS file to a raw printer queue or add the lp option -o raw. That will skip all cups filters and send the file to the configured printer.
Generally no. Most my printings come from LibreOffice Writer and I fear that it gnerates now only PDF (there is no longer an option in the print dialog/printer settings to request Postscript).
I can eventually accept PDF to file, convert with pdftops and then lp to the printer. I was not aware of the -o raw option. I’ll check if this solves the issue.