Convert HTML to PDF in C# | Generate PDF in ASP.Net C# | How to generate PDF in ASP.Net using C#

preview_player
Показать описание
How to Convert HTML to PDF in ASP.Net using C#. In this tutorial I am going to show how can easily generate a PDF document from HTML using the itext7 library.

#htmltopdf
#CodeSample

In this tutorial I have used the following tools
1. Visual Studio 2017 Community Edition
3. JQuery CDN
4. HTML Minifier
5. itext7 HTML to pdf NuGet library

Download Source Code
Рекомендации по теме
Комментарии
Автор

Excelente, gracias por el aporte. Me sirvió para aplicarlo en un Windows Form.

alpem
Автор

Thank you very much for this well explained tutorial 🤗

tess...
Автор

Well explained can we do it without using button we can directly pass the url and we can print all.
We want yo print thousand of ssox page of students or emp detail

sohanyadav
Автор

Thank you very much for this nice video. I understood better the logic of itext 7.

alikemalkulful
Автор

Thank u very much for ur explanation.
How can store the PDF in custom URL ?
like currently it is saving in local server and i want to save in a specific folder of hosting site.
Can we do that?
Thanks in advance.

phaninderkumar
Автор

this tutorial helpful for getting the images from url...??

kashinathbiradar
Автор

i have a html source code with lot of images and 5 to 6 pages of sheets but all the images have url links...please give me the solutions for that..

kashinathbiradar
Автор

I want to download HTML file as a PDF in MVC c# without view the html file. if you know about it so share with me thank you

gadgetcrunchie
Автор

Can you show how to generate pdf from sql table. Thanks for this video

swapnarenukunta
Автор

public void CreatePDFFromDatabase(string url, string html, string destination)
{
ConverterProperties cp = new ConverterProperties();
cp.SetBaseUri(url);
HtmlConverter.ConvertToPdf(html, new FileStream(destination, FileMode.Create), cp);
} The problem is, that the text in Hebrew (including what comes from the DB) is not decoded into the PDF. How to decipher a language that is not English? (Hebrew for example)

shneorBachar
Автор

What happen with the pdf report if the html template had more than one sheet? or if the table have a lot of items and needs more than one sheet?

marcovazquez
Автор

I am sure itext7 is not free for commercial projects we have to take licensing. Please share your thoughts

askshrm
Автор

Can you possible getting image from url

Bilalkhan-miiv
Автор

Is it possible to generate from database

softdev