Setting up a print-to-disk system with ippeveprinter

Viewed 116

Printer drivers, backends and PPDs are all now deprecated in CUPS, so I'm looking for the 'new' way to print PDF files to disk. Michael Sweet (the inventor of CUPS) suggests that ippeveprinter is the way forward, but I'm having difficulty understanding it.

I set it up with ippeveprinter -D /Users/Shared/Print/ "Qwe", and I get "Listening on port 8501" in reply.

So I send a file with:

lp -d Qwe /path/to/file

and the ippeveprinter process splurges out a load of 'success' messages:

localhost POST /ipp/print
localhost Continue
localhost Get-Job-Attributes successful-ok
localhost OK
localhost POST /ipp/print
localhost Continue
localhost Get-Printer-Attributes successful-ok
localhost OK
localhost Client closed connection.

But no file is to be found at the chosen location. Or anywhere else that I can see.

Any ideas? This is on macOS, but CUPS covers other OSes, too.

2 Answers

For ippeveprinter, -D specifies the output directory. Use the -d to save a copy of the spool file and the -c to product Postscript.

I tested it this way:

% ippeveprinter -k -D file:///Users/Shared/print -c /usr/libexec/cups/command/ippeveps "Qwe"
Listening on port 8501.

The file is saved as Postscript (.prn), so you will need to convert them to your format of choice. Homebrew has ps2pdf, which I tested does properly make .pdf files from the .prn file.

The man pages say that the -D option will create an output file using the job ID and name, when the URI is a directory.

Using -d (lowercase) with -k (as in James Risner's answer) simply moves the location of the temp spool folder.

To output a file, it seems you have to use -c ippeveps (though my setup needed the full pathname of /usr/libexec/cups/command/ippeveps).

This produces a PostScript file (though with the file extension .prn). Even using the -F application/pdf option did not produce a PDF file. Again, the man page says it must be used with the -P option that specifies a PPD file. This also didn't work, unless I added a line to the PPD that specified PDFs to be generated:

*cupsFilter: "application/pdf 0 cgpdftopdf"

However, this references a CUPS filter, and the whole point of this exercise is to avoid using filters and PPDs, because they're deprecated.

(The PPD file was a Generic file generated by CUPS; you'll need to create or point to your own.)

So, the following command works for now:

ippeveprinter -D file:///Users/Shared/Print/ -c /usr/libexec/cups/command/ippeveps -F application/pdf  -P /private/etc/cups/ppd/Direct_PDF.ppd Qwe

... with the caveat that it won't help when filters and PPDs are no longer supported.

Related