I'm converting a group of HTML files to PDF in C#. Wkhtmltopdf did the job perfectly, but now I need to add a link to a location in another pdf and wkhtmltopdf doesn't seem to be able to do that.
Creating links to point to another location in the same document is easy:
<a href="#idOfDesiredPlace">Link</a>
Also, linking to another document works well:
<a href="b.pdf">Link</a>
However, I need to link to a specific location in a different document. The simple method with wkhtmltopdf fails here:
<a href="b.pdf#idOfDesiredLocation">This link doesn't work</a>
This is supported in PDF specification with Remote Go-To actions.
PDF Reference, p. 520:
How can this be achieved in C#?
I need the converter to support CSS 3, so I think the way to go would be to first convert the HTML to PDF with wkhtmltopdf and then use a library to edit the PDF to correct the links.
How to do this practically? Which library to use and how to use it?
UPDATE: I've created a feature request for wkhtmltopdf on GitHub. However, this question is still relevant.