I am trying to make java application that counts number of prints for a document by user. let say user login to the program , he selects and prints one document, the program will register this print for this document by this user .Next time if the same user prints the same document , it will count second time , third time and so on. The problem here is that you cannot depend on job.print(myDoc, aset) because not every job of printing will print the document, because simply the printer is either off , door open, no papers , or even the job itself on queue. I have searched a lot I could not find how to make the printer responds back if the document is printed in java. I have tried with PrinterStateReasons and I have tried with PrintJobWatcher class but no ways at all. how I will make sure the document is printed by the user.
*all my documents are in one copy only.
please help me how to do this.
here is my code