Bypass a button click for printing
The title might not explain a lot.
I am trying to print multiples bar codes on separate sheets.
So the idea is to enter a number into a text field which is the number of pages to print. When a button is pressed, the value is taken and a bar code is generated and printed. I have used the PrintUtilities.printCmponent(this), but it requires to press the Print button. Having to press print button 500 (that's the usual number of pages needed) seems very not practical.
Any ideas how I could try and bypass this print button or any techniques I could use?