2

I know how to list all the printers installed in the OS:

PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null, null);

but a PrintService does not have information about the printer location.

Is there any way to see if a printer is a network printer? or has a share name?

IvanRF
  • 7,115
  • 5
  • 47
  • 71

1 Answers1

0

3 years later...

I used JNA and this extension to add PRINTER_INFO_2 support.

Also, I used WinspoolExt.PRINTER_ENUM_LOCAL | WinspoolExt.PRINTER_ENUM_CONNECTIONS as the flags.

PRINTER_INFO_2.pShareName and PRINTER_INFO_2.pServerName have the information I needed.

Community
  • 1
  • 1
IvanRF
  • 7,115
  • 5
  • 47
  • 71