I have ASP .Net framework 4.7 web forms application.
I am using EvoHtmlToPdf v8.0 to convert ASP .net form to pdf. I am using default generic version of EvoHtmlToPdf v8.0 which shall be working both in 32-bit and 64-bit environments.
I am getting below error at code htmlToPdfConverter.ConvertUrl(url);
I get this error only when running project in "Local IIS" but experience no error when I set it to "IIS Express" in project settings in Visual Studio
Could not start conversion. WinApi error code 5. Check 'evointernal.dat' file has execute permissions and that it exists near evohtmltopdf.dll or set the EvoInternalFileName property with the full path of the evointernal.dat file
Here is complete code of my asp .net c sharp code
public static byte[] convertToPdf(string url)
{
// Create a HTML to PDF converter object with default settings
HtmlToPdfConverter htmlToPdfConverter = new HtmlToPdfConverter();
// Set license key received after purchase to use the converter in licensed mode
// Leave it not set to use the converter in demo mode
htmlToPdfConverter.LicenseKey = Constants.SystemSettings.PDF_LicenseKey;
// Set HTML Viewer width in pixels which is the equivalent in converter of the browser window width
htmlToPdfConverter.HtmlViewerWidth = Utility.getConfirmInteger(Constants.SystemSettings.PDF_HtmlViewerWidth)==0? HtmlViewerWidthDefault : Utility.getConfirmInteger(Constants.SystemSettings.PDF_HtmlViewerWidth);
// Set HTML viewer height in pixels to convert the top part of a HTML page
// Leave it not set to convert the entire HTML
if (Utility.getConfirmInteger(Constants.SystemSettings.PDF_HtmlViewerHeight) != 0)
{
htmlToPdfConverter.HtmlViewerHeight = Utility.getConfirmInteger(Constants.SystemSettings.PDF_HtmlViewerHeight);
}
// Set PDF page size which can be a predefined size like A4 or a custom size in points
// Leave it not set to have a default A4 PDF page
htmlToPdfConverter.PdfDocumentOptions.PdfPageSize = SelectedPdfPageSize();
// Set PDF page orientation to Portrait or Landscape
// Leave it not set to have a default Portrait orientation for PDF page
htmlToPdfConverter.PdfDocumentOptions.PdfPageOrientation = SelectedPdfPageOrientation();
// Set an adddional delay in seconds to wait for JavaScript or AJAX calls after page load completed
// Set this property to 0 if you don't need to wait for such asynchcronous operations to finish
htmlToPdfConverter.ConversionDelay = Utility.getConfirmInteger(Constants.SystemSettings.PDF_ConversionDelay);
return htmlToPdfConverter.ConvertUrl(url);
}