I am using html to PDF conversion using syncfusion webkit rendering on MAC os. It works fine until I notarize my app. When I tried to notarize my app, I got errors like QtMacBinaries are not signed
.
I signed all QtMacBinaries using my developer id certificates. Now notarization got success but html to PDF conversion is failing.
I am getting below error:
Syncfusion.Pdf.PdfException: dyld: Library not loaded: @rpath/libQt5Core.5.dylib
Referenced from: /Users/sangapankaj/Projects/TestConverter/bin/Release/TestConverter.app/Contents/Resources/QtBinariesMac/Syncfusion.WebKitWrapper
Reason: image not found
,'Html conversion failed
Syncfusion version: Syncfusion.HtmlToPdfConverter.QtWebKit.Net.Core.18.2.0.44,
OS: MAC 10.14,
Compiler: Visual Studio 2019,
Language: dot net
I am not sure what I am missing? Main culprit is Syncfusion.WebkitWrapper binary. It is not able to load QT libraries if I have signed it with my developer id certificates. If I use it without signing, it works fine.
Code
HtmlToPdfConverter htmlToPdfConverter;
WebKitConverterSettings webKitConverterSettings;
PdfDocument pdfDocument = null;
try
{
htmlToPdfConverter = new HtmlToPdfConverter();
webKitConverterSettings = new WebKitConverterSettings();
webKitConverterSettings.WebKitPath = "/Applications/MacUncle OLM Converter.app/Contents/Resources /QtBinariesMac";
htmlToPdfConverter.ConverterSettings = webKitConverterSettings;
string strTempPath = Path.GetTempPath();
pdfDocument = htmlToPdfConverter.Convert(bdy, strTempPath);
}
catch(Exception e)
{
string exp = string.Format("{0} exception caught", e);
Log.WriteErrorLog(exp);
}