Itextsharp html to pdf with css styles c# example

In this tutorial, we will see Itextsharp html to pdf with css styles c# example. Here is the step by step tutorial to achieve the HTML to pdf with the help of itextsharp. Before creating the HTML to pdf we need to know some point.

What is itextsharp in c#

itextsharp is a library which can be mainly used for creating the pdf reports. If you have web page this library will help you to convert this HTML page into pdf format. Later on, it depends on you how you will use the report, after converting you can download or send it to in mail attachment.

Before using this library we need to include some namespaces, as we know that namespace is the collection of classes so if you want to use the itextsharp library classes you have to include namespaces.

$ads=

Step to achieving HTML to pdf using itextsharp

1. Install itextsharp by --> Tool > Nuget Pakage Manager > Pakage Manager Console

2. After clicking on the Package Manager Console, you will see a package manager console window to run the command. Copy the below command and paste it and hit enter button.

Install-Package iTextSharp -Version 5.5.13.2