Convert HTML to PDF

ajaym259GeneralLeave a Comment

How to Convert the HTML to PDF

Here is a very simple method to convert any html to PDF and send the file to an email as attachment. This is a java utility. The code work

  1. create a folder on your system.
  2. open the code and give the folder path where the source file will be stored. e.g.



3) Setup the program

4) Copy the html file in input folder

5) Run the API by giving email address where you need the pdf to be delivered

6) After successful run the email will be delivered and source and output files will be deleted from system.

The Output PDF sample is

The complete code is in zip file here.

Leave a Reply

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