WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
155789
Printed PDF renders incorrect font sizes
https://bugs.webkit.org/show_bug.cgi?id=155789
Summary
Printed PDF renders incorrect font sizes
Joe
Reported
2016-03-23 05:07:20 PDT
Created
attachment 274745
[details]
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.
Attachments
Sample HTML file for testing, with font sizes set in pt. Also includes output .pdf files from different browsers
(88.61 KB, application/zip)
2016-03-23 05:07 PDT
,
Joe
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug