Printings using CUPS, when can my app quit?

Posted by KPexEA on Stack Overflow See other posts from Stack Overflow or by KPexEA
Published on 2008-09-16T20:29:25Z Indexed on 2010/06/11 11:22 UTC
Read the original article Hit count: 232

Filed under:
|
|

I have an linux app that uses cups for printing, but I've noticed that if I print and then quit my app right away my printout never appears. So I assume that my app has to wait for it to actually come out of the printer before quitting, so does anyone know how to tell when it's finished printing??

I'm using libcups to print a postscript file that my app generates. So I use the command to print the file and it then returns back to my app. So my app thinks that the document is off to the printer queue when I guess it has not made it there yet. So rather than have all my users have to look on the screen for the printer icon in the system tray I would rather have a solution in code, so if they try and quit before it has really been sent off I can alert them to the fact. Also the file I generate is a temporary file so it would be nice to know when it is finished with so I can delete it.

© Stack Overflow or respective owner

Related posts about linux

Related posts about printing