<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 - Wrong line width when printed to PDF"
href="https://bugs.webkit.org/show_bug.cgi?id=160644">160644</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Wrong line width when printed to PDF
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr>
<tr>
<th>Product</th>
<td>WebKit
</td>
</tr>
<tr>
<th>Version</th>
<td>Safari 9
</td>
</tr>
<tr>
<th>Hardware</th>
<td>Unspecified
</td>
</tr>
<tr>
<th>OS</th>
<td>OS X 10.11
</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>rc@opelgt.org
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=285526" name="attach_285526" title="all three examples">attachment 285526</a> <a href="attachment.cgi?id=285526&action=edit" title="all three examples">[details]</a></span>
all three examples
Line widths are not printed correctly to PDF. I have thought that is a problem of Apples "Quartz PDFContext" but printed with Word, fine lines are printed exactly.
HTML lines in Safari are not, whereas SVG lines are printed correctly. So maybe its a Safari/Webkit problem.
Behaviour: lines thinner than 1px are not printed, with 1px they are printed with a width of 2px, not very nice when 2px is the result of a wanted hairline!
I attached a Word, HTML and SVG PDF-example.
This problem persists for years even in OS 10.11.6.
HTML-Code
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "<a href="http://www.w3.org/TR/html4/loose.dtd">http://www.w3.org/TR/html4/loose.dtd</a>">
<HTML>
<HEAD>
<META http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</HEAD>
<BODY>
<DIV style="border-top:0.25pt solid #f00; border-left:0.5pt solid #00f; border-bottom:0.75pt solid #800; border-right:1pt solid #0f0">feine Linie: oben 1/4, links 1/2, unten 3/4, rechts 1 pt</DIV>
</BODY>
</HTML>
SVG-Code
<?php
header('Content-Type: image/svg+xml');
echo '<?xml version="1.0"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "<a href="http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd</a>">
<svg version="1.1" xmlns="<a href="http://www.w3.org/2000/svg">http://www.w3.org/2000/svg</a>" xmlns:xlink="<a href="http://www.w3.org/1999/xlink">http://www.w3.org/1999/xlink</a>" width="60cm" height="80cm" onload="getSVGDoc(evt)">
<title>Ruedis SVG-Test</title>
<desc>SVG-Manipulation mit JavaScript</desc>
<g id="querl2" transform="translate(0.5 0.5) rotate(0)">
<line x1="3" y1="3" x2="436" y2="3" style="fill:none;stroke:red;stroke-width:0.25;" />
<line x1="3" y1="3" x2="3" y2="31" style="fill:none;stroke:blue;stroke-width:0.5;" />
<line x1="3" y1="31" x2="436" y2="31" style="fill:none;stroke:#800000;stroke-width:0.75;" />
<line x1="436" y1="3" x2="436" y2="31" style="fill:none;stroke:green;stroke-width:1;" />
<text x="0px" y="0px" text-anchor="middle" transform="translate(220 20)" style="fill:rgb(0,0,0);font-size:12;font-family:Times">feine Linie: oben 1/4, links 1/2, unten 3/4, rechts 1 pt</text>
</g>
</svg>';
?></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>