I have in my webpage, several anchors (i.e. <a name="my-magical-anchor"></a>
) scattered along the page. I additionally have several links on my page which point to these anchors (i.e. <a href="#my-magical-anchor">Go to the Magical Anchor</a>
). For when the page is printed, I was wondering if it would be possible to modify the text of the link, using CSS or JavaScript, to read something like Go to the Magical Anchor (page 12)
to indicate the page number the reader should flip to in the printed document.
I would like to, if possible, not have to manually assign page breaks, but instead have my content flow across the pages and then update the link text before printing.
Thanks.