Control printing queue
I have made a Java application which sends a set of files (which are on a directory) to a printer.
I am using java printing api.
Everything works fine.
I have a question:
If the number of files is big and/or the files have several pages, since my application sends it for printing without waiting, is there a possibility to loose some files?
I mean, imagine that i send 100 files for printing. Each one with 100 pages. What happens if the printer has no paper for example? the job queue will maintain the files to be printed?
Is there a way in Java to see if a printer has more than X jobs for printing? (so I can wait until this number decrease)
Once you send information about all pages need to print, all information are store in printer poll memory. Every time before print a paper, it's check paper tray for availability. If not it warns and wait until you request again, from the printer, not from your application.
Ok, thanks for your help.