HTML to PDF Creator

No downloads or installation required!

Convert HTML to PDF using our free online app or learn how it works with our embedded iText 7 Sandbox (including the pdfHTML add-on).


Use the free online HTML Converter app

You can create your own HTML using the editor, use the provided HTML, or upload your own HTML as a zip archive.

Click Convert HTML to convert the file, and then download the resulting PDF. 

Or play in the iText 7 Sandbox

In this Sandbox you can see how the the HTML conversion code works in iText 7, and experiment with changing the code yourself.

Click Upload File and make sure the file name of the HTML you upload matches the name you specify in private static final String ORIG. Then click Execute to run your code. To remove an uploaded file, click the x displayed next to the file name.

You can click the switch at the top of the Sandbox to change between the embedded Java and C# compiler.

NOTE: HTML files with local references will cause errors to be displayed, since the locations referenced will not be available on the server.

import com.itextpdf.html2pdf.HtmlConverter; import java.io.File; import java.io.FileInputStream; import java.io.FileOutputStream; import java.io.IOException; public class HtmlToPDF { private static final String ORIG = "/uploads/input.html"; private static final String OUTPUT_FOLDER = "/myfiles/"; public static void main(String[] args) throws IOException { File htmlSource = new File(ORIG); File pdfDest = new File(OUTPUT_FOLDER + "output.pdf"); HtmlConverter.convertToPdf(new FileInputStream(htmlSource), new FileOutputStream(pdfDest)); } }
using System.IO; using iText.Html2pdf; namespace WebsiteDemoPdfHtml { class Program { private static string ORIG = "/uploads/input.html"; private static string OUTPUT_FOLDER = "/myfiles/"; static void Main(string[] args) { string pdfDest = OUTPUT_FOLDER + "output.pdf"; HtmlConverter.ConvertToPdf(new FileStream(ORIG, FileMode.Open), new FileStream(pdfDest, FileMode.Create)); } } }
Disclaimer:

iText does not analyze the content of your uploaded or processed files. Users bear sole responsibility for the usage and content of their own files. All uploaded and processed files are deleted from our servers after users leave the page, or automatically after a period of 3 hours.



Contact

Still have questions? 

We're happy to answer your questions. Reach out to us and we'll get back to you shortly.

Contact us
Stay updated

Join 11,000+ subscribers and become an iText PDF expert by staying up to date with our new products, updates, tips, technical solutions and happenings.

Subscribe Now