Print Preview stretches or does anti aliasing on pictures for no reason




10 years ago
10 months ago


(Reporter: mariusads, Unassigned)


1.9.0 Branch
Windows Server 2003

Firefox Tracking Flags

(Not tracked)



(4 attachments)



10 years ago
User-Agent:       Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv: Gecko/2009021910 Firefox/3.0.7 (.NET CLR 3.5.30729)
Build Identifier: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv: Gecko/2009021910 Firefox/3.0.7 (.NET CLR 3.5.30729)

The Print preview window doesn't seem to calculate the dimensions of the page correctly and processes the pictures in a page with no reason, causing them to get blurred in the window. When printing, they actually look OK.

See attached "". 

In all four html files, when using Print preview the "@" in (which is actually the gif "at.gif") gets blurred. 

On test3.html, the second picture also gets blurred, probably because it takes in consideration the margins defined by the default CSS rules for paragraphs (as in test4.html where margins are disabled by CSS rule the second picture no longer gets blurred).

I'm using 1920x1200 resolution, scale is 100% so I don't believe it could be something related to "Shrink to fit" or "Scale to page" or something of that sort.

Reproducible: Always

Steps to Reproduce:
1. Open any of the html files in the zip
2. Use Print preview and notice the image(s) getting blurred
Actual Results:  
Images are blurred/distorted

Expected Results:  
They shouldn't be.

Comment 1

10 years ago
Created attachment 366262 [details]
test case
Does this still happen in firefox 3.6.6 or later? test a new profile.
Component: General → Print Preview
Product: Firefox → Core
QA Contact: general → printing
Version: unspecified → 1.9.0 Branch

Comment 3

9 years ago
Yes, the gif image depicting the "@" character is still blurred in the Print preview window, no matter what is selected, 100% zoom or Shrink to fit. 
The larger image does not seem to be blurred.

Actual printing both to PDF and actual laser printer is correct.

Also worth noting.. maybe related to Bug 378184, it still shows the exact same blurred rendering when using bitmaps fonts like FixedSys or Terminal, however when I changed the style of the last paragraph in the testcase attached to this bug, like this:

<p style="font-family:Fixedsys;font-size:18px;>My email is test at</p>

when printed to PDF the output for the paragraph is just garbled characters (seem random) and the @ picture is not visible.

When printed to regular laser printer, some letters are partially cut - see image I'm going to attach after this message.

Comment 4

9 years ago
Created attachment 456367 [details]
bad rendering of bitmap fonts (like Fixedsys)

bad rendering of bitmap fonts (like Fixedsys). I'm not sure, but I guess it happens if it's not the native font size for this bitmap font.
When printing to PDF, the text is just garbled but this may be an Adobe Acrobat bug as printing to paper produced this output.

Comment 5

5 years ago
Marius, printing has been upgraded in the past few years. can you still reproduce?
Flags: needinfo?(mariusads)

Comment 6

5 years ago

With the above test cases print preview now looks good, images are rendered correctly.

However... (with the mention that I didn't try with real printer, just with Adobe PDF printer)

Open test2.html from first attachment. Print preview looks good. Print to pdf looks good. 

Now edit the html and add the style=font-family:Fixedsys to the first paragraph. 
Page now shows OK on screen with the font Fixedsys and the inline gif showing the "@" character. 

Print preview also renders correctly, as you can see in the following attachment. 

Note that on bug 378184, where there are several paragraphs and wrapping of long sentences, there preview and printing is messed up, letters are squeezed together. 

The preview actually looks good here - maybe due to the fact it doesn't take the whole page width or stretch on several lines.

BUT the actual print is damaged - the @ graphic appears somewhere in the middle of a bunch of garbled caracters .. see the second attachment that's going to be uploaded in a moment. 

So I guess when this bitmap font is rendered in combination with another bitmap/graphic (the gif showing the "@" character) right next to it, the whole thing gets broken.
Flags: needinfo?(mariusads)

Comment 7

5 years ago
Created attachment 783336 [details]
print preview with fixedsys font

When adding font-family:Fixedsys to first paragraph in test2.html, the paragraph shows properly on Print Preview, unlike how it happens in bug 378184 where there are several longer (wrapping) paragraphs.

Comment 8

5 years ago
Created attachment 783337 [details]
how the pdf gets rendered

how the print is actually showing up. 
The garbled line is supposed to say "My email is" where @ is a small gif file.
This happens when setting font-family:Fixedsys to the paragraph. Does not happen when using normal fonts.

Comment 9

10 months ago
Doesn't appear to happen any more. (Tested on Windows 10.)

FWIW please open a new bug when the symptoms you want to report differ to those that the bug was originally opened for. Bugs that end up morphing from one issue to another can be a pain to work on fixing (devs end up reading through old comments that are no longer relevant, and it can be confusing exactly what issues remain).
Last Resolved: 10 months ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.