Troubleshooting and FAQ
22 Apr 202417 minutes to read
Blink files are missing
Exception | Blink files are missing |
---|---|
Reason | The exception may occur if the 'runtimes' folder is not copied correctly from the NuGet folder. |
Solution |
Ensure that the runtimes folder is copied properly to bin folder of the application from NuGet package location.
Please refer to the below screenshot, (Or) You can set the runtimes folder path explicitly in BlinkPath property in BlinkConverterSettings class. Ex path: C:\HtmlConversion\HTMl-to-PDF\HTMl-to-PDF\bin\Debug\net7.0\runtimes\win-x64\native\
|
BlinkBinaries access is denied in server
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. |
Blink rendering engine only supported from .NET Framework 4.5
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. |
Failed to launch chromium: Running as root without –no-sandbox is not supported
Exception | Failed to launch chromium: Running as root without --no-sandbox is not supported | |
---|---|---|
Reason | The exception may occur in the Linux CentOS/Docker environment due to the Chrome browser unable to launch from sandbox mode in CentOS. | |
Solution | To overcome the exception in the Linux CentOS/Docker environment, provide the execute permission for chrome and chrome-wrapper files inside the BlinkBinaries folder.
Refer to the following screenshot: Also, please add the following command line arguments in our converter setting.
|
Failed to launch Base
Exception | Failed to launch Base |
---|---|
Reason | The exception may occur due to missing of required dependent packages. |
Solution | To overcome the exception, you can ensure the required dependency in docker file. |
Failed to launch chromium: Missing required dependent packages
Exception | Failed to launch chromium: Missing required dependent packages |
---|---|
Reason | The required dependencies for the Chromium are not installed on the system. |
Solution | Ensure all required dependencies for the Chromium are installed on the system. This may include additional libraries or packages. |
Access is denied in runtimes folders. Runtimes folder requires read/write/execute permission
Exception | Access is denied in runtimes folders. Runtimes folder requires read/write/execute permission |
---|---|
Reason | The exception may occur if the runtimes folder is not accessed. |
Solution | To overcome the exception, you can add read, write, and execute permissions for the runtimes folder. |
Access denied for specified temporary folder
Exception | Access denied for specified temporary folder |
---|---|
Reason | The specified temporary folder path might be inaccessible. |
Solution | To overcome the exception, you can add read, write, and execute permissions for the temporary folder. Refer to the following code sample to set the temp folder.
|
The temporary folder does not have read permission
Exception | The temporary folder does not have read permission |
---|---|
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. |
Blink converter may create PDF with blank pages
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. |
Failed to launch chromium: Due to insufficient permission unable to launch the chromium process for conversion
Exception | Failed to launch chromium: Due to insufficient permission unable to launch chromium process for conversion. |
---|---|
Reason | This exception might arise because the Blink binary files lack sufficient permissions to be launched from the specified BlinkPath location. |
Solution | To overcome this exception, you can provide an execute permission for chrome and chrome-wrapper files inside the runtimes/linux/native folder by using the docker command.
|
Images or other contents in the HTML are missing in the resultant PDF document
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 property of the HTMLConverter.
|
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. |
Blink conversion failed in Azure app service (Windows)
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. |
Unable to convert unsecured https URL to PDF using Blink
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.
|
Conversion failure in windows server 2012 R2
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.
|
Converting the HTML to PDF fails in x32 bit windows system environment
Exception | Converting the HTML to PDF fails in x32 bit windows system environment. |
---|---|
Reason | The existing x64 bit Blink binaries windows are not compatible with x32 bit windows system architecture. |
Solution | To overcome this issue, we can use the x32 bit blink binaries. The x32 bit windows blink binaries are compatible with the x32 bit windows system environment. Please download the x32 bit blink binaries for windows here and replace these binaries in the existing x64 bit blink binaries folder. |
ERROR:The specified module could not be found in windows server 2012 R2
Exception | The specified module could not be found in windows server 2012 R2. |
---|---|
Reason | The issue happened because the Windows Server Essentials Media Pack was missing in the Windows server 2012 R2. |
Solution | We can resolve this issue by installing the Windows Server Essentials Media Pack.
To install the Windows Server Essentials Media Pack, first install the Windows Server Essentials. 1. Open the Server Manager in the Taskbar. 2. Click Manage in the Server Manager and select Add Roles and Features option. 3. Select the Role-based or feature-based installation option and click next. 4. In the left side menu, select server roles, then Windows Server Essentials Experience in the server roles and then click next. 5. Now, the Windows Server Essentials will be installed. 6. After successful installation, install the Windows Server Essentials Media Pack. Go to the official website to download and Install the Windows Server Essentials Media Pack. Note: This version is only applicable to Windows Server 2012 R2 Standard. |
How to Exclude BlinkBinaries or Runtime Files in Build or Deployment
The runtime files, or blink binaries, will be copied into a bin or published folder while building and publishing the application.
By including the
Note:
Using this approach, you can reduce the deployment size on your own servers.
Refer to the following package reference:
HTML conversion support in Azure
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 |
Failed to convert Webpage exception with Linux docker in Mac M1 machine.
Exception | Failed to convert Webpage exception using Linux Docker in Mac M1 system environment. |
---|---|
Reason | The existing x64-bit Blink binaries for Linux are not compatible with the x64 ARM Mac M1 system architecture with Linux Docker. |
Solution |
To resolve this issue, we can install the chromium using the docker file and set the Blink Path to the location where chromium is installed.
Docker File:
|
Background color missing issue in HTML Header and Footer
Exception | Background color missing issue in HTML Header and Footer. |
---|---|
Reason | We do not have the support for adding a custom CSS style in the HTML header and footer. |
Solution |
To resolve this issue, we can add inline styles in element. However, we have attached the sample and output documents for your reference.
|
Zombie process are not closed by default from chrome headless in Linux platform
The zombie process are not closed by default from chrome headless in Linux. However, We can resolve the zombie process issue by using the below command line arguments in converter settings.
//Set command line arguments to run without the sandbox.
settings.CommandLineArguments.Add("--no-sandbox");
settings.CommandLineArguments.Add("--disable-setuid-sandbox");
settings.CommandLineArguments.Add("--no-zygote");
settings.CommandLineArguments.Add("--disable-dev-shm-usage");
settings.CommandLineArguments.Add("--single-process");
Failed to launch chromium: Missing required dependent packages issue occurs in Azure function Linux with premium plans.
Exception | Failed to launch chromium: Missing required dependent packages issue occurs in Azure function Linux with premium plans. |
---|---|
Reason | The reported issue occurs due to missing of required Linux dependencies in Azure function to perform the conversion in premium plans (such as Ep1) |
Solution |
To overcome this issue by installing the Linux dependencies package in SSH window. Please refer the below commands and screenshot,
Please refer to the below screenshot, (Or) We can install the required dependencies using the dependencies vis shell script. Please find the below. code snippet:
|
Failed to load Chrome DLL exception occurs on Windows 7/8 and Windows Server 2008/2012 machines
Exception | Failed to load Chrome DLL exception occurs on Windows 7/8 and Windows Server 2008/2012 machines. |
---|---|
Reason | The reported issue occurs due to an unsupported OS platform with the latest binaries. |
Solution |
If you are using Windows 7/8 or Windows Server 2008/2012, please use Chromium version 109 instead of the newer versions. Chromium has discontinued support for these operating systems, and the last compatible version is 109.
Please refer to the below thread for more information, https://support.google.com/chrome/thread/185534985 Blink binaries (Version 109.0.5414.75), https://www.syncfusion.com/downloads/support/directtrac/general/ze/BlinkBinaries_109.0.5414.7560606898 |
There was an error opening this document. This file is already open or in use by another application.
Issue | There was an error opening this document. This file is already open or in use by another application. |
---|---|
Reason | The reported issue occurs due to the document or file not being properly disposed or closed, leading to conflicts when attempting to access it again. |
Solution |
We can resolve the reported issue by using the FileStream within the "using" block.
|