Why wkhtmtopdf.exe is generated in root directory in Nrco Html to pdf library?

465 views Asked by At

I am using Nreco Html to Pdf library in asp.net. It has used wkhtmltopdf.exe internally and it generates in bin folder. I have also notice that it creates wkhtmltopdf.exe outside bin folder in root directory.

Does anyone faces this issue?

1

There are 1 answers

0
Vitaliy Fedorchenko On BEST ANSWER

PdfGenerator extracts wkhtmltopdf binaries on first use to the same folder where NReco.PdfGenerator.dll is located. You can specify the location for these files explicitly by setting "PdfToolPath" property, for example:

var htmlToPdf = new HtmlToPdfConverter();
htmlToPdf.PdfToolPath = Server.MapPath("~/App_Data/PdfGenerator");