Is there a way to test when a print job is complete ?

Is there a way to test when a print job is complete ?

Postby Rick Lipkin » Thu Jan 05, 2017 10:10 pm

To All

I have a billing program that sends its output to print either to paper or print to .pdf. My user is always committing his invoices before he confirms the print job is completed or the send to .pdf is on his desktop.

Just need a way to test that the print job is complete.

Thanks
Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Is there a way to test when a print job is complete ?

Postby Antonio Linares » Sat Jan 07, 2017 9:22 am

Rick,

It seems as this is what you need:
https://support.microsoft.com/en-us/kb/160129

The C code is there. Anyhow, please read it and check if that is what you are looking for.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42093
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Is there a way to test when a print job is complete ?

Postby Rick Lipkin » Sat Jan 07, 2017 3:44 pm

Antonio

Yes, I think the information from the link is what I am looking for .. I just need to know when a job from the spooler is complete or has errored. I will use the returned value of the spooler to determine if I can allow my invoices to be committed.

I am not much of a 'C' programmer, however if you could create a wrapper for the spooler functions I would be most grateful. I am sure the other FiveWin users could take advantage of that function if you wanted to add it to the FiveWin libraries.

Thanks
Rick Lipkin
User avatar
Rick Lipkin
 
Posts: 2665
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: Is there a way to test when a print job is complete ?

Postby Antonio Linares » Sat Jan 07, 2017 10:11 pm

Rick,

Have you tried PrnStatus() ?

viewtopic.php?p=176882#p176882
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42093
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Natter and 68 guests