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 480910a21..5599d4a2f 100644 --- a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/troubleshooting.md +++ b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/troubleshooting.md @@ -543,6 +543,58 @@ settings.CommandLineArguments.Add("--ignore-certificate-errors"); +## Security Alert - Bundled chrome.exe in HTML-to-PDF Conversion + +
| Issue + | +Security alerts are triggered when the Syncfusion HTML-to-PDF converter uses a bundled `chrome.exe` executable to render HTML content in headless mode during PDF generation. + | + +
|---|---|
| Reason + | +The HTML-to-PDF conversion relies on Chromium's Blink rendering engine: + +1.The NuGet package includes Blink binaries (`chrome.exe`) under `runtimes/win-x64/native` +3.Security systems flag the execution of embedded binaries as potential risks + |
+
| Solution + | +Use system-installed Chromium instead of bundled binaries:
+ +Step 1: Configure Blink Path +{% tabs %} +{% highlight C# tabtitle="C#" %} + +HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); +BlinkConverterSettings settings = new BlinkConverterSettings(); + +// Point to system-installed Chrome. +settings.BlinkPath = @"C:\Program Files\Google\Chrome\Application"; + +//Convert HTML to PDF. +htmlConverter.ConverterSettings = settings; +PdfDocument document = htmlConverter.Convert("https://example.com"); + +//Save and close the document. +document.Save("Output.pdf"); +document.Close(true); + +{% endhighlight %} +{% endtabs %} + +Step 2: Verify Installation +Ensure Chrome exists at the specified path (standard locations): `C:\Program Files\Google\Chrome\Application` + + |
+