Package javax.print

Examples of javax.print.PrintService


    return result;
  }

  public static PrintService getDefaultPrinterService()
  {
    PrintService printService;

    try
    {
      printService = PrintServiceLookup.lookupDefaultPrintService();
    } catch (Exception ex)
View Full Code Here


    return printernames;
  }

  public static PrintService getPrinterServicebyName(String queuename)
  {
    PrintService printservice = null;

    if (printerCount > 0)
    {
      int idx = getPrintQueueIndex(queuename);
View Full Code Here

  }

  public static String getDefaultPrinterQueueName() {
    final Logger logger = Logger.getLogger(JPrint.class);
    String queuename = new String();
    PrintService printService = getDefaultPrinterService();

    if (printService != null) {
      queuename = getPrinterNamebyService(printService);
    }
    logger.debug("getDefaultPrinterQueueName :" + queuename);
View Full Code Here

    result = queuename.replace(prefix1, "");
    return result;
  }

  public static PrintService getDefaultPrinterService() {
    PrintService printService;
   
    try
    {
      printService = PrintServiceLookup.lookupDefaultPrintService();
    }
View Full Code Here

  public static LinkedList<String> getPrinterNames() {
    return printernames;
  }

  public static PrintService getPrinterServicebyName(String queuename) {
    PrintService printservice = null;

    if (printerCount > 0) {
      int idx = getPrintQueueIndex(queuename);

      if (idx >= 0) {
View Full Code Here

        manager.createPopupMessage("account_print_operation", new AnswarePopupMessage() {
            @Override
            public void onOkAnsware() {
                try {
                    DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;
                    PrintService service = PrintServiceLookup.lookupDefaultPrintService();
                    Doc simple_doc = new SimpleDoc(makeAccountsInputStreamPrinting(), flavor, null);
                    DocPrintJob job = service.createPrintJob();
                    job.print(simple_doc, null);
                } catch (Exception exc) {
                    showWarningPrint(exc);
                }
            }
View Full Code Here

        manager.createPopupMessage("account_print_operation", new AnswerPopupMessage() {
            @Override
            public void onOk() {
                try {
                    DocFlavor flavor = DocFlavor.INPUT_STREAM.AUTOSENSE;
                    PrintService service = PrintServiceLookup.lookupDefaultPrintService();
                    Doc simple_doc = new SimpleDoc(makeAccountsInputStreamPrinting(), flavor, null);
                    DocPrintJob job = service.createPrintJob();
                    job.print(simple_doc, null);
                } catch (Exception exc) {
                    showWarningPrint(exc);
                }
            }
View Full Code Here

    private DocPrintJob assignPrintJob(PrintService printService) {
        return printService.createPrintJob();
    }
   
    private PrintService assignPrintService() throws PrintException {
        PrintService printService;
       
        if ((config.getHostname().equalsIgnoreCase("localhost"))
            && (config.getPrintername().equalsIgnoreCase("default"))) {
            printService = PrintServiceLookup.lookupDefaultPrintService();           
        } else {
View Full Code Here

    private DocPrintJob assignPrintJob(PrintService printService) {
        return printService.createPrintJob();
    }
   
    private PrintService assignPrintService() throws PrintException {
        PrintService printService;
       
        if ((config.getHostname().equalsIgnoreCase("localhost"))
            && (config.getPrintername().equalsIgnoreCase("default"))) {
            printService = PrintServiceLookup.lookupDefaultPrintService();           
        } else {
View Full Code Here

        printerJob = PrinterJob.getPrinterJob();
        if (printerJob == null) {
            return false;
        }
        DialogType d = this.jobAttributes.getDialog();
        PrintService pServ = printerJob.getPrintService();
        if ((pServ == null) &&  (d == DialogType.NONE)){
            return false;
        }
        copyAttributes(pServ);
View Full Code Here

TOP

Related Classes of javax.print.PrintService

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.