''' Finds the "signature" field in the form, removes it, and replaces it with a true PDF signature field.
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 50711c98b..41f8e0e98 100644
--- a/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/troubleshooting.md
+++ b/Document-Processing/PDF/Conversions/HTML-To-PDF/NET/troubleshooting.md
@@ -46,10 +46,9 @@ blinkConverterSettings.BlinkPath = @"C:/HtmlConversion/BlinkBinaries/";
htmlConverter.ConverterSettings = blinkConverterSettings;
//Convert the URL to PDF document.
PdfDocument document = htmlConverter.Convert("https://www.syncfusion.com");
-//Create a file stream to save the PDF document.
-FileStream fileStream = new FileStream("HTML-to-PDF.pdf", FileMode.CreateNew, FileAccess.ReadWrite);
+
//Save and close the PDF document.
-document.Save(fileStream);
+document.Save("Output.pdf");
document.Close(true);
{% endhighlight %}
@@ -658,7 +657,7 @@ Refer to the following package reference:
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:
+Docker File:
{% tabs %}
{% highlight C# tabtitle="C#" %}
@@ -687,7 +686,7 @@ Docker File:
{% endtabs %}
-Code snippet:
+Code example:
{% tabs %}
{% highlight C# tabtitle="C#" %}
@@ -732,28 +731,27 @@ To resolve this issue, we can add inline styles in element. However, we have att
{% highlight C# tabtitle="C#" %}
- HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter();
- //Initialize blink converter settings.
- BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings();
- //Set the Blink viewport size.
- blinkConverterSettings.ViewPortSize = new Size(1280, 0);
- //Set the html margin-top value based on the html header height and margin-top value.
- blinkConverterSettings.Margin.Top = 70;
- //Set the html margin-bottom value based on the html footer height and margin-bottom value.
- blinkConverterSettings.Margin.Bottom = 40;
- //Set the custom HTML header to add at the top of each page.
- blinkConverterSettings.HtmlHeader = " HTML Header ";
- //Set the custom HTML footer to add at the bottom of each page.
- blinkConverterSettings.HtmlFooter = " HTML Footer ";
- //Assign Blink converter settings to the HTML converter.
- htmlConverter.ConverterSettings = blinkConverterSettings;
- //Convert the URL to a PDF document.
- PdfDocument document = htmlConverter.Convert("Hello World ",string.Empty);
- //Create a filestream.
- FileStream fileStream = new FileStream("Output.pdf", FileMode.Create, FileAccess.ReadWrite);
- //Save and close a PDF document.
- document.Save(fileStream);
- document.Close(true);
+HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter();
+//Initialize blink converter settings.
+BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings();
+//Set the Blink viewport size.
+blinkConverterSettings.ViewPortSize = new Size(1280, 0);
+//Set the html margin-top value based on the html header height and margin-top value.
+blinkConverterSettings.Margin.Top = 70;
+//Set the html margin-bottom value based on the html footer height and margin-bottom value.
+blinkConverterSettings.Margin.Bottom = 40;
+//Set the custom HTML header to add at the top of each page.
+blinkConverterSettings.HtmlHeader = " HTML Header ";
+//Set the custom HTML footer to add at the bottom of each page.
+blinkConverterSettings.HtmlFooter = " HTML Footer ";
+//Assign Blink converter settings to the HTML converter.
+htmlConverter.ConverterSettings = blinkConverterSettings;
+//Convert the URL to a PDF document.
+PdfDocument document = htmlConverter.Convert("Hello World ",string.Empty);
+
+//Save and close a PDF document.
+document.Save("Output.pdf");
+document.Close(true);
{% endhighlight %}
@@ -773,17 +771,12 @@ You can downloaded a complete working sample from

-code snippet:
+Code example:
{% tabs %}
{% highlight C# %}
@@ -930,10 +923,10 @@ We can resolve the reported issue by using the FileStream within the "using" blo
{% tabs %}
{% highlight C# %}
- using (FileStream fs = new FileStream("path_to_file", FileMode.Open))
- {
- // Use the file here
- } // File stream is automatically closed and disposed
+using (FileStream fs = new FileStream("path_to_file", FileMode.Open))
+{
+// Use the file here
+} // File stream is automatically closed and disposed
{% endhighlight %}
{% endtabs %}
@@ -943,21 +936,15 @@ Or
Dispose of the FileStream at the end of the process and ensure that the file or document is not already open in another application.
{% tabs %}
{% highlight C# %}
-
- PdfDocument document = htmlConverter.Convert(");
-
- FileStream fileStream = new FileStream(baseUrl+ "Bill_PDF_04_16_24.pdf", FileMode.CreateNew, FileAccess.ReadWrite);
-
- //Save and close the PDF document.
-
- document.Save(fileStream);
-
- document.Close(true);
-
- document.Dispose();
+PdfDocument document = htmlConverter.Convert(");
+FileStream fileStream = new FileStream(baseUrl+ "Bill_PDF_04_16_24.pdf", FileMode.CreateNew, FileAccess.ReadWrite);
+//Save and close the PDF document.
+document.Save(fileStream);
+document.Close(true);
+document.Dispose();
- fileStream.Dispose();
+fileStream.Dispose();
{% endhighlight %}
{% endtabs %}
@@ -1166,9 +1153,9 @@ The reported issue may occur due to missing of crashpad handler configuration in
|
| Solution |
-You can try the below solution steps to overcome the reported issue 'Failed to launch Base! chrome_crashpad_handler: --database is required',
+You can try the below solution steps to overcome the reported issue 'Failed to launch Base! chrome_crashpad_handler: --database is required',
-Step 1: Kindly try the below docker file changes in your sample to resolve the chrome_crashpad_handler issue.
+Step 1: Kindly try the below docker file changes in your sample to resolve the chrome_crashpad_handler issue.
{% tabs %}
{% highlight C# %}
@@ -1214,11 +1201,11 @@ ENTRYPOINT ["dotnet", "Ops.PDFSearch.Web.dll"]
{% endhighlight %}
{% endtabs %}
-We have attached the modified docker file for your reference Docker file.
+We have attached the modified docker file for your reference Docker file.
-Step 2: From chromium version 128.x.x.x.x --database flag required for chrome Crashpad handler. So, it may cause the issue on your end. So kindly try the below steps and it may resolve the reported issue.
+Step 2: From chromium version 128.x.x.x.x -database flag required for chrome Crashpad handler. So, it may cause the issue on your end. So kindly try the below steps and it may resolve the reported issue.
-Add below commands in Docker file
+Add below commands in Docker file:
{% tabs %}
{% highlight C# %}
@@ -1229,7 +1216,7 @@ RUN chown -R www-data:www-data /var/www/.config
{% endhighlight %}
{% endtabs %}
-Add below command-line arguments in conversion code
+Add below command-line arguments in conversion code
{% tabs %}
{% highlight C# %}
@@ -1273,14 +1260,14 @@ The Blink rendering engine is not supported for HTML to PDF conversion in Azu
| Solution |
-Use Blink Rendering Engine in Azure App Service Linux or Azure Functions Linux
+Use Blink Rendering Engine in Azure App Service Linux or Azure Functions Linux
-To perform HTML to PDF conversion using the Blink rendering engine, you can use the following alternatives:
+To perform HTML to PDF conversion using the Blink rendering engine, you can use the following alternatives:
-* Azure App Service (Linux): The Blink rendering engine is compatible with Azure App Service running on Linux.
+* Azure App Service (Linux): The Blink rendering engine is compatible with Azure App Service running on Linux.
-* Azure Functions (Linux): Linux-based Azure Functions can also utilize the Blink rendering engine for successful conversions.
-* Azure App Service (Linux Docker): Deploying the application in a Linux-based Docker container offers another way to use Blink.
+* Azure Functions (Linux): Linux-based Azure Functions can also utilize the Blink rendering engine for successful conversions.
+* Azure App Service (Linux Docker): Deploying the application in a Linux-based Docker container offers another way to use Blink.
|
@@ -1297,10 +1284,10 @@ To perform HTML to PDF conversion using the Blink rendering engine, you can use
Reason
|
-This issue may occur due to one of the following reasons:
-1. Missing required Linux dependencies
-2. Missing Chromium dependency files
-3. Lack of access permissions for the chrome and chrome-wrapper files
+This issue may occur due to one of the following reasons:
+1. Missing required Linux dependencies
+2. Missing Chromium dependency files
+3. Lack of access permissions for the chrome and chrome-wrapper files
|
@@ -1309,7 +1296,7 @@ This issue may occur due to one of the following reasons:
To resolve the issue and ensure successful HTML to PDF conversion in Azure App Service (Linux), follow these steps:
-1: Grant File Access Permissions
+1: Grant File Access Permissions
Provide read, write, and execute permissions for the chrome and chrome-wrapper files located in the runtimes/linux/native directory. Use the following commands:
@@ -1322,7 +1309,7 @@ chmod +rwx chrome
{% endhighlight %}
{% endtabs %}
-2: Verify Chrome Dependency Packages
+2: Verify Chrome Dependency Packages
Check if the necessary dependencies for Chromium are installed by running the following command in the runtimes/linux/native directory:
@@ -1334,7 +1321,7 @@ ldd chrome
{% endhighlight %}
{% endtabs %}
-3: Install Required Dependencies
+3: Install Required Dependencies
We can also perform HTML to PDF conversion in Azure App Service (Linux) by installing the required dependencies directly through SSH terminal. Use the following command:
@@ -1371,20 +1358,18 @@ For more details to install the dependencies through SSH terminal window, refer
| Solution |
-1.Script Execution at Startup
-Copy the prerequisites script (dependenciesInstall.sh) into your application directory.
+1.Script Execution at Startup
+Copy the prerequisites script (dependenciesInstall.sh) into your application directory.
Ensure it is configured to always be copied to the output directory during build/publish.
-
+
-
-2.Deploy to Azure App Service (Linux)
-Publish your application to the Azure App Service.
-3.Configure Startup Command
-
-After deployment, go to the Azure portal configuration for your app service.
-In the Startup Command section, add:
-
+
+2.Deploy to Azure App Service (Linux)
+Publish your application to the Azure App Service.
+3.Configure Startup Command
+After deployment, go to the Azure portal configuration for your app service.
+In the Startup Command section, add:
{% tabs %}
{% highlight C# %}
@@ -1392,19 +1377,19 @@ In the Startup Command section, add:
{% endhighlight %}
{% endtabs %}
-
+
-
+
This ensures that your script runs to install necessary dependencies before the application launches.
-
+
4.Restart the App Service
-
+
This will trigger the execution of your startup script, resolving installation and font issues.
-
+
5.Verification
-
+
After the service restarts, try the conversion or operation again to ensure the issues are resolved.
-
+
|
@@ -1453,26 +1438,26 @@ PdfDocument doc = htmlConverter.Convert(url);
The problem is limited to Azure Functions with premium plans in Net 8.0 version. To fix this, we can either manually install the necessary Chromium dependencies in the SSH portal or include the runtimes folder (Blink binaries) in the project location.
-Prerequisites dependencies:
+Prerequisites dependencies:
{% tabs %}
{% highlight C# %}
- apt-get update && apt-get install -yq --no-install-recommends libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 libnss3 libgbm1
+apt-get update && apt-get install -yq --no-install-recommends libasound2 libatk1.0-0 libc6 libcairo2 libcups2 libdbus-1-3 libexpat1 libfontconfig1 libgcc1 libgconf-2-4 libgdk-pixbuf2.0-0 libglib2.0-0 libgtk-3-0 libnspr4 libpango-1.0-0 libpangocairo-1.0-0 libstdc++6 libx11-6 libx11-xcb1 libxcb1 libxcursor1 libxdamage1 libxext6 libxfixes3 libxi6 libxrandr2 libxrender1 libxss1 libxtst6 libnss3 libgbm1
{% endhighlight %}
{% endtabs %}
-N> Note: We have option to exclude the default Blink binaries from the installation package. This will reduce the size of your deployment package in azure. Please refer to the code snippet below.
+N> We have option to exclude the default Blink binaries from the installation package. This will reduce the size of your deployment package in azure. Please refer to the code example below.
{% tabs %}
{% highlight C# %}
-
+
- native
+native
-
+
{% endhighlight %}
{% endtabs %}
\ No newline at end of file