Troubleshooting and FAQ

23 Dec 20225 minutes to read

Exception BlinkBinaries are missing
Reason When BlinkBinaries are not available in the BlinkPath mentioned location.
Solution Set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

(Or)

Place the BlinkBinaries folder in bin folder of the project.

The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)

The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
Mapping BlinkBinaries in Web Application
  • C#
  • //To refer BlinkBinaries from project location
    settings.BlinkPath = Server.MapPath("BlinkBinaries");
    
    //or
    
    // To refer BlinkBinaries from bin folder of the Project
    settings.BlinkPath = Server.MapPath("~/bin/BlinkBinaries");
    Exception BlinkBinaries access is denied in server.
    Reason If the BlinkBinaries folder does not have elevated permission for the respective user, then the Blink HTML converter may throw this exception.
    Solution You can add read/write/execute permission to for the BlinkBinaries folder for the respective user group.
    Exception Blink rendering engine only supported from .NET Framework 4.5.
    Reason HTML conversion using blink is only supported from .NET framework 4.5 or above.
    Solution The application should target .NET Framework 4.5 or above to convert the HTML using the Blink rendering engine.
    Exception Failed to convert Webpage Exception
    Reason Missing or mismatch of Newtonsoft.Json package in the project.
    Solution For converting HTML to PDF in Blink, you need to refer to the Newtonsoft.Json assembly or NuGet package with current version is 13.0.2 in the application, otherwise conversion will get failed.
    Reason The exception may occur if the Newtonsoft.Json assembly or NuGet package with current version is 13.0.2.
    Solution The Newtonsoft.Json package version with current version is 13.0.2, then include the following assembly binding redirection in the app.config/web.config file.

  • HTML
  • <runtime>
        <assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
          <dependentAssembly>
            <assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
            <bindingRedirect oldVersion="0.0.0.0-8.0.0.0" newVersion="8.0.0.0" />
          </dependentAssembly>
        </assemblyBinding>
    </runtime>
    Reason If the temporary folder does not have elevated permission for the respective user, then the Blink HTML converter may throw this exception.
    Solution The Blink HTML converter has support for setting the temporary path. Using the TempPath property, you can set any folder path that has read/write/execute permission. Then, the converter uses this path for creating temporary files. Refer to the following code snippet to set temp folder.

  • C#
  • BlinkConverterSettings settings = new BlinkConverterSettings();
    settings.TempPath = "D://MyProject//bin";
    Reason The exception may occur in Windows 7/Windows server 2008 environment due to limitation of ClientWebSocket implementation.
    Solution To overcome the exception in Windows 7/Windows server 2008 environment, add the System.Buffers.4.5.0 NuGet package in the sample for conversion.
    Reason The exception may occur in Linux CentOS/Docker environment due to the chrome browser unable to launch from sandbox mode in CentOS.
    Solution To overcome the exception in Linux CentOS/Docker environment, provide the execute permission for chrome and chrome-wrapper file inside the BlinkBinaries folder.
    Refer to the following screenshot:
    Blink chrome file permission
    Blink chrome wrapper file permission
    Also, please add the below command line arguments in our converter setting,
  • C#
  • //Set command line arguments to run without sandbox.
    blinkConverterSettings.CommandLineArguments.Add("--no-sandbox");
    blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox");

    Reason Sometimes this exception occurs for only particular URL
    Solution Please contact Syncfusion support with input HTML, code snippet, and environment details (OS, culture settings, bit version etc.,).
    Issue Blink converter may create PDF with blank pages.
    Reason When the webpage (HTML) is not available or accessible.
    Solution Please check the internet connection and the HTML page is available in the mentioned location.

    Check the HTML file or URL is rendered properly in Chrome browser’s print preview.
    Issue Images or other contents in the HTML are missing in the resultant PDF document.
    Reason The issue may be due to the slow internet connection or due to the behavior that the conversion completed before the page is loaded completely.
    Solution To overcome this issue, add suitable delay for the conversion using the [AdditionalDelay](https://help.syncfusion.com/cr/file-formats/Syncfusion.HtmlConverter.BlinkConverterSettings.html#Syncfusion_HtmlConverter_BlinkConverterSettings_AdditionalDelay) property of the HTMLConverter.

  • C#
  • BlinkConverterSettings settings = new BlinkConverterSettings();
    settings.AdditionalDelay = 2000;
    Reason While converting HTML string to PDF, the resources may be missed due to the invalid Base URL.
    Solution Overcome this issue by passing the valid base URL (path of the resources) along with the HTML string.
    Issue Blink conversion failed in Azure app service (Windows). “The process was terminated due to an unhandled exception”
    Reason Blink rendering engine uses GDI calls for viewing and rendering the webpages. But Azure app service blocks GDI calls in Azure website environment. As azure website does not have the elevated permission and enough rights, so we could not launch the Chrome headless browser in Azure app service (Azure website and Azure function).
    Solution You can convert HTML to PDF using the Blink rendering engine in Azure cloud service (which has the elevated permission and rights to access the GDI calls). Refer to this link for more information.
    Issue Unable to convert unsecured https URL to PDF using Blink.
    Reason The issue is happen due to invalid SSL certificate errors in unsecured sites.
    Solution You can able to bypass the invalid SSL certificate errors using the command line arguments property of Blink converter settings.

  • C#
  • BlinkConverterSettings settings = new BlinkConverterSettings();
    settings.CommandLineArguments.Add("--ignore-certificate-errors");
    Issue Conversion failure in windows server 2012 R2.
    Reason The issue may happen due to windows server environment permission restriction.
    Solution We can resolve this permission related failure in the Blink rendering engine using below command line arguments in our converter settings.

  • C#
  • //Set command line arguments to run without sandbox.
    blinkConverterSettings.CommandLineArguments.Add("--no-sandbox");
    blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox");
    HTML conversion support in Azure
    Azure App Service (Linux) Yes
    Azure Functions (Linux) Yes
    Azure Cloud Service Yes
    Azure App Service with Linux docker Yes