From ff7ed7833a1c9462261db54c9eb485498ac2c272 Mon Sep 17 00:00:00 2001 From: Srihariharan Date: Thu, 14 Mar 2024 11:42:01 +0530 Subject: [PATCH] 876039: Resolve UG Documentation staging error. --- .../Convert-HTML-To-PDF/troubleshooting.md | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/File-Formats/PDF/Convert-HTML-To-PDF/troubleshooting.md b/File-Formats/PDF/Convert-HTML-To-PDF/troubleshooting.md index 89c10b9a1..a6476bcee 100644 --- a/File-Formats/PDF/Convert-HTML-To-PDF/troubleshooting.md +++ b/File-Formats/PDF/Convert-HTML-To-PDF/troubleshooting.md @@ -34,7 +34,7 @@ You can set the runtimes folder path explicitly in BlinkPath property in BlinkCo

Ex path: C:\HtmlConversion\HTMl-to-PDF\HTMl-to-PDF\bin\Debug\net7.0\runtimes\win-x64\native\

-{% highlight html %} +{% highlight c# tabtitle="C# [Cross-platform]" %} //Initialize the HTML to PDF converter. HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); @@ -137,7 +137,7 @@ Also, please add the following command line arguments in our converter setting.
-{% highlight c# tabtitle="C#" %} +{% highlight %} //Set command line arguments to run without sandbox. blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); @@ -247,7 +247,7 @@ blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); 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.

-{% highlight c# tabtitle="C#" %} +{% highlight %} BlinkConverterSettings settings = new BlinkConverterSettings(); settings.TempPath = "D://MyProject//bin"; @@ -330,7 +330,7 @@ Check the HTML file or URL is rendered properly in Chrome browser's print previe

ExcludeAssets

-{% highlight c# tabtitle="C#" %} +{% highlight %} COPY . /app WORKDIR /app @@ -362,7 +362,7 @@ RUN chmod +x /app/runtimes/linux/native/chrome && \
To overcome this issue, add suitable delay for the conversion using the AdditionalDelay property of the HTMLConverter.

-{% highlight c# tabtitle="C#" %} +{% highlight %} BlinkConverterSettings settings = new BlinkConverterSettings(); settings.AdditionalDelay = 4000; @@ -431,7 +431,7 @@ Refer to this
We can resolve this permission related failure in the Blink rendering engine using below command line arguments in our converter settings.

-{% highlight c# tabtitle="C#" %} +{% highlight %} //Set command line arguments to run without sandbox. blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); @@ -591,7 +591,7 @@ To resolve this issue, we can install the chromium using the docker file and set Docker File:

{% tabs %} -{% highlight c# tabtitle="C#" %} +{% highlight %} FROM mcr.microsoft.com/dotnet/aspnet:7.0 AS base @@ -617,7 +617,7 @@ Docker File:

Code snippet: -{% highlight c# tabtitle="C#" %} +{% highlight %} BlinkConverterSettings settings = new BlinkConverterSettings(); @@ -657,7 +657,7 @@ To resolve this issue, we can add inline styles in element. However, we have att {% tabs %} -{% highlight c# tabtitle="C#" %} +{% highlight c# tabtitle="C# [Cross-platform]" %} HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); //Initialize blink converter settings.