Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I get a list of installed printers?

Tags:

java

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.

like image 430
Thomas Avatar asked Jan 04 '09 13:01

Thomas


People also ask

How can I see all printers installed?

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.

How do I find all printers in Windows?

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.

Where are installed printers stored?

The printer drivers are stored in C:\Windows\System32\DriverStore\FileRepository.


1 Answers

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());      } } 
like image 94
Pedro Henriques Avatar answered Oct 08 '22 05:10

Pedro Henriques