public static boolean isPrinterAvailable2(String printerName) {
        DocFlavor myFormat = DocFlavor.SERVICE_FORMATTED.PRINTABLE;
        PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();

        PrintService[] printers = PrintServiceLookup.lookupPrintServices(myFormat, aset);

        for (PrintService printService : printers) {
            if (printService.getName().equals(printerName)) {
                System.out.println(printService.getAttribute(PrinterIsAcceptingJobs.class));
                System.out.println(printService.getAttribute(PrinterLocation.class));
                System.out.println(printService.getAttribute(PrinterMakeAndModel.class));
                System.out.println(printService.getAttribute(PrinterMessageFromOperator.class));
                System.out.println(printService.getAttribute(PrinterMoreInfo.class));
                System.out.println(printService.getAttribute(PrinterMoreInfoManufacturer.class));
                System.out.println(printService.getAttribute(PrinterState.class));
                System.out.println(printService.getAttribute(PrinterStateReasons.class));
                System.out.println(printService.getAttribute(PrinterURI.class));
            }
        }

        return false;
    }