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

Incorrect page resolution returned for HP 5 SI/MX PS

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P4 P4
    • None
    • 1.1.6
    • client-libs
    • x86
    • windows_nt



      Name: el35337 Date: 09/15/98


      On an HP Laserjet 5 Si/Mx PS the PrintJob method
      getPageResolution() returns 600, but since the
      dimensions returned by getPageDimension() for an
      8-1/2 x 11" page are 612 x 792, moving 600 units
      to skip an inch jumps most of the way down the
      page. Don't have this problem on any other
      printer. Windows NT 4.0. JDK 1.1.6.

      [repro code]
      Frame frame = new Frame("test");
      Toolkit tk = Toolkit.getDefaultToolkit();
      Properties props = new Properties();
      PrintJob pj = tk.getPrintJob(frame, "bug", props);
      Dimension dim = pj.getPageDimension();
      int res = pj.getPageResolution();
      System.err.println("dim: " + dim);
      System.err.println("res: " + res);

      [output]
      dim: 600
      res: java.awt.Dimension[width=612,height=792]

      This is not the reported Windows 95 bug, in
      which the resolution is hardcoded, nor is it
      the bug (reported as fixed) which was crashing
      for Win32 print jobs.

      Bob Kline
      ###@###.###
      ###@###.###
      (Review ID: 38312)
      ======================================================================

            dmendenhsunw David Mendenhall (Inactive)
            elarsen Erik Larsen (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: