0

Below is code :

try {
  PDDocument pdf = PDDocument.load(new File(filename));
  PrinterJob job = PrinterJob.getPrinterJob();
  job.setPageable(new PDFPageable(pdf));
  PrintService myPrintService = null;
  job.setPrintService(myPrintService);
  job.print();
} catch (IOException | NullPointerException | PrinterException e) {
  System.out.println(e);
}

I want to print service to be displayed before printing. Please help me regarding this it print the page but does not show to print service that contain page setup and number of copies etc..

Shashwat
  • 2,342
  • 1
  • 17
  • 33

0 Answers0