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

size of temp file .emf is many times larger in JDK6 and NOT deleted after printing applet using IE

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P2 P2
    • None
    • 6u5
    • deploy
    • None
    • x86
    • windows

      JDK 6 upd 5, 7, 10 that have been tried and reproduced the
      issue.
      Windows XP
      Microsoft I.E. 6 and 7.


      Steps to reproduce:

      Internet Explorer 6.0.2900.2180.xpsp_sp2.080814-1233 in both
      cases.

      Loaded the demo applet from Sun's own site
      http://java.sun.com/applets/jdk/1.4/demo/applets/SpreadSheet/example1.ht
      ml

      The applet displayed the 4 x 3 spreadsheet. The applet image is
      relatively small. I highlighted cell C4, then requested File->Print
      from the Browser.

      With JRE 1.4.2_10 the .emf file produced is 154,068 bytes. The file is
      named:
      /cores/JRE142_10.AL7EX49K.emf

      With JRE 1.6.0_05 the .emf file produced is 1,843,724 bytes. The file
      is named:
      /cores/JRE160_05.OLOJU5K3.emf


      You may want to add this in comments section for internal
      view only.
      ======================================

      Customer description of the problem.

      When MS Internet Explorer (v 6.0.2900.2180.xpsp_sp2_gdr.080814-1233) browser-ini
      tiate print command is used to print a page displaying a Java applet [seen with
      SRE 1.6.0_05 and 1.6.0_07] the applet's image is saved to an .emf file (enhanced
      windows metafile). This file is not deleted even after MSIE is exited and will
      \ persist in the %TEMP% directory indefinitely. The file cannot be deleted as l
      ong as MSIE is running. Because the file size is much larger with Java 1.6.0 th
      an with Java 1.4.2, the user's drive can fill up with these files and result in
      other errors from lack of space.

      Have test results from 2006 with Windows XP SP1 that in that release (and JRE 1.
      4.2_04) the .emf file was deleted as soon as the printer successfully acknowledg
      ed completion of the print job. (Do not currently have configuration to reprodu
      ce this test.)


      Do not see emf files created when using Firefox 3.0 to print pages with applets.
      However, Firefox print preview shows a blank space instead of the applet's dis
      played image; the print output on paper is correct however.

      This behavior does not produce any errors until the policy quota for temp files
      is reached or the disk drive is filled. This can happen if the user keeps MSIE
      up for a long time and prints many pages with applets. This is much more seriou
      s with JRE 1.6.0 than 1.4.2 as the metafiles are typically ten times larger with
      1.6.0 than for the same applet running under 1.4.2.

      Additional technical information from customer
      ------------------------------------------------------

      1. I have tested only Firefox 3.0 with JRE 1.6.0_07 on Windows XP. I
      have not found out about the mechanism Mozilla Firefox uses to print
      objects embedded on web pages. It does not appear to use .emf files,
      even in the Windows implementation. In my testing, the applet displayed
      only on the printout; it was blank space in the print preview dialog.


      2. The vendor that is customizing the browser has told us so far that
      they let the native MSIE print engine operate on the web pages. The
      link between MSIE browser print and the overridden PrintAll method in
      our applet would be through the Java plug-in.


      3. Native MSIE uses the .emf file to marshal to the printer, the
      rendered image from embedded objects (such as Java applets) that the
      browser does not render via its own code. I have reached out to our
      technical contact at Microsoft for a clearer understanding, as well as
      answer the question you posed in a later e-mail

            ccheung Calvin Cheung
            lkchow Lawrence Chow
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: