I'm searching for a possibility to get a list of installed printers. I'm using JDK 1.6 with a Windows operating system. Does anyone know a solution?
Thank you in advance.
If you have many icons in your Windows System Tray, you may have to click the Show Hidden Icons arrow to expand the full list of application icons. From the PrinterLogic menu, click View Installed Printers. This will open a list of all printers currently installed on your computer.
Open the Windows 10 Settings App. Select Devices. Then click on Printers & scanners. Under the section of Printers & scanners, you will find all the installed printers on your computer.
The printer drivers are stored in C:\Windows\System32\DriverStore\FileRepository.
Just wanted to add a little snippet:
import javax.print.*; class Test { public static void main (String [] args) { PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null, null); System.out.println("Number of print services: " + printServices.length); for (PrintService printer : printServices) System.out.println("Printer: " + printer.getName()); } }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With