Last Comment Bug 768348 - printout is empty when scaling below 25%
: printout is empty when scaling below 25%
Status: RESOLVED FIXED
: regression
Product: Core
Classification: Components
Component: Printing: Output (show other bugs)
: 13 Branch
: x86_64 Windows 7
: -- normal (vote)
: ---
Assigned To: Robert O'Callahan (:roc) (email my personal email if necessary)
:
: Jet Villegas (:jet)
Mentors:
Depends on:
Blocks: 417178 680436
  Show dependency treegraph
 
Reported: 2012-06-26 00:33 PDT by Dominik Luyten
Modified: 2012-07-04 16:01 PDT (History)
7 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
FF_Print_Bug.png (159.93 KB, image/png)
2012-06-26 00:33 PDT, Dominik Luyten
no flags Details
test file to reproduce described behaviour (97.13 KB, text/html)
2012-06-27 06:02 PDT, Dominik Luyten
no flags Details
fix (2.97 KB, patch)
2012-06-28 17:46 PDT, Robert O'Callahan (:roc) (email my personal email if necessary)
jmuizelaar: review+
Details | Diff | Splinter Review

Description Dominik Luyten 2012-06-26 00:33:59 PDT
Created attachment 636616 [details]
FF_Print_Bug.png

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:14.0) Gecko/20100101 Firefox/14.0
Build ID: 20120619191901

Steps to reproduce:

I observed this in FF13 and 14Beta. I think it was fine with FF12 and FF11. Definitively ok on FF10. All German versions on Windows 7

I have a very large business report which I usually print at the end of the month. Due to its size I have to scale it down. I use "Seite einrichten" (setup page?) and hit the checkbox for "Auf Seitengröße verkleinern" (scale down to page size?).


Actual results:

The print preview looks fine, but when I print it, it is empty. See attached file.

I then tried to set the scaling manually. It works fine until 25%. To print everything I need to go down to 23%. 

Workaround: Use different paper size, so I do not have to scale down that much. I was using A4 format, now using A3. But at the end of the year, the print wont even fit on A3 with 25% scaling.


Expected results:

Printout should match print preview.
Comment 1 Loic 2012-06-27 03:47:54 PDT
Is it possible to attach a test report (a blank one with fake data) so we can test too?
Comment 2 Dominik Luyten 2012-06-27 06:02:24 PDT
Created attachment 637089 [details]
test file to reproduce described behaviour

In this attached file you can reproduce the effect. I hope this helps you out.
Comment 3 Loic 2012-06-27 06:20:44 PDT
In the menu 'Print preview', do you choose 'portrait' or 'landscape' as paper orientation?
Comment 4 Dominik Luyten 2012-06-27 06:29:48 PDT
landscape
Comment 5 Loic 2012-06-27 07:11:17 PDT
Indeed, I tried to print the attached page with settings 'Shrink to Fit' and 'Landscape' and the Document Writer XPS file was empty (I didn't try with a real printer) even if the print preview showed the entire page.

I think it's a regression, due to:
Florian Maier — Bug 680436. Don't clamp shrink-to-fit values. r=roc 

m-c
good=2012-02-05
bad=2012-02-06
http://hg.mozilla.org/mozilla-central/pushloghtml?fromchange=ccbb41b873cd&tochange=814d0b2dbaba

The fact is before patch from Bug 680436 landed, Shrink-to-Fit was broken (right side was missing) but Firefox was able to print exactly the print preview.
Now, it fits good but the print output is empty.
Comment 6 Alice0775 White 2012-06-28 07:26:14 PDT
I tried to reproduce with custom scale 20% with "Microsoft XPS Document Writer" on WindowsXP Sp3

Regression window
Good:
24-Mar-2008 0714
Bad:
25-Mar-2008 0736

Bonsai log:
http://bonsai.mozilla.org/cvsquery.cgi?treeid=default&module=all&branch=HEAD&branchtype=match&dir=&file=&filetype=match&who=&whotype=match&sortby=Date&hours=2&date=explicit&mindate=2008-03-24+00%3A00%3A00&maxdate=2008-03-25+04%3A00%3A00&cvsroot=%2Fcvsroot

Regressed by Bug 417178
Comment 7 Alice0775 White 2012-06-28 08:27:41 PDT
in local build, I confirmed that Backing Bug 417178 out from tip fixed the problem.
Comment 8 David Baron :dbaron: ⌚️UTC-8 2012-06-28 16:18:58 PDT
You backed out attachment 311296 [details] [diff] [review] and that fixed the bug?
Comment 9 Alice0775 White 2012-06-28 16:31:44 PDT
(In reply to David Baron [:dbaron] from comment #8)
> You backed out attachment 311296 [details] [diff] [review] and that fixed
> the bug?

Yes.
Comment 10 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-06-28 17:35:10 PDT
A call to ExtCreatePen fails when we try to stroke a very thin line, because the line width gets rounded down to 0 (ExtCreatePen only takes integer widths in GDI logical units). That failure puts the surface into an error state so nothing more gets rendered. I guess this regressed because bug 417178 allowed us to choose narrower border widths, but really the bug was there in cairo all along.
Comment 11 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-06-28 17:46:03 PDT
Created attachment 637743 [details] [diff] [review]
fix
Comment 12 Jeff Muizelaar [:jrmuizel] 2012-06-29 13:25:55 PDT
Comment on attachment 637743 [details] [diff] [review]
fix

A reftest would be nice.
Comment 13 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-06-29 19:27:12 PDT
We don't have a harness that does actual printing :-(.
Comment 14 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-07-02 17:57:52 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/27c9c81709f5
http://hg.mozilla.org/mozilla-central/rev/27c9c81709f5
Comment 15 Loic 2012-07-04 03:05:08 PDT
Is it possible to backport the patch in Aurora and maybe Beta or too risky (about potential printing glitches/issues)?
Comment 16 Robert O'Callahan (:roc) (email my personal email if necessary) 2012-07-04 16:01:38 PDT
Given this has been broken for over four years, I don't see a good reason to bring the fix forward an extra 6 or 12 weeks.

Note You need to log in before you can comment on or make changes to this bug.