I am generating pdf using the following method with NRECO. but while i am generating, I am getting the issue "Cannot generate PDF: The filename or extension is too long".
I gave permission as everyone for the path where I am saving. My sample path is "D:/PdfSample"
HtmlToPdf.GeneratePdfFromFiles(new[] {
new WkHtmlInput(coverpage),
new WkHtmlInput(htmlContent)
{
PageHeaderHtml = header
}
}, null, path);
GeneratePdfFromFiles
method expects that inputs are local files (or URLs) and the path (or URL) should be passed inWkHtmlInput
constructor. In your case, it seems you're trying to provide here HTML content itself.