Title: RE: Performance Analysis
Dear All,
      I'm trying to print the pages in duplex mode. I have written the following function. But this is not working.  Is it a problem with JDK or with FOP. When I call this method, a printer dialog is shown with the option duplex selected, but the pages are not printed in duplex mode. I'm able to duplex print from microsoft applications.
  
 private void printToPrinter()
 {
  // Build a set of attributes
  PrintRequestAttributeSet aset = new HashPrintRequestAttributeSet();
  aset.add(Sides.DUPLEX);
 
  PrinterJob pj = PrinterJob.getPrinterJob();
   if (pj.printDialog(aset))
   {
 
   // renderer is AWT renderer
    pj.setPageable(renderer);
    try
    {
     pj.print(aset);
    }
    catch (PrinterException pe)
    {
     pe.printStackTrace();
    }
   }
 }
 Please correct me,
 
Ramana.

Reply via email to