title: Extended printer information in Java
body: <p>I'm trying to get some information about the printers on my system.<br>
  On Windows and Linux, with this code, only the <code>PrinterName</code> attribute is filled:</p>
  
  <pre><code>PrintService[] printServices = PrintServiceLookup.lookupPrintServices(null,null);
  for( PrintService printService : printServices ) {
      log.info("Found print service: "+printService);
      log.info(printService.getAttribute(PrinterName.class));
      log.info(printService.getAttribute(PrinterLocation.class));
      log.info(printService.getAttribute(PrinterMakeAndModel.class));
      log.info(printService.getAttribute(PrinterMessageFromOperator.class));
      log.info(printService.getAttribute(PrinterMoreInfo.class));
      log.info(printService.getAttribute(PrinterMoreInfoManufacturer.class));
      log.info(printService.getAttribute(PrinterState.class));
      log.info(printService.getAttribute(PrinterStateReasons.class));
      log.info(printService.getAttribute(PrinterURI.class));
  }
  </code></pre>
  
  <p>After using the <code>toArray()</code> function on it...</p>
  
  <pre><code>log.info("Found print service: "+printService);
  for( Attribute a : printService.getAttributes().toArray() ) {
      log.info("* "+a.getName()+": "+a);
  }
  </code></pre>
  
  <p>...this is the result:</p>
  
  <pre>Found print service: Win32 Printer : Brother MFC-9420CN BR-Script3
  * color-supported: supported
  * printer-name: Brother MFC-9420CN BR-Script3
  * printer-is-accepting-jobs: accepting-jobs
  * queued-job-count: 0</pre>
  
  <p><strong>How do I get more information</strong>, like the printer comment?</p>