Find a solution that converts local HTML files to PDF.

is required to contain images in HTML;
requires batch conversion, and each HTML generates a PDF;
semi-finished word that requires C-sharp language code.

Mar.01,2021

if you can directly transfer someone else's API, you can try this:
https://pdfcrowd.com/web-html.


learn about https://wkhtmltopdf.org/

teacher Zhang wrote an article: http://www.cnblogs.com/shanyo.

C-sharp version, I have used WkHtmlToXSharp and [WkHtmlToXDotNet] ( https://github.com/TimothyKho.
) the former is used by more people than the latter.
be careful not to use WkHtmlToXSharp scheme in IIS, there is a risk of memory leakage, just play casually in the desktop environment;
it doesn't matter if you call wkhtmltopdf.exe directly.


if it is implemented in c-sharp, You can refer to https://www.iditect.com/tutor. to convert local html into pdf


recommend Spire.Doc for .NET API to implement local HTML to PDF. There are free version and commercial version, the commercial version does not have any functional restrictions, you can try it for free. The following is the conversion code, which is very simple, just a few lines.

Document document = new Document();
document.LoadFromFile("InputHtmlFile.html", FileFormat.Html, XHTMLValidationType.None);
document.SaveToFile("HtmlFileToPDF.pdf", FileFormat.PDF);
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3046a-2bcf4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3046a-2bcf4.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?