Is there a way to view the completed print jobs (in the print queue)?

I have enabled the Advance Server Settings "Preserve job files (allow reprinting)".

I am wondering if I can view the file (as a pdf for example) instead of reprinting it.

I believe these files are found in /var/spool/cups/ but I can not open it in any viewer or editor that'll show its content.

I am trying to locate a file that was printed, but I do not want to print all the files in the print queue just to find that one file.

  • This has been answered before on our brotherly Unix and Linux stackexchange site here: unix.stackexchange.com/q/123634/85039 – Sergiy Kolodyazhnyy Oct 29 '15 at 14:02
  • @Serg I dont think it is the same question as the OP wants to see the file printed and not only the filename... – Bruni Oct 29 '15 at 15:01
  • @Bruni got it right. I want to see the printed or what will be printed, if I select 'reprint', except I want to view not print it. – azuer88 Oct 30 '15 at 6:48

On my Ubuntu 14.04 system the files are in directory /var/spool/cups, but that is only accessible for root:

root@mypc:/var/spool/cups# ls -ld .
drwx--x--- 3 root lp 4096 Oct 30 19:20 .

I could open the PDFs in there the following way:

sudo -E su -l
cd /var/spool/cups
xournal <filename>

Note that the files don't have extension pdf but start with a c or a d, followed by the job number, e.g. c00072 c00075 d00066-001 (*)

You can find the PDFs the following way:

find .|xargs file|grep -i pdf

(*) Files starting with a c are the print control files. Files starting with a d are the data files. See Cups Documentation

  • It looks like the print job is composed of two files, one that is prefixed with 'c' and the other with 'd'. The 'd' prefix is the pdf file for the given print job. I was able to view it using the default viewer. Thanks @NZD, I got stuck trying to decipher the 'c' prefixed file. When I copied all the 'd' prefixed file (and changed its permissions), I was able to view all the files that were printed. – azuer88 Oct 30 '15 at 7:04
  • @azuer88 Thanks - added your info to my answer – NZD Oct 30 '15 at 7:11
  • that's great. That's exactly what I need to read (link to the Cups Documentation). – azuer88 Oct 30 '15 at 7:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.