I was searching for a solution for this and came across an answer  at askubuntu which mentioned wkhtmltopdf! . It preserves the urls in the exported pdf!
Below explains how to get it installed. The steps are taken from the mentioned askubuntu answer.
Ubuntu repos contain the wkhtmltopdf package, but it doesn't provide the hyperlink-preserving-functionality we need. Nevertheless, we need to install it to get the required dependencies.
Then, we can get the wkhtmltopdf static binary from , extract it and put it in the /usr/bin directory.
sudo apt-get install wkhtmltopdf
Now we can convert a web page to pdf preserving the hyperlinks!
sudo mv wkhtmltopdf-i386 /usr/bin/wkhtmltopdf-static
wkhtmltopdf-static http://en.wikipedia.org/ wikipedia.pdf