Saving a pending print job as PDF I printed an important receipt and quit Safari, only to learn the job never printed because we no longer own the network printer the computer was expecting to find. Thus, the only remaining copy of this information is in the print queue.

How do I salvage the information waiting to be printed so I can use it again?

Note: Dragging the enqueued item from the non-existant printer's queue to an existant printer's queue will print the item. I would like to know how to save the file waiting to be printed so it can be used again.
The CUPS web interface would allow you to direct the print job to another printer.

However it's possible to capture a PDF file from the CUPS queue:

/private/var/spool/cups  
total 472  
drwx--x---  24 root  _lp      816 Mar  1 14:30 ./  
-rw-------   1 root  _lp     4403 Mar  1 14:30 c00025  
drwxrwxr-x  13 root  _lp      442 Mar  1 14:30 cache/  
-rw-r-----   1 root  _lp    86110 Mar  1 14:28 d00025-001  
drwxrwx--T   5 root  _lp      170 Mar  1 14:28 tmp/  
-rw-------   1 root  _lp     4391 Feb 25 12:13 c00024  
root@Macbook: file d00025-001
d00025-001: PDF document, version 1.3


You can copy (in this example) d00025-001 to somewhere and rename it with a pdf extension (n this case), after fixing permissions, ownership and group you can open it.

The matching file starting with c is the cover sheet.  You should be able to recover the job in the the printers native language from the tmp directory:

/var/spool/cups/tmp
total 288
drwxrwx--T   5 root  _lp     170 Mar  1 14:34 ./
drwx--x---  28 root  _lp     952 Mar  1 14:50 ../
-rw-r-----   1 root  _lp    1234 Mar  1 14:28 17ed254faebef
-rw-r-----   1 root  _lp    1193 Mar  1 14:34 17ed254fece74
-rw-------   1 root  _lp  136512 Mar  1 14:28 17f025500d2e2
david_koontz@Macbook: file *2
17f025500d2e2: PostScript document text conforming DSC level 3.0, Level 2


This all done with an aging HPLJ-5000N LaserJet specified as a PostScript printer, the print job one page out of an ODT file (OpenOffice).

The original (in this case ODT) file isn't kept in the print system, which would force you to format it again.