You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Step 4: Install the [Syncfusion.HtmlToPdfConverter.Net.Linux](https://www.nuget.org/packages/Syncfusion.HtmlToPdfConverter.Net.Linux/) NuGet package as a reference to your .NET Core application [NuGet.org](https://www.nuget.org/).
N> Starting with v16.2.0.x, if you reference Syncfusion<sup>®</sup> assemblies from trial setup or from the NuGet feed, you also have to add "Syncfusion.Licensing" assembly reference and include a license key in your projects. Please refer to this [link](https://help.syncfusion.com/common/essential-studio/licensing/overview) to know about registering Syncfusion<sup>®</sup> license key in your application to use our components.
30
30
31
-
Step 5: Include the following namespaces in Function1.cs file.
31
+
32
+
Step 5: Create a shell file with the below commands in the project and name it as dependenciesInstall.sh. In this article, these steps have been followed to install dependencies packages.
Step 7: Include the following namespaces in Function1.cs file.
32
83
33
84
{% highlight c# tabtitle="C#" %}
34
85
@@ -39,7 +90,7 @@ Step 5: Include the following namespaces in Function1.cs file.
39
90
40
91
{% endhighlight %}
41
92
42
-
Step 6: This Azure Function converts HTML to PDF using HTTP triggers. It handles GET/POST requests, processes the HTML, and returns a PDF response.
93
+
Step 8: This Azure Function converts HTML to PDF using HTTP triggers. It handles GET/POST requests, processes the HTML, and returns a PDF response.
43
94
44
95
{% highlight c# tabtitle="C#" %}
45
96
@@ -67,7 +118,7 @@ Step 6: This Azure Function converts HTML to PDF using HTTP triggers. It handles
67
118
68
119
{% endhighlight %}
69
120
70
-
step 7: Use the following code example in the HtmlToPdfConvert method to convert HTML to a PDF document using the [Convert](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.HtmlToPdfConverter.html#Syncfusion_HtmlConverter_HtmlToPdfConverter_Convert_System_String_) method in the [HtmlToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.HtmlToPdfConverter.html) class. The Blink command line arguments are configured based on the given [CommandLineArguments](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.BlinkConverterSettings.html#Syncfusion_HtmlConverter_BlinkConverterSettings_CommandLineArguments) property of the [BlinkConverterSettings](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.BlinkConverterSettings.html) class.
121
+
step 9: Use the following code example in the HtmlToPdfConvert method to convert HTML to a PDF document using the [Convert](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.HtmlToPdfConverter.html#Syncfusion_HtmlConverter_HtmlToPdfConverter_Convert_System_String_) method in the [HtmlToPdfConverter](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.HtmlToPdfConverter.html) class. The Blink command line arguments are configured based on the given [CommandLineArguments](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.BlinkConverterSettings.html#Syncfusion_HtmlConverter_BlinkConverterSettings_CommandLineArguments) property of the [BlinkConverterSettings](https://help.syncfusion.com/cr/document-processing/Syncfusion.HtmlConverter.BlinkConverterSettings.html) class.
71
122
72
123
{% highlight c# tabtitle="C#" %}
73
124
@@ -99,6 +150,7 @@ public byte[] HtmlToPdfConvert(string htmlText)
N> These arguments are only required when using **older versions** of the library that depend on Blink in sandbox-restricted environments.
129
181
130
-
Step 8: This code is designed to ensure that the necessary Linux packages for HTML to PDF conversion are installed if the operating system is Linux. It adjusts file permissions and executes a shell script to carry out the installation.
182
+
Step 10: This code is designed to ensure that the necessary Linux packages for HTML to PDF conversion are installed if the operating system is Linux. It adjusts file permissions and executes a shell script to carry out the installation.
Step 10: Include the below enum in the Function1.cs file.
312
+
Step 12: Include the below enum in the Function1.cs file.
261
313
262
314
{% highlight c# tabtitle="C#" %}
263
315
@@ -318,4 +370,5 @@ An online sample link to [convert HTML to PDF document](https://ej2.syncfusion.c
318
370
319
371
Click [here](https://www.syncfusion.com/document-processing/pdf-framework/net-core/html-to-pdf) to explore the rich set of Syncfusion<sup>®</sup> HTML to PDF converter library features.
320
372
321
-
An online sample link to [convert HTML to PDF document](https://ej2.syncfusion.com/aspnetcore/PDF/HtmltoPDF#/material3) in ASP.NET Core.
373
+
374
+
An online sample link to [convert HTML to PDF document](https://ej2.syncfusion.com/aspnetcore/PDF/HtmltoPDF#/material3) in ASP.NET Core.
Copy file name to clipboardExpand all lines: Document-Processing/PDF/Conversions/HTML-To-PDF/NET/troubleshooting.md
+21Lines changed: 21 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1572,5 +1572,26 @@ N> We have option to exclude the default Blink binaries from the installation pa
1572
1572
1573
1573
</PackageReference>
1574
1574
1575
+
{% endhighlight %}
1576
+
{% endtabs %}
1577
+
1578
+
## How to Exclude BlinkBinaries or Runtime Files in Build or Deployment
1579
+
1580
+
The runtime files, or blink binaries, will be copied into a bin or published folder while building and publishing the application.
1581
+
By including the <ExcludeAssets>native</ExcludeAssets> option in the package reference of the csproj file, you can exclude the runtime files or blink binaries from being copied into the bin or publish folder while building and publishing the application. But you need to place the BlinkBinaries in the server disk and set the BlinkPath in the BlinkConverterSettings to perform the conversion.
1582
+
1583
+
N> Using this approach, you can reduce the deployment size on your own servers.
0 commit comments