Logo 
Search:

Java Answers

Ask Question   UnAnswered
Home » Forum » Java       RSS Feeds
  Question Asked By: Dora Medina   on Jun 10 In Java Category.

  
Question Answered By: Edwin Chavez   on Jun 10

for loading printers  you can use this part

javax.print.PrintService[] services = PrintServiceLookup.lookupPrintServices(null, null);


and for printing you can use this part

JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport, new HashMap(), dataSource);
PrinterJob job = PrinterJob.getPrinterJob();
job.setPrintService(selectedPrinter);
JRPrinterAWT.printPages(job, jasperPrint, 0, size, true);



there are a lot of way for printing in jasper  for more info you can see jasper report samples

Share: 

 

This Question has 1 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on jasper printReport problem Or get search suggestion and latest updates.


Tagged: