Monday, January 4, 2010

Convert HTML to PDF

In linux it is very easy. Install CUPS-PDF and print to PDF. I explained it in another post previously. But sadly, if I follow this printing procedure the hyperlinks are not preserved in the resulting pdf file. So the alternatively we can use htmldoc to convert HTML to PDF. The command is -

$ htmldoc lec.html --webpage -t pdf14 -f lec.pdf

--webpage : turns on the webpage mode.
-t : sets the output pdf type.
-f : output filename.

That's it. If you do not have htmldoc pre-install then install it with sudp apt-get install htmldoc in Ubuntu.

No comments:

OK GOOGLE on Samsung Galaxy S7 doesn’t work

To make Ok Google detection work on Galaxy S7 (Galaxy series phones) we need to perform a couple of steps. 1. As long as Samsung S vo...