What I have done:-
What I want:-
Problem facing:-
I have found answer to this question. There are different states that the print process goes through. We get total pages only when the job reaches the processing state. -pending, pending-held, processing, processing-stopped, aborted, canceled, completed. we can get the jobs when they are at the processing stage using cups4j api. After that we can use its attributes and also hold or move the job according to our requirement. what we can do is make changes in the cups api like adding job state enum like processing and create its jar and use that in our project.