Incorrect Page Size from PrintJob

XMLWordPrintable

    • Type: Bug
    • Resolution: Duplicate
    • Priority: P3
    • None
    • Affects Version/s: 1.1.2
    • Component/s: client-libs
    • None
    • x86
    • windows_95



      Name: joT67522 Date: 08/25/97


      In java.awt.PrintJob under Windows 95, the PrintGraphics
      method returns an incorrect page size which is considerably
      smaller than the actual printable area of the page. For
      example:

      import java.awt.*;
      class printTest {
         static public void main( String args[] ) {
          Frame f = new Frame();
          f.add( new Label( "Hello, World!" ) );
            f.pack(); f.show();
            PrintJob pj = f.getToolkit().getPrintJob(f,
               "Test", null);
            Graphics pg = pj.getGraphics();
            Dimension d = pj.getPageDimension();
            pg.drawRect(0,0,d.width,d.height);
            pg.drawLine(0,0,d.width,d.height);
            pg.dispose();
            pj.end();
            f.dispose();
            System.exit(0);
         }
      }

      This should print a box around the entire page,
      but it instead only covers %80 of the page. The
      program works correctly under the other platforms
      I have tried.
      company - Colorado State University , email - ###@###.###
      ======================================================================

            Assignee:
            Creighton Chong (Inactive)
            Reporter:
            Joon Oh (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: