Closed Bug 161179 Opened 22 years ago Closed 19 years ago

background image (no-repeat, repeat-x and repeat-y) size reduced when printing page (print preview is ok, scaling only happens in the repeat direction)

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla1.8.1

People

(Reporter: stefan.mayrhofer, Assigned: masayuki)

References

(Blocks 1 open bug, )

Details

(Keywords: fixed1.8.1, testcase)

Attachments

(6 files)

Mozilla Build: 2002080208

I printed a page on www.mozdev.org (works with main and sub pages). The printer
I used is a 'HP DeskJet 690C' controlled by an integrated W2k driver over network.

Bug: The "mozilla-comic-strip" image on the top of the print was too small -
about a third of the real size. 'Print Preview' did NOT show this bug!

I tried it more times (different page zooms) but the bug was 100% reproduceable
at me. Can anyone confirm this?

ciao, Stefan Mayrhofer!
the image is a background image, btw.
when printing to a file, I can't see the image at all with ggv. (just enabled
printing background images).

see bug 161179, bug 115327, bug 136929, bug 126398
OS: Windows 2000 → All
Is it normal that the image is shown in 'Print Preview' also with disabled
printing background images?
I think there are two bugs here, the reduce img bug and the BG img in PP bug,
please file a new bug for the BG img in PP
Attached file reduced testcase
Look like it has to do with background images via style
It works fine in PP but not when printing
Assignee: rods → dcone
Status: UNCONFIRMED → NEW
Ever confirmed: true
Target Milestone: --- → mozilla1.2alpha
*** Bug 166737 has been marked as a duplicate of this bug. ***
Assignee: dcone → printing
Keywords: testcase
QA Contact: sujay
Summary: Image size reduced when printing page → size of background image reduced when printing page
*** Bug 314862 has been marked as a duplicate of this bug. ***
*** Bug 237889 has been marked as a duplicate of this bug. ***
*** Bug 185058 has been marked as a duplicate of this bug. ***
*** Bug 318250 has been marked as a duplicate of this bug. ***
Summary: size of background image reduced when printing page → background image (no-repeat, repeat-x and repeat-y) size reduced when printing page (print preview is ok, scaling only happens in the repeat direction)
Target Milestone: mozilla1.2alpha → ---
The fix for bug 193403 (OS/2 only) may be useful if anyone wants to look into this.
Depends on: 193403
John and Christian, you guys seem to have a much better grasp on this issue than I do, could you confirm that my change of the summary is correct? A fuller testcase indicating specifically what works and what doesn't would also be useful, I'm trying to understand the issue and am having a hard time. Seems like bug 262175 is a duplicate but I'm not certain.
Attached file expanded testcase
bug 262175 looks like a duplicate - unfortunately original URL now 404.

The summary is better than my attempt in bug 237889.

This is a slightly expanded testcase - note first page may be affected by
bug 294836 if not using nightlies.
*** Bug 262175 has been marked as a duplicate of this bug. ***
So... this worksforme on Linux.  Is this a Windows-only bug?
Blocks: 308127
The fix for bug 193403 (which seems pretty similar to this bug) was OS/2 only, so this being Windows-only (bug in nsImageWin.cpp) would make sense.
vlad, is there a "land cairo" bug we can make this depend on?
Assignee: printing → win32
Component: Printing → GFX: Win32
OS: All → Windows XP
QA Contact: ian
It seems to me like the problem is that while most images are being rescaled to the printer's resolution, Mozilla is not rescaling the background thus appearing much smaller on the higher-DPI printer.

Discovered this bug on a site I was working on, definitely still happening.
Pav, this might be useful to test with your win32/cairo printing bits
We have some known image scaling bugs in the cairo printing code right now so this is hard to really test.

Does anyone have a PDF or something that shows the problem vs how it should be?
Looking at it in 1.5, I think I see at least some problems.  Not sure what causes them though.
PDF showing the problem
Attached patch Patch rv1.0Splinter Review
This is very simple bug :-)
We made a mistake for convertion pixels to twips.
We should use scaled p2t for printing.
Assignee: win32 → masayuki
Status: NEW → ASSIGNED
Attachment #210151 - Flags: superreview?(roc)
Attachment #210151 - Flags: review?(roc)
Attachment #210151 - Flags: branch-1.8.1?(roc)
OS: Windows XP → All
Hardware: PC → All
Target Milestone: --- → mozilla1.8.1
Component: GFX: Win32 → Layout
Attachment #210151 - Flags: superreview?(roc)
Attachment #210151 - Flags: superreview+
Attachment #210151 - Flags: review?(roc)
Attachment #210151 - Flags: review+
checked-in.
Status: ASSIGNED → RESOLVED
Closed: 19 years ago
Resolution: --- → FIXED
Flags: blocking1.8.1?
Comment on attachment 210151 [details] [diff] [review]
Patch rv1.0

Please request branch approval in a few weeks, when we've had time to detect regressions.
Attachment #210151 - Flags: branch-1.8.1?(roc)
Comment on attachment 210151 [details] [diff] [review]
Patch rv1.0

We don't have any regression reports by this. Let's go to 1.8 branch.
Attachment #210151 - Flags: approval-branch-1.8.1?(roc)
Attachment #210151 - Flags: approval-branch-1.8.1?(roc) → approval-branch-1.8.1+
checked-in to 1.8 branch.
Flags: blocking1.8.1?
Keywords: fixed1.8.1
does http://www.barix.com/ (Bug 308127) print better or worse with the patch?
*** Bug 325015 has been marked as a duplicate of this bug. ***
(In reply to comment #31)
> does http://www.barix.com/ (Bug 308127) print better or worse with the patch?

It prints a little better. I added a simplified testcase to Bug 308127.
*** Bug 342144 has been marked as a duplicate of this bug. ***
When is this bug scheduled to be fixed? I have version 1.5.0.4 and it's still happening. It has to do with the background no-repeat option when using CSS. It seems to be scaling the image depending on the printer resolution.

It is very easy to duplicate using 2 div:

<-- use any image at 72 dpi -->

<div id="test1" style="top:0; left:0; width: 500px; height: 425px;
	background-image:url(anyimage.jpg);
	background-repeat:no-repeat;
	background-position:center;"> 

</div>
	
<div id="test2" style="top:0; left:0; width: 500px; height:425px;
			background-image:url(anyimage.jpg);">
</div>

Print preview will look fine but it will not print fine.

The second image will print exactly like on the screen. The first will print very small.

Netscape 8 has exactly the same problem. Opera 9 and IE work fine.

I believe that printing is not very high in most people priority list buy I have a web page that shows the result of different choices and it need to be printed that it’s not working very well right now in the Mozilla browsers.

Thank you.
(In reply to comment #35)
> When is this bug scheduled to be fixed?

This bug is already fixed on the trunk (what will be Firefox 3) and the 1.8 branch for what will be Firefox 2. That means that the next Firefox release that includes the fix will be Firefox 2.
*** Bug 354731 has been marked as a duplicate of this bug. ***
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: