diff --git a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/htmlconversion_images/Outputdictionarypath.png b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/htmlconversion_images/Outputdictionarypath.png new file mode 100644 index 000000000..6c0c1caf1 Binary files /dev/null and b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/htmlconversion_images/Outputdictionarypath.png differ diff --git a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/troubleshooting.md b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/troubleshooting.md index 8c48212a8..bcdc7d685 100644 --- a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/troubleshooting.md +++ b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/troubleshooting.md @@ -82,6 +82,71 @@ document.Close(true); +## Application Crash in Syncfusion 29.X.X Due to Missing `locales` Folder Required by Chromium During HTML Rendering or Conversion + + + + + + + + + + + + + + +
Exception +Application crashes in Syncfusion libraries version 29.2.11 because Chromium fails to find the required `locales` folder in the published output directory, leading to runtime errors when launching HTML rendering or conversion. +
Reason +Starting with Syncfusion package version 29.X.X, Chromium was updated to 133.x.x, which now requires the `locales` directory to be present at runtime. However, when publishing a .NET application with the `linux-x64` runtime identifier, only files are copied to the root output folder and the folder structure including 'locales' is omitted. As a result, Chromium cannot locate the required 'locales' directory, triggering a runtime exception during HTML rendering or conversion. +
Solution + +To overcome this issue, we have three workaround solutions. +
+Step 1: Using the "Portable" Runtime Identifier ensures that the runtime files are copied into the correct folder structure, allowing the conversion process to complete without any issues. +
+Step 2: To resolve this issue, we recommend copying the runtimes folder into the project directory, placing it at the same level as the .csproj file. Additionally, ensure that all files within the runtimes folder have their Copy to Output Directory property set to Copy if newer. Please refer to the screenshot below for guidance. +
+Output dictionary path +
+
+Step 3: If manually copying the files doesn't meet your requirements, we recommend applying the following code changes in the .csproj file and updating the publish profile. This will ensure the necessary files are copied automatically during the publishing process. +
+Add the following code snippet to the .pubxml file to apply the necessary configuration. +
+{% tabs %} +{% highlight C# tabtitle="C#" %} + + + + false + + + +{% endhighlight %} +{% endtabs %} +
+Add the following code to the .csproj file to ensure the locale folder is copied to the publish directory during the build process. +
+{% tabs %} +{% highlight C# tabtitle="C#" %} + + + + + + + +{% endhighlight %} +{% endtabs %} +
+ ## Blink rendering engine only supported from .NET Framework 4.5 @@ -929,7 +994,7 @@ System type : 64-bit operating system, x64-based processor The benchmark details were obtained using the [Syncfusion.HtmlToPdfConverter.Net.Windows](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Windows) package. You can refer to the following sample, as well as the input and output files used: -Input Html files : https://github.com/SyncfusionExamples/html_to_pdf_conversion/tree/main/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data +Input HTML files : https://github.com/SyncfusionExamples/html_to_pdf_conversion/tree/main/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data Output PDF files : https://www.syncfusion.com/downloads/support/directtrac/general/ze/Output-924807763.zip @@ -989,7 +1054,7 @@ N> * External resources loaded in the HTML (such as images, scripts, and styles) N> * Network speed for online URL conversions N> * Hardware resources (CPU and memory) -You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/html_to_pdf_conversion/tree/main/Performance_Testing/Syncfusion_HTMLtoPDF). +You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/html-to-pdf-csharp-examples/tree/master/Performance_Testing/Syncfusion_HTMLtoPDF). ## Custom fonts are not rendered in Azure App Service and Function Linux using Blink.