<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&#64;lists.webkit.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>rc&#64;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&amp;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 &quot;Quartz PDFContext&quot; 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
&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot; &quot;<a href="http://www.w3.org/TR/html4/loose.dtd">http://www.w3.org/TR/html4/loose.dtd</a>&quot;&gt;
&lt;HTML&gt;
&lt;HEAD&gt;
 &lt;META http-equiv=&quot;content-type&quot; content=&quot;text/html; charset=ISO-8859-1&quot;&gt;
&lt;/HEAD&gt;
&lt;BODY&gt;
&lt;DIV style=&quot;border-top:0.25pt solid #f00; border-left:0.5pt solid #00f; border-bottom:0.75pt solid #800; border-right:1pt solid #0f0&quot;&gt;feine Linie: oben 1/4, links 1/2, unten 3/4, rechts 1 pt&lt;/DIV&gt;
&lt;/BODY&gt;
&lt;/HTML&gt;

SVG-Code
&lt;?php
header('Content-Type: image/svg+xml');
echo '&lt;?xml version=&quot;1.0&quot;?&gt;
&lt;!DOCTYPE svg PUBLIC &quot;-//W3C//DTD SVG 1.1//EN&quot; &quot;<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>&quot;&gt;
&lt;svg version=&quot;1.1&quot; xmlns=&quot;<a href="http://www.w3.org/2000/svg">http://www.w3.org/2000/svg</a>&quot; xmlns:xlink=&quot;<a href="http://www.w3.org/1999/xlink">http://www.w3.org/1999/xlink</a>&quot; width=&quot;60cm&quot; height=&quot;80cm&quot; onload=&quot;getSVGDoc(evt)&quot;&gt;
 &lt;title&gt;Ruedis SVG-Test&lt;/title&gt;
 &lt;desc&gt;SVG-Manipulation mit JavaScript&lt;/desc&gt;
 &lt;g id=&quot;querl2&quot; transform=&quot;translate(0.5 0.5) rotate(0)&quot;&gt;
  &lt;line x1=&quot;3&quot;   y1=&quot;3&quot;  x2=&quot;436&quot; y2=&quot;3&quot;  style=&quot;fill:none;stroke:red;stroke-width:0.25;&quot; /&gt;
  &lt;line x1=&quot;3&quot;   y1=&quot;3&quot;  x2=&quot;3&quot;   y2=&quot;31&quot; style=&quot;fill:none;stroke:blue;stroke-width:0.5;&quot; /&gt;
  &lt;line x1=&quot;3&quot;   y1=&quot;31&quot; x2=&quot;436&quot; y2=&quot;31&quot; style=&quot;fill:none;stroke:#800000;stroke-width:0.75;&quot; /&gt;
  &lt;line x1=&quot;436&quot; y1=&quot;3&quot;  x2=&quot;436&quot; y2=&quot;31&quot; style=&quot;fill:none;stroke:green;stroke-width:1;&quot; /&gt;
  &lt;text x=&quot;0px&quot; y=&quot;0px&quot; text-anchor=&quot;middle&quot; transform=&quot;translate(220 20)&quot; style=&quot;fill:rgb(0,0,0);font-size:12;font-family:Times&quot;&gt;feine Linie: oben 1/4, links 1/2, unten 3/4, rechts 1 pt&lt;/text&gt;
 &lt;/g&gt;
&lt;/svg&gt;';
?&gt;</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>