<html>
<head>
<base href="https://bugs.webkit.org/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - Printed PDF renders incorrect font sizes"
href="https://bugs.webkit.org/show_bug.cgi?id=155789">155789</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Printed PDF renders incorrect font sizes
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>WebKit Nightly Build
</td>
</tr>
<tr>
<th>Hardware</th>
<td>All
</td>
</tr>
<tr>
<th>OS</th>
<td>All
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>Normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P2
</td>
</tr>
<tr>
<th>Component</th>
<td>Printing
</td>
</tr>
<tr>
<th>Assignee</th>
<td>webkit-unassigned@lists.webkit.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>joe@veamstudios.com
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=274745" name="attach_274745" title="Sample HTML file for testing, with font sizes set in pt. Also includes output .pdf files from different browsers">attachment 274745</a> <a href="attachment.cgi?id=274745&action=edit" title="Sample HTML file for testing, with font sizes set in pt. Also includes output .pdf files from different browsers">[details]</a></span>
Sample HTML file for testing, with font sizes set in pt. Also includes output .pdf files from different browsers
Overview: Printing from webkit renders font sizes incorrectly. This bug was first discovered on iOS, but I have since produced it on Mac Safari and Chrome.
Steps to Reproduce:
1. Use sample.html from attachments, or any HTML page that sets font sizes that can be accurately measured against.
2. Print .html page using print dialog, then save as a PDF.
3. Open saved .pdf file in Adobe Acrobat, then inspect PDF font sizes using the 'Edit' mode.
Actual Results:
Depending on what software used, font sizes are not the same as specified in the html code. For example, the attachment I provide from Safari has font sizes of 12.80pt, 10.40pt, 8.80pt, 16.80pt and 24.80pt - none of which are correct.
Expected Results:
Font sizes on PDF should match exactly with sizes set in HTML. The attachment I provide from Safari should have font sizes of 12pt, 10pt, 8pt, 16pt, and 23pt.
Build Date & Platform:
Currently reporting it using Mac Safari Version 9.0.1 (11601.2.7.2), Mac Chrome Version 49.0.2623.87 (64-bit), and iOS 9.x.x - but have experienced it over many versions.
Additional Builds and Platforms:
This bug does not occur on Mac Firefox 41.0.2. PDF's rendered from Firefox have correct font sizes.
Additional Information:
- This bug was first discovered when using UIPrintPageRenderer on iOS to create PDF files from .html input.
- I have performed additional tests using other font units (px, em, %), but the bug still occurs. The sample HTML file uses pt as a unit as this is easiest to measure in the outputted PDF.
- Using '-webkit-text-size-adjust: none;' as a possible workaround did not effect the outcome.
- Using '<meta name="viewport" content="initial-scale=1.0" />' as a possible workaround did not effect the outcome.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are the assignee for the bug.</li>
</ul>
</body>
</html>