Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6613214

PrinterJob.printDialog(PrintRequestAttributeSet) doesn't pass parameters correct

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 6
    • client-libs
    • 2d
    • x86
    • windows_xp

      FULL PRODUCT VERSION :
      java version "1.6.0_02"
      Java(TM) SE Runtime Environment (build 1.6.0_02-b06)
      Java HotSpot(TM) Client VM (build 1.6.0_02-b06, mixed mode, sharing)

      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows XP [Version 5.1.2600]

      A DESCRIPTION OF THE PROBLEM :
      when the user modify the printing parameters through the print dialog i.e. PrinterJob.printDialog(PrintRequestAttributeSet), some parameters are not pass at all e.g. the top margin.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      run the code and change the top margin (e.g. to 0.0) and you will notice that the media-printable-area didn't change


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      import java.awt.print.*;
      import javax.print.attribute.*;
      import javax.print.attribute.standard.*;

      public class SimplePrint
      {
      public static void main(String[] args)
      {
      final PrinterJob prnJob = PrinterJob.getPrinterJob();
      final PrintRequestAttributeSet attr = new HashPrintRequestAttributeSet();
      if(prnJob.printDialog(attr))
      {
      Attribute at[] = attr.toArray();
      for(int i=0; i<at.length ;i++)
      System.err.println(at[i].getName()+" "+at[i]);
      }
      }
      }
      ---------- END SOURCE ----------

            Unassigned Unassigned
            ttzhang Tao Zhang
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: