Convert HTML to PDF keeping hyperlinks in it.

In this article, I will show you how to convert html to PDF and keep the hyperlinks in html file in converted PDF file. To do this, we need to download one software to your PC. It is VeryPDF HTML Converter v2.0.

  • Here is the free downloading link for you, https://www.verypdf.com/htmltools/htmltools.zip.
  • Unzip it and then it can be called from MS Dos Windows. Also if you use the sever version, you can call it from VC/VB/Delphi, ASP/PHP/.NET and other languages or scripts.
  • Check the usage in the readme.text file and then do the conversion according to the usage.
  • As we need to convert html to PDF, please follow this example.

htmltools.exe "https://www.verypdf.com" C:\out.pdf

  • Take VeryPDF official website for example. Now we can make it in the MS Dos Windows.

html to PDF example

  • Now let us check the converted effect.

converted PDF file and keeping hyperlinks

But now one problem you may asked that “HTML to PDF is a remarkable product. - it is the only one to preserve hyperlinks in my document. BUT, I just cannot get it to force page breaks to split up the original HTML document suitable for A4 printing. It prints the entire document in miniature on just one sheet no matter how I set it up. Can you advise please? Thanks

To solve the page break problem, you can set page height and width to adjust it. The parameters "-width" and "-height" set the paper size for HTML to PDF conversion. For example: htmltools.exe -nocenter -width 612 -height 792 -emfheight 792 "https://www.verypdf.com/pdfcamp/convert-html-to-pdf.html" "C:\out.pdf" . And the unit the height is point. You can convert from inch to point easily, for example, 8.5inch = 8.5x72 = 612pt 11inch = 11x72 = 792pt. By this way, you can convert a long html file to short PDF file and keeping its original hyperlinks.

BTW, there is another software on VeryPDF which can help you convert html to PDF. For your reference, I put its official website link here https://www.verypdf.com/pdfcamp/pdfcamp.htm. When you need, maybe you can have a check and compare them. Choose the best one for you.

If you have any question about this software or file format conversion, you are welcome to contact us by the ways supported on this website.

VN:F [1.9.20_1166]
Rating: 0.0/10 (0 votes cast)
VN:F [1.9.20_1166]
Rating: 0 (from 0 votes)

Related Posts

Leave a Reply

Your email address will not be published. Required fields are marked *


Verify Code   If you cannot see the CheckCode image,please refresh the page again!