HtmlToPdfConverter Unhandled exception. Syncfusion.Pdf.PdfException: Blink files are missing

Hello.
I have a console app that after detecting the OS, seects the binaryes and excecutes an html to pdf conversion.
I defined the OperatingSystem class to detect the current Os.

    public static class OperatingSystem
    {
        public static bool IsWindows() =>
            RuntimeInformation.IsOSPlatform(OSPlatform.Windows);

        public static bool IsMacOS() =>
            RuntimeInformation.IsOSPlatform(OSPlatform.OSX);

        public static bool IsLinux() =>
            RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
    }

and then I use it on my functions to detect the binaryes.
For Qt:
            if (OperatingSystem.IsWindows())
                settings.WebKitPath = @"./QtBinariesWindows/";
            if (OperatingSystem.IsLinux())
                settings.WebKitPath = @"./QtBinariesLinux/";

and for Blink:
            if (OperatingSystem.IsWindows())
                blinkConverterSettings.BlinkPath = @"./BlinkBinariesWindows/";
            if (OperatingSystem.IsLinux())
                blinkConverterSettings.BlinkPath = @"./BlinkBinariesLinux/";

When I run the app on windows, I have no problem, but when I run the app on linux it throws the following 
Unhandled exception. Syncfusion.Pdf.PdfException: WebKit assemblies are missing in the WebKitPath :/home/USERNAME/dev/Release/QtBinariesLinux/
or
Unhandled exception. Syncfusion.Pdf.PdfException: Blink files are missing at /home/USERNAME/dev/Release/BlinkBinariesLinux/

I got te web kits from 
C:\Users\USERNAME\.nuget\packages\syncfusion.htmltopdfconverter.qtwebkit.net.core\18.3.0.35\lib\QtBinariesLinux
C:\Users\USERNAME\.nuget\packages\syncfusion.htmltopdfconverter.qtwebkit.net.core\18.3.0.35\lib\QtBinariesWindows
C:\Users\USERNAME\.nuget\packages\syncfusion.htmltopdfconverter.blink.net.core.linux\18.3.0.35\lib\BlinkBinariesLinux
C:\Users\USERNAME\.nuget\packages\syncfusion.htmltopdfconverter.blink.net.core.windows\18.3.0.35\lib\BlinkBinariesWindows

I copyed them to the app's folder and made visual studio to always copy them.
what could it be causing this issue?

Additional Info:
the linux OS is  CentOS Linux 7

3 Replies 1 reply marked as answer

GK Gowthamraj Kumar Syncfusion Team October 30, 2020 02:02 PM UTC

Hi Jose, 

Thank you for using Syncfusion products. 

Queries 
Response 
When I run the app on windows, I have no problem, but when I run the app on linux it throws the following  
Unhandled exception. Syncfusion.Pdf.PdfException: WebKit assemblies are missing in the WebKitPath :/home/USERNAME/dev/Release/QtBinariesLinux/ 
or 
WebKit assemblies missing exception may occur, if the QtBinaries folder is not present in the provided WebKitPath. So, please make sure that, you have provided proper WebKitPath and the provided WebKitPath should have all the QtBinaries assemblies. You can copy the QtBinaries folder from HTML converter installed location to your project folder. Then you can get the folder path and set it to the WebKitPath property of WebKitConverterSettings.   

Please refer to this below HTML converter installer location for QtBinaries folder,  
Location: $system drive:\Program Files (x86)\Syncfusion\HTMLConverter \{Version}\QtBinaries  
  
Refer below links for prerequisites and troubleshooting WebKit HTML converter,   

Unhandled exception. Syncfusion.Pdf.PdfException: Blink files are missing at /home/USERNAME/dev/Release/BlinkBinariesLinux/ 
Blink files are missing exception may occur, if the BlinkBinariesLinux folder is not present in the provided BlinkPath. So, please make sure that, you have provided proper BlinkPath and the provided BlinkPath should have all the BlinkBinaries assemblies. You can copy the BlinkBinaries folder from HTML converter installed location to your project folder. Then you can get the folder path and set it to the BlinkPath property of BlinkConverterSettings.   

Please refer to this below HTML converter installer location for BlinkBinaries folder,  
Location : $SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries 

Refer below links for prerequisites and troubleshooting Blink HTML converter,   

Note: The QtBinaires and BlinkBinaries also available in NuGet package installed location if you are using Blink/WebKit HTML converter from NuGet packages. 


Please let us know if you need any further assistance with this.  

Regards, 
Gowthamraj K 


Marked as answer

RS Remmy Sobanjo replied to Gowthamraj Kumar November 17, 2023 10:01 AM UTC

I have the same error.

Blink files are missing at C:\username\foldername\XXX\XXX\bin\runtimes\win-x64\native

I have tried followig the instructions and placed the "BlinkBinariesWindows" in the Bin folder, I tried looking for "BlinkConverterSettings". I can't find it at all, can you please help?




KS Karmegam Seerangan Syncfusion Team November 20, 2023 02:28 PM UTC

We have checked the reported issue on our end. The issue may occur if the 'runtimes' folder is not copied correctly from the NuGet folder. To resolve this issue by manually setting the Blink Path in BlinkConverterSettings class. You can find the Blink binaries in the below structure in NuGet package.

syncfusion.htmltopdfconverter.net.windows.23.1.43\runtimes\win-x64\native


While converting Html to PDF, automatically copied the blink binaries in runtime folder and default binaries path reference is added in package itself. you can find the binaries in your project location bin\Debug\netcoreapp3.1\runtimes\win-x64\native. However, we have attached the sample for your reference.


Sample :  https://www.syncfusion.com/downloads/support/directtrac/general/ze/HTML_to_PDF_Net_Core_3.1-493307779


Kindly try the solution and let us know the result.


Loader.
Up arrow icon