Open Bug 1046486 Opened 10 years ago Updated 2 years ago

rendering difference between screen and pdf

Categories

(Core :: General, defect)

29 Branch
x86_64
Windows 7
defect

Tracking

()

UNCONFIRMED

People

(Reporter: phunter, Unassigned)

Details

Attachments

(1 file)

User Agent: Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.1; WOW64; Trident/6.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E)

Steps to reproduce:

Using GetComputedStyle to get size of body element (see below for HTML). Pass width and height(converted to inches) to PaperWidth and PaperHeight attributes in PrinterSettings and print to PDF. Screen render and PDF are identical.

Append a period to HTML after the word "away", Repeat process


<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html lang="en">
<link href="fonts.css" rel="stylesheet">
<head><title>First Word Bold</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<style type="text/css">
 
.Body 
{
        width:10rem;
        line-height: 100%;
        border-width:0 px;
        margin: 0 0 0 0;
        padding: 0 0 0 0;
}
</style>
</head>
<body class="Body">
    There was movement at the station for the word had passed around that the colt from Old Regret had got away
     With CSS3 websites can finally use fonts other than the pre-selected "web-safe" fonts<br> 
</body>
</html>


Actual results:

With period after the word "away", the word CSS3 is moved to subsequent line in PDF file, but remains on the same line on screen


Expected results:

Expected that screen render and PDF version would have the same word wrapping
Font metrics may be different, no?
(In reply to Boris Zbarsky [:bz] (On vacation Aug 5-18) from comment #1)
> Font metrics may be different, no?

I think not, I changed the style to reference a specific font file
i.e. 
@font-face
{
font-family:MyTimes;
src: url(fonts/MyTimes.ttf);
}

and changed the "Body" style to reference that font
	font-family: MyTimes;
with same result (i.e. different rendering)
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: