Wkhtmltopdf: Internal links are not working when pdf is generated from multiple files

Created on 22 Aug 2014  路  3Comments  路  Source: wkhtmltopdf/wkhtmltopdf

Example:
wkhtmltopdf "page1.htm" "page2.htm" mybook.pdf
There is link from page1 to page2, Is there any way to get this work in mybook.pdf.

Note: Internal links are working perfectly when the links and sections are within each pages.

Invalid

Most helpful comment

What about when I want to have different headers for different sections AND internal links.

If an anchor name doesn't appear in the the html file it is linked from I notice wkhtmltopdf disables the link. however i _do_ have the anchor name in another html file.

All 3 comments

No, you have to merge the two documents into one file to get this work.

What about when I want to have different headers for different sections AND internal links.

If an anchor name doesn't appear in the the html file it is linked from I notice wkhtmltopdf disables the link. however i _do_ have the anchor name in another html file.

I don't get why this issue has been marked as Invalid. I have a use case where I can not merge the htmls because one is an Abstract before the TOC and the other is the Main content. There are links from the Abstract to the Main content that are disabled by wkhtmltopdf.

There is a possible solution and/or workaround for this problem.
Thanks in advance

Was this page helpful?
0 / 5 - 0 ratings