title: Print page numbers for table of contents using CSS in Chrome
body: <p>Is there a way to print target page numbers with hyperlinks which linked to various places within the same document?</p>
  
  <pre><code>&lt;h1&gt;Table of Contents&lt;/h1&gt;
  &lt;ul&gt;
      &lt;li&gt;&lt;a href="#introduction"&gt;Introduction&lt;/a&gt;&lt;/li&gt;
  &lt;/ul&gt;
  
  ...
  
  &lt;section id="introduction"&gt; &lt;!-- Appears, for example, on page 3 when printed --&gt;
      &lt;h1&gt;Introduction&lt;/h1&gt;
      ...
  &lt;/section&gt;
  </code></pre>
  
  <p>So that the output is like:</p>
  
  <pre><code>Table of Contents (page 0)
  
  Introduction.........................3
  
  
  ...
  
  
  Introduction (page 3)
  </code></pre>
  
  <p>I only need this to work with the Google Chrome browser when printing to PDF (on OS X).</p>
  
  <p>Is there some CSS or JavaScript trickery which would allow me to achieve this?</p>