Forum How do I...?

Get a web based table of contents to transfer to PDF

lwg
So, I've had great success with prince I feel. Output of single pages is just how I want it. Output of multiple pages using a list ir urls in a file, also perfect. Page numbering, headers footers, all good.

The one missing piece is this.

The first URL contains a table of contents that uses relative links to link to all other pages.

I really want the output PDF to have this TOC. How can I get that to happen? If prince could be told to follow links in that page and reproduce in the pdf then I'd also get rid of the requirement to list the URLs in a file in one go.

I could do this using wget and a pipe I guess but that doesn't solve the pdf toc linking issues.

Any ideas?

Thanks
mikeday
You can pass multiple URLs to Prince and it will combine them into a single PDF file, converting relative links appropriately:
prince input1.html input2.html input3.html -o out.pdf