Dec 08

The PrinterJob class supports displaying a print dialog for the user to use to select printer settings as shown in the following example.

PrinterJob job = PrinterJob.getPrinterJob();
PageFormat format = job.defaultPage();

// Display print dialog

if (job.printDialog()) {

    // We can now check the settings specified by user

    PrintService selectedPrinter = job.getPrintService();

    // or print something using the settings

    job.setPrintable(myPrintable, job.defaultPage());

written by objects \\ tags: , , ,

Leave a Reply

You must be logged in to post a comment.