Closed Bug 408623 Opened 17 years ago Closed 17 years ago

FireFox 3.0 plugin on windows printing seems to be broken

Categories

(Core :: Printing: Output, defect, P3)

x86
Windows XP
defect

Tracking

()

RESOLVED FIXED

People

(Reporter: phil.race, Assigned: vlad)

Details

Attachments

(1 file)

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.11) Gecko/20071127 Firefox/2.0.0.11 Build Identifier: FireFox 3.0 prebeta2 The Java plugin is unable to print correctly in firefox 3.0, apparently due to problems with the information in the structure that FF3 passes to describe the window position. I am trying to print an applet that is essentially at the top-left hand corner of the web page. FF3 calls our NPP_Print(NPP instance, NPPrint* platformPrint) where NPPrint contains 1) a printer DC 2) an NPWindow The printer DC correctly represents my HP laserjet and reports 1200dpi and an extent of 9600x12780 which corresponds to an imageable area of 8.0" x 10.65" on my 8.5x11 paper However the NPWindow seems off. It reports x=7364, y=2880, w=6000, h=6000 I guess that's fine these are in device coords, so long as you know its that, and not screen coords. Also width and height seem probably fine 5"x5" is I think how large ff3 wants us to print. But the x and y are way off. We are being asked to print at x=6.14", y=2.40" I'd expect maybe x=1200, y=1200 or thereabouts. I can adjust for this being a printer DC, not an enhanced metafile as in other browsers. But without correct x,y values here, we will print in the wrong position, perhaps mostly off the page. Reproducible: Always Steps to Reproduce: See details Actual Results: See details Expected Results: See details. This is only part of the problems. In addition, the area of the page where the applet should print - if the window x and y from FF3 were correct is apparently over-printed by FF3. This can be seen when hacking the plugin to print at (0,0) on the page, the rectangular area of the page acts like a clip. Eg there's a strip of the applet content printed along the top, and down the left hand side, but it is over-printed by a white rectangle in the parts that would be printed in the area the applet should appear.
Status: UNCONFIRMED → NEW
Component: General → Printing
Ever confirmed: true
Product: Firefox → Core
QA Contact: general → printing
Flags: blocking1.9?
Assignee: nobody → vladimir
Flags: blocking1.9? → blocking1.9+
Priority: -- → P3
Attached patch fix origin (deleted) — Splinter Review
Should be a simple fix here -- the printing code was grabbing the origin directly from the RC, where it's coming back in appunits, and then not converting the position to dev units. I'm guessing the reason for this is that elsewhere in the code we always use GetWindowOriginInPixels() which returns things in dev units, but (I think?) we can't do this here since we're printing and we have pagination involved.
Attachment #296030 - Flags: superreview?(roc)
Attachment #296030 - Flags: review?
Attachment #296030 - Flags: review? → review?(cbiesinger)
Attachment #296030 - Flags: review?(cbiesinger) → review+
Comment on attachment 296030 [details] [diff] [review] fix origin use presContext not PresContext()
Attachment #296030 - Flags: superreview?(roc) → superreview+
Checked in (with presContext).
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: