PDA

View Full Version : [gnome] Is it possible to print a HTML document into PDF by conserving all links and anchors



dariyoosh
February 11th, 2013, 06:58 PM
Hello everybody,


I have a very big HTML file which I want to print/convert into a PDF file. While the browser (firefox) is open, I just go to file > print and then I chose the PDF option in order to print the content into a PDF file. This works pretty well and fast (less than 40 seconds for producing a big PDF file about 36 MB).

The only problem is that there are a lot of hypertext links (or rather to say anchors as it is a big single HTML document) which obviously facilitates considerably the navigation in the document. Well, the problem is that non of these links are conserved once the PDF file has been created.

After a lot of Googling I found a tool called wkhtmltopdf which apparently does the job as I expect by conserving the links. I installed it successfully, yet once I launched the program to create the PDF file in command line mode, it has been running (on the 4th step resolving links) for more than 2 hours and therefore I was wondering whether it would finish the job and even if it does, such delay even for big documents doesn't seem to be reasonable for future uses (I will have many big HTML documents to be exported into PDF in the close future)

Consequently, I would like to ask your opinion, do you know any practical way under linux to print a single HTML document into a PDF file by conserving at the same time all the links and anchors?

Thanks in advance,
Dariyoosh

Warren Hill
February 11th, 2013, 07:05 PM
take a look here

http://ubuntuforums.org/showthread.php?t=869681