private static void checkPrinter() {
        String queryString = "${^XSET,ACTIVERESPONSE,1}$";

        try {
            PrintService printService = findPrintService();

            System.out.println(printService.getAttribute(QueuedJobCount.class).getValue());

            if (printService == null) {
                System.out.println(PRINTER_NAME + " jna not found.");
                return;
            }

            DocPrintJob job = printService.createPrintJob();
            job.addPrintJobListener(new MyPrintJobListener());
            job.addPrintJobAttributeListener(new MyPrintJobAttributeListener(), null);

            InputStream is = new ByteArrayInputStream(queryString2.getBytes());
            DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;
            Doc doc = new SimpleDoc(is, flavor, null);

            job.print(doc, null);
            try {
                is.close();
            } catch (IOException e) {
                e.printStackTrace();
            }

        } catch (PrintException e) {
            e.printStackTrace();
        }
    }