I've been working on an application work require, which prints a JPanel (and the contents of it) to a 4x4 inch label.
Ideally, the system needs to print silently, so I am trying to get all the print settings set correctly, however, I am having some trouble.
When the default printer on the computer is set to the label printer, my labels all appear to have a large margin, which pushes the information off the page. But if the default printer is the normal laser printer, and the label printer is selected by the user via the print dialog box, then the label prints perfectly on the label printer.
Similarly, regardless of the computers default printer, if I do a print service lookup and then set it to print on the label printer, I once again get the large margin, thus ruining my label.
I don't know what I should be doing here - is there a way of getting all the information (the properties of the printjob) after the print dialog has been closed by the user? Or can anyone suggest what might be wrong here?