0

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);
 }

Gryu
  • 1,692
  • 2
  • 10
  • 24

1 Answers1

0

We have checked the reported issue in our end, but we did not face this error in Mac with our WebKit converter. We internally make use of the QtWebKit rendering engine for converting HTML to PDF We have to provide the WebKitPath as folder location of QtBinariesMac path in your machine.

We have analyzed about the reported issue, we suspect the issue occurs due to the signed binaries not loaded properly in your application. After the notarization, If the binaries are compressed in any format (.pkg), please extract it and try the conversion. However, please make sure that you are running the latest XCode version where the conversion take place. Please try the below suggestions in your end and let us know the result.

https://developer.apple.com/forums/thread/124810

https://developer.apple.com/forums/thread/128435

https://github.com/Alamofire/Alamofire/issues/3051#issuecomment-580003683

Note : I work for Syncfusion.

Regards,

Gowthamraj