Hello,
I want to convert HTML strings to PDF within an Azure Function V3 and getting following errors:
Syncfusion.Pdf.PdfException: Html conversion failed
at Syncfusion.HtmlConverter.HtmlConverter.CheckConversionDone(String tempFilePath)
at Syncfusion.HtmlConverter.HtmlConverter.ConvertHtmlToPdf(String url, Int32 width, Int32 height, String tempFile)
at Syncfusion.HtmlConverter.HtmlToPdfConverter.Convert(String url)
On my machine everything is working and im able to create PDF's for my HTML strings, now i wanted to publish the Function to Azure and this error occurs.
I tried following things which i found here: https://www.syncfusion.com/forums/148308/syncfusion-pdf-pdfexception-html-conversion-failed
- Function Plattform settings to 64 Bit.
- Update my AppService Plan to B1 instead of consumption.
- Remove/uncheck the "Run from package file" Setting while deploying.
Nothing is working, the exception stays.
I found this tutorial within the forums entry: https://www.syncfusion.com/kb/10301/how-to-convert-html-to-pdf-in-azure-functions-2-0
Copied the code into a new Azure Function V3 Starter Package with updated Nugets and also getting the same exception ("Html conversion failed").
Then I downloaded the project from the tutorial (HTMLToPDFV20225383934) and just published it in the same way as its written in the tutorial.
Finally it works :)
My problem now, the AzureFunctionVersion V2 is deprecated.
So i tried to update the Nuget Packages from the HTMLToPDFV20225383934 Project, published it (also with the AzureFunctionVersion 2) and it throws again the "Html conversion failed" exception.
So my question is, is it possible to convert HTML's to PDF's inside Azure Functions V3?
I think the solution with the deprecated V2 Function isnt useful.
Or did i just missed something in the tutorial/torum entries where this is explained?
Please help me, i hope my steps are enough to reproduce this problem.
If you need any further informations please let me know.
Thanks,
BR.