How to Convert HTML to PDF

Overview

Aspose.Cells is a professional solution that allows you to generate PDF files from web pages and raw HTML code in your applications.

This article explains how to convert HTML to PDF. It covers the following topics.

HTML to PDF Conversion in .NET

How to convert HTML to PDF? With Aspose.Cells for .NET library, you can easily convert HTML to PDF programmatically with a few lines of code. Aspose.Cells for .NET is capable of building cross‑platform applications with the ability to generate, modify, convert, render and print all Excel files.

C# Convert HTML to PDF

The following C# code sample shows how to convert an HTML document to a PDF using Aspose.Cells for .NET.

  1. Create an instance of the HtmlLoadOptions class.
  2. Initialize a Workbook object.
  3. Save the output PDF document by calling the Workbook.Save() method.

Try to convert HTML to PDF online

Aspose.Cells for .NET offers a free online application “HTML to PDF”, where you can try the functionality and evaluate its quality.