United StatesChange Country, Oracle Worldwide Web Sites Communities I am a... I want to...
Bug ID: JDK-6638782 Follow-up on printing scaling problem for plugin2 for Firefox.
JDK-6638782 : Follow-up on printing scaling problem for plugin2 for Firefox.

Details
Type:
Bug
Submit Date:
2007-12-07
Status:
Closed
Updated Date:
2010-09-08
Project Name:
JDK
Resolved Date:
2008-06-17
Component:
deploy
OS:
windows_xp,windows
Sub-Component:
plugin
CPU:
x86
Priority:
P3
Resolution:
Fixed
Affected Versions:
6u10
Fixed Versions:
6u10 (b21)

Related Reports

Sub Tasks

Description
See 6611380.

With 6611380, printing support is added for plugin2.

However, there are still several issues with printing for Firefox.

For FF3.0, Mozilla.org broke Plugin printing for OJI plugin as well as FLASH. This fix is a best effort to make FF3.0 printing works for Plugin2. However, several issues are still under investigation:
1) Print preview doesn't work.  This is a bug on FF side: FF doesn't call to Plugin (NPP_Print()) during "Print Preview".
2) Scaling issue with printer print: The applet is actually printed (on the top-left corner of the paper) and the scale is off (small).  This is also a bug that we are currently working with Mozilla.org.

This CR is opened to follow-up on the printing issues for Firefox.

                                    

Comments
EVALUATION

Several bugs had been opened with bugzilla and we're still following up with Mozilla.org on them:

1) https://bugzilla.mozilla.org/show_bug.cgi?id=408623:  FF3 Print scaling issue.

2) https://bugzilla.mozilla.org/show_bug.cgi?id=399661: FF3 & FF2 Print Preview not working

3) https://bugzilla.mozilla.org/show_bug.cgi?id=412721: Regression: FF3 latest crashes when printing java applet.
                                     
2008-01-18
EVALUATION

With today FF3 build (01/22/08), the crash issue listed in (3) above is now fixed.
                                     
2008-01-22
EVALUATION

Fix to https://bugzilla.mozilla.org/show_bug.cgi?id=408623 (FF3 Print scaling issue) by Moz.org doesn't seem to work.

Verified with latest FF3 nightly build and the result seen is no different from before, that is:

- OJI plugin's print still broken with FF3 (it works with FF2). Note that, OJI plugin's print involves converting the HDC sent by FF to EnhMetaFile before making use of our printing code (shared between IE and FF). The reason for it is because our printing code was written to handle IE, which sends plugin an EnhMetaFile instead of a real printer DC.

- New plugin's print for FF currently doesn't convert FF's print HDC to EnhMetaFile, instead, it makes use of the HDC received directly. This allows image to render on the paper area during print. However the scaling problem still exists. The printed applet looks very small and is off to the TL corner of the paper.

- Changing new plugin's FF print to convert the HDC received to EnhMetaFile doesn't work. No image get rendered as a result (similar to how OJI plugin's print is broken with FF3).

Since https://bugzilla.mozilla.org/show_bug.cgi?id=408623 has been closed, will reopen it or file a new one.
                                     
2008-01-25
EVALUATION

Since the DC is no longer an enhanced metafile, we aren't getting scaling done for us,
so we need to scale. But the problems described under 
https://bugzilla.mozilla.org/show_bug.cgi?id=408623
were
1) FF3 did not correctly indicate the X/Y in device coords
2) FF3 either over-prints plugin printing, or clips to prevent any plugin printing
in the area that is within the margins of the paper.

Only issue (1) is fixed by the fix for https://bugzilla.mozilla.org/show_bug.cgi?id=408623

Consequently I have filed https://bugzilla.mozilla.org/show_bug.cgi?id=415285 

We are still broken until that is fixed.
                                     
2008-02-01
EVALUATION

https://bugzilla.mozilla.org/show_bug.cgi?id=415285 is marked resolved.
With 415285: FF fixes the over printing problem by creating a new windows for
plugin to render print contents on. This window is backed by a cairo paginated
layer where everything else except plugin is drawn on.

However, with latest FF3.0b4pre (02/21/08 build), we face new issues with printing.
This time it is with the new plugin print rendering window's coordinates clipping and unit conversion. The result is, print scaling and location are still very off, and the "off-ness" is depended on the print device.

Further, another regression is also seen with FF3b4pre. FF now calls twice to NPP_Print() for every print request.

2 new bugs are filed with Moz.org:

- https://bugzilla.mozilla.org/show_bug.cgi?id=418915 : Print window's coordicnates problem
- https://bugzilla.mozilla.org/show_bug.cgi?id=418937 : FF calls NPP_Print() twice

Also asked Moz.org to fix backward compatibility problem in general for plugin printing, because currently, not just Java Plugin but Flash also cannot be printed with FF3.
                                     
2008-02-22
EVALUATION

Mozilla.org had fixed the printing coordinate issues for FF3.
They now send us a real raster print dc.
With that, our plugin code will also change to treat this dc accordingly.

Printing on Solaris/Linux with Plugin2 is still broken however because Mozilla.org has not ported plugin printing work to GTK2 and won't be able to make that happens within FF3 timeframe.

Will file another CR to track GTK2 printing.
                                     
2008-03-08



Hardware and Software, Engineered to Work Together