I was bitten by this old error / missing function in Java:
http://bugs.sun.com/view_bug.do;jsessionid=b2ac8ea11f05c16d948e24d36fb5?bug_id=4673406
The fact is that the Properties button in the standard Java print dialog box is apparently always disabled on Windows. The button is only activated if PrintService.getServiceUIFactory () returns something that is not null. Unfortunately, Win32PrintService instances always return null. Always.
By googling, I found that you can call up the Windows properties properties dialog by calling rundll32:
rundll32 printui.dll,PrintUIEntry /e /n "name of printer here"
I hope I can use this to get around the error / missing function in Win32PrintService. However, I do not know how I can request the PrintUIEntry dialog to select a user.
In other words, how can I get the result of the above rundll32 call? (If I need to write something in C / JNI and use the Windows API directly, let it be. I would prefer, though.)
Or is there a better way to solve this problem?
source share