Search code examples
printingcups

Can I remove the file after sending it to CUPS?


If I send a ps- or pdf-file to CUPS is it then stored in the queue as is or is it only a pointer to the file that is in the queue?

In other words: Could the file be removed from disk after it has been sent (and placed in the printer queue) but before it is actually printed?

If there is some load on the printer would this test produce any paper:

#!/bin/bash
uptime | mpage > uptime.ps
lpr uptime.ps
rm uptime.ps

Solution

  • I had the same question for myself and just tested it.

    lpr -P myprinter myfile.pdf && rm myfile.pdf
    

    did print the 700K PDF file even though it was removed immediately after sending to print.

    So I'd say the answer is "yes".