From 18202bf359a35fbf728e9f253911d975816fe933 Mon Sep 17 00:00:00 2001 From: karmegams02 Date: Mon, 21 Jul 2025 18:23:22 +0530 Subject: [PATCH 1/2] 968984_Removed the commandline arguments in the blink converter settings. --- AWS/AWSElasticBeanstalkSample/Controllers/HomeController.cs | 3 --- .../HTML_to_PDF_Lambda_Docker_Container/Function.cs | 2 -- AWS/NetCoreAWSFargate/Controllers/HomeController.cs | 3 --- .../HtmlToPdfBlinkAzureAppLinux/Controllers/HomeController.cs | 3 --- .../Controllers/HomeController.cs | 3 --- .../HTML_to_PDF_Azure_functions/Function1.cs | 4 ---- Docker/HTML_to_PDF_docker/Controllers/HomeController.cs | 3 --- Linux/Program.cs | 4 ---- 8 files changed, 25 deletions(-) diff --git a/AWS/AWSElasticBeanstalkSample/Controllers/HomeController.cs b/AWS/AWSElasticBeanstalkSample/Controllers/HomeController.cs index 8514060..6924359 100644 --- a/AWS/AWSElasticBeanstalkSample/Controllers/HomeController.cs +++ b/AWS/AWSElasticBeanstalkSample/Controllers/HomeController.cs @@ -26,9 +26,6 @@ public IActionResult BlinkToPDF() //Initialize HTML to PDF converter. HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.Blink); BlinkConverterSettings settings = new BlinkConverterSettings(); - //Set command line arguments to run without the sandbox. - settings.CommandLineArguments.Add("--no-sandbox"); - settings.CommandLineArguments.Add("--disable-setuid-sandbox"); //Set Blink viewport size. settings.ViewPortSize = new Syncfusion.Drawing.Size(1280, 0); //Assign Blink settings to the HTML converter. diff --git a/AWS/HTML_to_PDF_Lambda_Docker_Container/HTML_to_PDF_Lambda_Docker_Container/Function.cs b/AWS/HTML_to_PDF_Lambda_Docker_Container/HTML_to_PDF_Lambda_Docker_Container/Function.cs index 4cd484d..22c240d 100644 --- a/AWS/HTML_to_PDF_Lambda_Docker_Container/HTML_to_PDF_Lambda_Docker_Container/Function.cs +++ b/AWS/HTML_to_PDF_Lambda_Docker_Container/HTML_to_PDF_Lambda_Docker_Container/Function.cs @@ -25,8 +25,6 @@ public string FunctionHandler(string input, ILambdaContext context) BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); blinkConverterSettings.BlinkPath = Path.GetFullPath("BlinkBinariesAws"); - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); blinkConverterSettings.AdditionalDelay = 3000; diff --git a/AWS/NetCoreAWSFargate/Controllers/HomeController.cs b/AWS/NetCoreAWSFargate/Controllers/HomeController.cs index a648892..ba88d6b 100644 --- a/AWS/NetCoreAWSFargate/Controllers/HomeController.cs +++ b/AWS/NetCoreAWSFargate/Controllers/HomeController.cs @@ -25,9 +25,6 @@ public IActionResult BlinkToPDF() //Initialize HTML to PDF converter. HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.Blink); BlinkConverterSettings settings = new BlinkConverterSettings(); - //Set command line arguments to run without the sandbox. - settings.CommandLineArguments.Add("--no-sandbox"); - settings.CommandLineArguments.Add("--disable-setuid-sandbox"); //Set Blink viewport size. settings.ViewPortSize = new Syncfusion.Drawing.Size(1280, 0); //Assign Blink settings to the HTML converter. diff --git a/Azure/HTML_to_PDF_Azure_app_service/HtmlToPdfBlinkAzureAppLinux/Controllers/HomeController.cs b/Azure/HTML_to_PDF_Azure_app_service/HtmlToPdfBlinkAzureAppLinux/Controllers/HomeController.cs index 2f6777d..5cadc0a 100644 --- a/Azure/HTML_to_PDF_Azure_app_service/HtmlToPdfBlinkAzureAppLinux/Controllers/HomeController.cs +++ b/Azure/HTML_to_PDF_Azure_app_service/HtmlToPdfBlinkAzureAppLinux/Controllers/HomeController.cs @@ -31,9 +31,6 @@ public ActionResult ExportToPDF() //Initialize HTML to PDF converter HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); - //Set command line arguments to run without sandbox. - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); htmlConverter.ConverterSettings = blinkConverterSettings; PdfDocument document = htmlConverter.Convert("https://www.syncfusion.com"); MemoryStream outputStream = new MemoryStream(); diff --git a/Azure/HTML_to_PDF_Azure_app_service_docker/HTML_to_PDF_Azure_app_service_docker/Controllers/HomeController.cs b/Azure/HTML_to_PDF_Azure_app_service_docker/HTML_to_PDF_Azure_app_service_docker/Controllers/HomeController.cs index 48298b2..9cbab16 100644 --- a/Azure/HTML_to_PDF_Azure_app_service_docker/HTML_to_PDF_Azure_app_service_docker/Controllers/HomeController.cs +++ b/Azure/HTML_to_PDF_Azure_app_service_docker/HTML_to_PDF_Azure_app_service_docker/Controllers/HomeController.cs @@ -36,9 +36,6 @@ public ActionResult ExportToPDF() //Initialize HTML to PDF converter. HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); BlinkConverterSettings settings = new BlinkConverterSettings(); - //Set command line arguments to run without the sandbox. - settings.CommandLineArguments.Add("--no-sandbox"); - settings.CommandLineArguments.Add("--disable-setuid-sandbox"); //Assign Blink settings to the HTML converter. htmlConverter.ConverterSettings = settings; //Convert URL to PDF. diff --git a/Azure/HTML_to_PDF_Azure_functions/HTML_to_PDF_Azure_functions/Function1.cs b/Azure/HTML_to_PDF_Azure_functions/HTML_to_PDF_Azure_functions/Function1.cs index 1e2df76..c074c6b 100644 --- a/Azure/HTML_to_PDF_Azure_functions/HTML_to_PDF_Azure_functions/Function1.cs +++ b/Azure/HTML_to_PDF_Azure_functions/HTML_to_PDF_Azure_functions/Function1.cs @@ -34,10 +34,6 @@ public static async Task Run([HttpTrigger(AuthorizationLevel.Func //Initialize the HTML to PDF converter with the Blink rendering engine. HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(HtmlRenderingEngine.Blink); - - //Set command line arguments to run without sandbox. - settings.CommandLineArguments.Add("--no-sandbox"); - settings.CommandLineArguments.Add("--disable-setuid-sandbox"); settings.BlinkPath = blinkBinariesPath; //Assign BlinkConverter settings to the HTML converter htmlConverter.ConverterSettings = settings; diff --git a/Docker/HTML_to_PDF_docker/Controllers/HomeController.cs b/Docker/HTML_to_PDF_docker/Controllers/HomeController.cs index d184087..a150c94 100644 --- a/Docker/HTML_to_PDF_docker/Controllers/HomeController.cs +++ b/Docker/HTML_to_PDF_docker/Controllers/HomeController.cs @@ -41,9 +41,6 @@ public ActionResult ExportToPDF() //Initialize HTML to PDF converter. HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); BlinkConverterSettings settings = new BlinkConverterSettings(); - //Set command line arguments to run without sandbox. - settings.CommandLineArguments.Add("--no-sandbox"); - settings.CommandLineArguments.Add("--disable-setuid-sandbox"); //Set Blink viewport size. settings.ViewPortSize = new Syncfusion.Drawing.Size(1280, 0); //Assign Blink settings to HTML converter. diff --git a/Linux/Program.cs b/Linux/Program.cs index 962522d..bdd3420 100644 --- a/Linux/Program.cs +++ b/Linux/Program.cs @@ -14,10 +14,6 @@ static void Main(string[] args) BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); - //Assign Blink converter settings to HTML converter htmlConverter.ConverterSettings = blinkConverterSettings; From 710c96e433c93704c8a8685ed87a1b0447c947fe Mon Sep 17 00:00:00 2001 From: karmegams02 Date: Mon, 21 Jul 2025 21:18:04 +0530 Subject: [PATCH 2/2] Added the samples SVG to PDF/Image and performance testing sample --- .../Controllers/HomeController.cs | 74 + .../Models/ErrorViewModel.cs | 9 + .../Syncfusion_HTMLtoPDF/Program.cs | 27 + .../Properties/launchSettings.json | 38 + .../Syncfusion_HTMLtoPDF.csproj | 13 + .../Syncfusion_HTMLtoPDF.csproj.user | 6 + .../Syncfusion_HTMLtoPDF.sln | 25 + .../Views/Home/Index.cshtml | 13 + .../Views/Home/Privacy.cshtml | 6 + .../Views/Shared/Error.cshtml | 25 + .../Views/Shared/_Layout.cshtml | 49 + .../Views/Shared/_Layout.cshtml.css | 48 + .../Shared/_ValidationScriptsPartial.cshtml | 2 + .../Views/_ViewImports.cshtml | 3 + .../Views/_ViewStart.cshtml | 3 + .../appsettings.Development.json | 8 + .../Syncfusion_HTMLtoPDF/appsettings.json | 9 + .../wwwroot/Data/HtmlSample.html | 626 + .../wwwroot/Data/HtmlSample_FiveHundred.html | 31453 ++++++++ .../wwwroot/Data/HtmlSample_Hundred.html | 6635 ++ .../wwwroot/Data/HtmlSample_Thousand.html | 60119 ++++++++++++++++ .../Syncfusion_HTMLtoPDF/wwwroot/css/site.css | 22 + .../Syncfusion_HTMLtoPDF/wwwroot/favicon.ico | Bin 0 -> 5430 bytes .../Syncfusion_HTMLtoPDF/wwwroot/js/site.js | 4 + .../wwwroot/lib/bootstrap/LICENSE | 22 + .../lib/bootstrap/dist/css/bootstrap-grid.css | 4997 ++ .../bootstrap/dist/css/bootstrap-grid.css.map | 1 + .../bootstrap/dist/css/bootstrap-grid.min.css | 7 + .../dist/css/bootstrap-grid.min.css.map | 1 + .../bootstrap/dist/css/bootstrap-grid.rtl.css | 4996 ++ .../dist/css/bootstrap-grid.rtl.css.map | 1 + .../dist/css/bootstrap-grid.rtl.min.css | 7 + .../dist/css/bootstrap-grid.rtl.min.css.map | 1 + .../bootstrap/dist/css/bootstrap-reboot.css | 427 + .../dist/css/bootstrap-reboot.css.map | 1 + .../dist/css/bootstrap-reboot.min.css | 8 + .../dist/css/bootstrap-reboot.min.css.map | 1 + .../dist/css/bootstrap-reboot.rtl.css | 424 + .../dist/css/bootstrap-reboot.rtl.css.map | 1 + .../dist/css/bootstrap-reboot.rtl.min.css | 8 + .../dist/css/bootstrap-reboot.rtl.min.css.map | 1 + .../dist/css/bootstrap-utilities.css | 4866 ++ .../dist/css/bootstrap-utilities.css.map | 1 + .../dist/css/bootstrap-utilities.min.css | 7 + .../dist/css/bootstrap-utilities.min.css.map | 1 + .../dist/css/bootstrap-utilities.rtl.css | 4857 ++ .../dist/css/bootstrap-utilities.rtl.css.map | 1 + .../dist/css/bootstrap-utilities.rtl.min.css | 7 + .../css/bootstrap-utilities.rtl.min.css.map | 1 + .../lib/bootstrap/dist/css/bootstrap.css | 11221 +++ .../lib/bootstrap/dist/css/bootstrap.css.map | 1 + .../lib/bootstrap/dist/css/bootstrap.min.css | 7 + .../bootstrap/dist/css/bootstrap.min.css.map | 1 + .../lib/bootstrap/dist/css/bootstrap.rtl.css | 11197 +++ .../bootstrap/dist/css/bootstrap.rtl.css.map | 1 + .../bootstrap/dist/css/bootstrap.rtl.min.css | 7 + .../dist/css/bootstrap.rtl.min.css.map | 1 + .../lib/bootstrap/dist/js/bootstrap.bundle.js | 6780 ++ .../bootstrap/dist/js/bootstrap.bundle.js.map | 1 + .../bootstrap/dist/js/bootstrap.bundle.min.js | 7 + .../dist/js/bootstrap.bundle.min.js.map | 1 + .../lib/bootstrap/dist/js/bootstrap.esm.js | 4977 ++ .../bootstrap/dist/js/bootstrap.esm.js.map | 1 + .../bootstrap/dist/js/bootstrap.esm.min.js | 7 + .../dist/js/bootstrap.esm.min.js.map | 1 + .../lib/bootstrap/dist/js/bootstrap.js | 5026 ++ .../lib/bootstrap/dist/js/bootstrap.js.map | 1 + .../lib/bootstrap/dist/js/bootstrap.min.js | 7 + .../bootstrap/dist/js/bootstrap.min.js.map | 1 + .../jquery-validation-unobtrusive/LICENSE.txt | 23 + .../jquery.validate.unobtrusive.js | 435 + .../jquery.validate.unobtrusive.min.js | 8 + .../wwwroot/lib/jquery-validation/LICENSE.md | 22 + .../dist/additional-methods.js | 1512 + .../dist/additional-methods.min.js | 4 + .../jquery-validation/dist/jquery.validate.js | 1661 + .../dist/jquery.validate.min.js | 4 + .../wwwroot/lib/jquery/LICENSE.txt | 21 + .../wwwroot/lib/jquery/dist/jquery.js | 10881 +++ .../wwwroot/lib/jquery/dist/jquery.min.js | 2 + .../wwwroot/lib/jquery/dist/jquery.min.map | 1 + SVG_to_Image/SVG_to_Image.sln | 22 + SVG_to_Image/SVG_to_Image/Input.svg | 135 + SVG_to_Image/SVG_to_Image/Program.cs | 11 + SVG_to_Image/SVG_to_Image/SVG_to_Image.csproj | 14 + SVG_to_PDF/SVG_to_PDF.sln | 22 + SVG_to_PDF/SVG_to_PDF/Input.svg | 135 + SVG_to_PDF/SVG_to_PDF/Program.cs | 12 + SVG_to_PDF/SVG_to_PDF/SVG_to_PDF.csproj | 14 + 89 files changed, 174047 insertions(+) create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/Controllers/HomeController.cs create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/Models/ErrorViewModel.cs create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/Program.cs create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/Properties/launchSettings.json create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/Syncfusion_HTMLtoPDF.csproj create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/Syncfusion_HTMLtoPDF.csproj.user create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/Syncfusion_HTMLtoPDF.sln create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/Views/Home/Index.cshtml create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/Views/Home/Privacy.cshtml create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/Views/Shared/Error.cshtml create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/Views/Shared/_Layout.cshtml create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/Views/Shared/_Layout.cshtml.css create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/Views/Shared/_ValidationScriptsPartial.cshtml create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/Views/_ViewImports.cshtml create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/Views/_ViewStart.cshtml create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/appsettings.Development.json create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/appsettings.json create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data/HtmlSample.html create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data/HtmlSample_FiveHundred.html create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data/HtmlSample_Hundred.html create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data/HtmlSample_Thousand.html create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/css/site.css create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/favicon.ico create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/js/site.js create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/LICENSE create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.min.css.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.css.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.rtl.min.css.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.css.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.min.css.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.css.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-utilities.rtl.min.css.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap.css create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap.css.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap.min.css.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.css.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap.rtl.min.css.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.js.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/js/bootstrap.bundle.min.js.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.js.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/js/bootstrap.esm.min.js.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/js/bootstrap.js create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/js/bootstrap.js.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/js/bootstrap.min.js.map create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/jquery-validation-unobtrusive/LICENSE.txt create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.js create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/jquery-validation-unobtrusive/jquery.validate.unobtrusive.min.js create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/jquery-validation/LICENSE.md create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/jquery-validation/dist/additional-methods.js create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/jquery-validation/dist/additional-methods.min.js create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/jquery-validation/dist/jquery.validate.js create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/jquery-validation/dist/jquery.validate.min.js create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/jquery/LICENSE.txt create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/jquery/dist/jquery.js create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/jquery/dist/jquery.min.js create mode 100644 Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/jquery/dist/jquery.min.map create mode 100644 SVG_to_Image/SVG_to_Image.sln create mode 100644 SVG_to_Image/SVG_to_Image/Input.svg create mode 100644 SVG_to_Image/SVG_to_Image/Program.cs create mode 100644 SVG_to_Image/SVG_to_Image/SVG_to_Image.csproj create mode 100644 SVG_to_PDF/SVG_to_PDF.sln create mode 100644 SVG_to_PDF/SVG_to_PDF/Input.svg create mode 100644 SVG_to_PDF/SVG_to_PDF/Program.cs create mode 100644 SVG_to_PDF/SVG_to_PDF/SVG_to_PDF.csproj diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/Controllers/HomeController.cs b/Performance_Testing/Syncfusion_HTMLtoPDF/Controllers/HomeController.cs new file mode 100644 index 0000000..04e3eb6 --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/Controllers/HomeController.cs @@ -0,0 +1,74 @@ +using Microsoft.AspNetCore.Mvc; +using Syncfusion.HtmlConverter; +using Syncfusion.Pdf; +using Syncfusion_HTMLtoPDF.Models; +using System.Diagnostics; +using System.IO; + +namespace Syncfusion_HTMLtoPDF.Controllers +{ + public class HomeController : Controller + { + private readonly Microsoft.AspNetCore.Hosting.IHostingEnvironment _hostingEnvironment; + public HomeController(Microsoft.AspNetCore.Hosting.IHostingEnvironment hostingEnvironment) + { + _hostingEnvironment = hostingEnvironment; + } + public IActionResult Index() + { + return View(); + } + public IActionResult ConvertToPdf() + { + + string fileName = "HtmlSample_Thousand"; + //string fileName = "HtmlSample"; + //string fileName = "HtmlSample_FiveHundred"; + //string fileName = "HtmlSample_Hundred"; + double totalTime = 0; + string ConsoleLog = ""; + MemoryStream stream = null; + for (int i = 0; i < 5; i++) + { + HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); + BlinkConverterSettings settings = new BlinkConverterSettings(); + settings.AdditionalDelay = 0; + settings.Margin.All = 0; + settings.Scale = 1.0f; + htmlConverter.ConverterSettings = settings; + string htmlFilePath = Path.Combine(_hostingEnvironment.WebRootPath,"Data", fileName + ".html"); + Stopwatch watch = new Stopwatch(); + watch.Start(); + //Convert URL to PDF + PdfDocument document = htmlConverter.Convert(htmlFilePath); + watch.Stop(); + totalTime += watch.Elapsed.TotalSeconds; + ConsoleLog+=(i + 1) + " conversion time:" + watch.Elapsed.TotalSeconds+"\n"; + + if (i == 0) + { + using (stream = new MemoryStream()) + { + document.Save(stream); + document.Close(true); + } + } + } + double averageTime = totalTime / 5; + ConsoleLog+="Average conversion time:" + averageTime+"\n"; + System.IO.File.WriteAllText(Path.Combine(_hostingEnvironment.WebRootPath, "Data", fileName + ".txt"), ConsoleLog); + return File(stream.ToArray(), System.Net.Mime.MediaTypeNames.Application.Pdf, "HTML-to-PDF.pdf"); + } + + public IActionResult Privacy() + { + return View(); + } + + [ResponseCache(Duration = 0, Location = ResponseCacheLocation.None, NoStore = true)] + public IActionResult Error() + { + return View(new ErrorViewModel { RequestId = Activity.Current?.Id ?? HttpContext.TraceIdentifier }); + } + } +} diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/Models/ErrorViewModel.cs b/Performance_Testing/Syncfusion_HTMLtoPDF/Models/ErrorViewModel.cs new file mode 100644 index 0000000..7f59288 --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/Models/ErrorViewModel.cs @@ -0,0 +1,9 @@ +namespace Syncfusion_HTMLtoPDF.Models +{ + public class ErrorViewModel + { + public string? RequestId { get; set; } + + public bool ShowRequestId => !string.IsNullOrEmpty(RequestId); + } +} diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/Program.cs b/Performance_Testing/Syncfusion_HTMLtoPDF/Program.cs new file mode 100644 index 0000000..0727468 --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/Program.cs @@ -0,0 +1,27 @@ +var builder = WebApplication.CreateBuilder(args); + +// Add services to the container. +builder.Services.AddControllersWithViews(); + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +if (!app.Environment.IsDevelopment()) +{ + app.UseExceptionHandler("/Home/Error"); + // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts. + app.UseHsts(); +} + +app.UseHttpsRedirection(); +app.UseStaticFiles(); + +app.UseRouting(); + +app.UseAuthorization(); + +app.MapControllerRoute( + name: "default", + pattern: "{controller=Home}/{action=Index}/{id?}"); + +app.Run(); diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/Properties/launchSettings.json b/Performance_Testing/Syncfusion_HTMLtoPDF/Properties/launchSettings.json new file mode 100644 index 0000000..91b6e9a --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/Properties/launchSettings.json @@ -0,0 +1,38 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:65381", + "sslPort": 44317 + } + }, + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "http://localhost:5083", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "applicationUrl": "https://localhost:7010;http://localhost:5083", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/Syncfusion_HTMLtoPDF.csproj b/Performance_Testing/Syncfusion_HTMLtoPDF/Syncfusion_HTMLtoPDF.csproj new file mode 100644 index 0000000..e865f5e --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/Syncfusion_HTMLtoPDF.csproj @@ -0,0 +1,13 @@ + + + + net8.0 + enable + enable + + + + + + + diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/Syncfusion_HTMLtoPDF.csproj.user b/Performance_Testing/Syncfusion_HTMLtoPDF/Syncfusion_HTMLtoPDF.csproj.user new file mode 100644 index 0000000..9ff5820 --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/Syncfusion_HTMLtoPDF.csproj.user @@ -0,0 +1,6 @@ + + + + https + + \ No newline at end of file diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/Syncfusion_HTMLtoPDF.sln b/Performance_Testing/Syncfusion_HTMLtoPDF/Syncfusion_HTMLtoPDF.sln new file mode 100644 index 0000000..f4872f7 --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/Syncfusion_HTMLtoPDF.sln @@ -0,0 +1,25 @@ + +Microsoft Visual Studio Solution File, Format Version 12.00 +# Visual Studio Version 17 +VisualStudioVersion = 17.10.34916.146 +MinimumVisualStudioVersion = 10.0.40219.1 +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Syncfusion_HTMLtoPDF", "Syncfusion_HTMLtoPDF.csproj", "{02031B6D-6142-4AE3-BB08-E111536F1131}" +EndProject +Global + GlobalSection(SolutionConfigurationPlatforms) = preSolution + Debug|Any CPU = Debug|Any CPU + Release|Any CPU = Release|Any CPU + EndGlobalSection + GlobalSection(ProjectConfigurationPlatforms) = postSolution + {02031B6D-6142-4AE3-BB08-E111536F1131}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {02031B6D-6142-4AE3-BB08-E111536F1131}.Debug|Any CPU.Build.0 = Debug|Any CPU + {02031B6D-6142-4AE3-BB08-E111536F1131}.Release|Any CPU.ActiveCfg = Release|Any CPU + {02031B6D-6142-4AE3-BB08-E111536F1131}.Release|Any CPU.Build.0 = Release|Any CPU + EndGlobalSection + GlobalSection(SolutionProperties) = preSolution + HideSolutionNode = FALSE + EndGlobalSection + GlobalSection(ExtensibilityGlobals) = postSolution + SolutionGuid = {75287BD0-75CD-42F6-A03B-9F7B108D23D0} + EndGlobalSection +EndGlobal diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/Views/Home/Index.cshtml b/Performance_Testing/Syncfusion_HTMLtoPDF/Views/Home/Index.cshtml new file mode 100644 index 0000000..4f8b791 --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/Views/Home/Index.cshtml @@ -0,0 +1,13 @@ +@{ + ViewData["Title"] = "Home Page"; +} + +@{ + Html.BeginForm("ConvertToPdf", "Home", FormMethod.Post); + { +
+ +
+ } + Html.EndForm(); +} diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/Views/Home/Privacy.cshtml b/Performance_Testing/Syncfusion_HTMLtoPDF/Views/Home/Privacy.cshtml new file mode 100644 index 0000000..af4fb19 --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/Views/Home/Privacy.cshtml @@ -0,0 +1,6 @@ +@{ + ViewData["Title"] = "Privacy Policy"; +} +

@ViewData["Title"]

+ +

Use this page to detail your site's privacy policy.

diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/Views/Shared/Error.cshtml b/Performance_Testing/Syncfusion_HTMLtoPDF/Views/Shared/Error.cshtml new file mode 100644 index 0000000..a1e0478 --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/Views/Shared/Error.cshtml @@ -0,0 +1,25 @@ +@model ErrorViewModel +@{ + ViewData["Title"] = "Error"; +} + +

Error.

+

An error occurred while processing your request.

+ +@if (Model.ShowRequestId) +{ +

+ Request ID: @Model.RequestId +

+} + +

Development Mode

+

+ Swapping to Development environment will display more detailed information about the error that occurred. +

+

+ The Development environment shouldn't be enabled for deployed applications. + It can result in displaying sensitive information from exceptions to end users. + For local debugging, enable the Development environment by setting the ASPNETCORE_ENVIRONMENT environment variable to Development + and restarting the app. +

diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/Views/Shared/_Layout.cshtml b/Performance_Testing/Syncfusion_HTMLtoPDF/Views/Shared/_Layout.cshtml new file mode 100644 index 0000000..bd9d693 --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/Views/Shared/_Layout.cshtml @@ -0,0 +1,49 @@ + + + + + + @ViewData["Title"] - Syncfusion_HTMLtoPDF + + + + + +
+ +
+
+
+ @RenderBody() +
+
+ +
+
+ © 2024 - Syncfusion_HTMLtoPDF - Privacy +
+
+ + + + @await RenderSectionAsync("Scripts", required: false) + + diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/Views/Shared/_Layout.cshtml.css b/Performance_Testing/Syncfusion_HTMLtoPDF/Views/Shared/_Layout.cshtml.css new file mode 100644 index 0000000..c187c02 --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/Views/Shared/_Layout.cshtml.css @@ -0,0 +1,48 @@ +/* Please see documentation at https://learn.microsoft.com/aspnet/core/client-side/bundling-and-minification +for details on configuring this project to bundle and minify static web assets. */ + +a.navbar-brand { + white-space: normal; + text-align: center; + word-break: break-all; +} + +a { + color: #0077cc; +} + +.btn-primary { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} + +.nav-pills .nav-link.active, .nav-pills .show > .nav-link { + color: #fff; + background-color: #1b6ec2; + border-color: #1861ac; +} + +.border-top { + border-top: 1px solid #e5e5e5; +} +.border-bottom { + border-bottom: 1px solid #e5e5e5; +} + +.box-shadow { + box-shadow: 0 .25rem .75rem rgba(0, 0, 0, .05); +} + +button.accept-policy { + font-size: 1rem; + line-height: inherit; +} + +.footer { + position: absolute; + bottom: 0; + width: 100%; + white-space: nowrap; + line-height: 60px; +} diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/Views/Shared/_ValidationScriptsPartial.cshtml b/Performance_Testing/Syncfusion_HTMLtoPDF/Views/Shared/_ValidationScriptsPartial.cshtml new file mode 100644 index 0000000..5a16d80 --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/Views/Shared/_ValidationScriptsPartial.cshtml @@ -0,0 +1,2 @@ + + diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/Views/_ViewImports.cshtml b/Performance_Testing/Syncfusion_HTMLtoPDF/Views/_ViewImports.cshtml new file mode 100644 index 0000000..50e6862 --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/Views/_ViewImports.cshtml @@ -0,0 +1,3 @@ +@using Syncfusion_HTMLtoPDF +@using Syncfusion_HTMLtoPDF.Models +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/Views/_ViewStart.cshtml b/Performance_Testing/Syncfusion_HTMLtoPDF/Views/_ViewStart.cshtml new file mode 100644 index 0000000..a5f1004 --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/Views/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "_Layout"; +} diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/appsettings.Development.json b/Performance_Testing/Syncfusion_HTMLtoPDF/appsettings.Development.json new file mode 100644 index 0000000..0c208ae --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/appsettings.json b/Performance_Testing/Syncfusion_HTMLtoPDF/appsettings.json new file mode 100644 index 0000000..10f68b8 --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/appsettings.json @@ -0,0 +1,9 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + }, + "AllowedHosts": "*" +} diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data/HtmlSample.html b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data/HtmlSample.html new file mode 100644 index 0000000..380ccf4 --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data/HtmlSample.html @@ -0,0 +1,626 @@ + + + + + +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ + diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data/HtmlSample_FiveHundred.html b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data/HtmlSample_FiveHundred.html new file mode 100644 index 0000000..61e89a9 --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data/HtmlSample_FiveHundred.html @@ -0,0 +1,31453 @@ + + + + + +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ + +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ + +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ + +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ + +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data/HtmlSample_Hundred.html b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data/HtmlSample_Hundred.html new file mode 100644 index 0000000..3c1e6ee --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data/HtmlSample_Hundred.html @@ -0,0 +1,6635 @@ + + + + + +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + + + +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + + + +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data/HtmlSample_Thousand.html b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data/HtmlSample_Thousand.html new file mode 100644 index 0000000..9011308 --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/Data/HtmlSample_Thousand.html @@ -0,0 +1,60119 @@ + + + + + +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ +
+ +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Rotate page

+ +

To set the page rotation when converting HTML to PDF, utilize the PageRotateAngle property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

When converting HTML to PDF, you can set an HTML file as header and footer. Use the HtmlHeader and HtmlFooter properties within the BlinkConverterSettings class to do this.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Adjust the HTML margin top and bottom values according to the height of the HTML header and footer, as well as the margin settings.

+
+ +

Inject custom CSS

+ +

The Blink rendering engine supports the injection of custom CSS to be applied to HTML or a URL before rendering it into a PDF document using the ‘Css’ property of the BlinkConverterSettings class

+ +

You can download a complete working sample from GitHub.

+ +

Inject custom JavaScript

+ +

The Blink rendering engine offers support for injecting custom JavaScript to be applied to the HTML or a URL before rendering it into a PDF document using the ‘JavaScript’ property of the BlinkConverterSettings class.

+ +

You can download a complete working sample from GitHub.

+ +

Performance optimization

+ +

The Blink rendering engine provides support for reusing the browser process to optimize the HTML to a PDF performance for multiple operations using the ‘ReuseBrowserProcess’ property of the HtmlToPdfConverter class.

+ +

You can download a complete working sample from GitHub.

+ +

Temporary path

+ +

The Blink HTML converter launching Chrome browser to perform conversion. While launching Chrome browser, temporary files are created in a temporary folder.

+ +

By default, HTML converter takes system temporary path (C:\Users<<username»\AppData\Local\Temp or C:\Windows\Temp) to perform the conversion.

+ +

The temporary path can be changed by using the TempPath property of BlinkConverterSettings. If this property is set, the converter uses the provided path to perform the conversion. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + +

When converting HTML to a PDF document, the default reference to the blink binaries path eliminates the need for manual addition. Nonetheless, if you prefer to manually add the blink binaries path or reference it from a custom location, simply set the path of the BlinkBinaries folder to the BlinkPath property of BlinkConverterSettings.

+ +
+

NOTE

    +
  • The BlinkBinaries will be available in the HTMLConverter installed location ($SystemDrive\Program Files (x86)\Syncfusion\HTMLConverter\xx.x.x.xx\BlinkBinaries)
  • +
  • The BlinkBinaries also available in NuGet package installed location if you are using Blink HTML converter from NuGet packages.
  • +
+
+ +

You can download a complete working sample from GitHub.

+ +

Scale

+

Resizing the HTML content within a PDF can be achieved through the utilization of the Scale property of Blink in HTML Converter.

+ +
+

NOTE

The scaling factor should be within the range of 0.1 to 2.0.

+
+ + +

You can download a complete working sample from GitHub.

+ +

Timeout

+ +

HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.

+ + +

You can download a complete working sample from GitHub.

+ +

Accessible PDF

+ +

The Blink HTML converter supports preserving tags from HTML to PDF using the EnableAccessibilityTags property in the BlinkConverterSettings class. Refer to the following code sample.

+ +
+

NOTE

This support fully depends on the Chromium headless browser. Our converter preserves the tags, same as the saved PDF from Chrome.

+
+ +

You can download a complete working sample from GitHub.

+ +

Image Background

+ +

The Blink HTML converter support adding the image background from HTML to Image using the ImageBackgroundColor property in BlinkConverterSettings class. Refer to the following code sample.

+ +

You can download a complete working sample from GitHub.

+ + ConvertHTMLtoPDF + +
+ +

Converting HTML to PDF

+ +

The HTML to PDF converter is a .NET library for converting webpages, SVG, MHTML, and HTML files to PDF using C#. It uses popular rendering engines such as Blink (Google Chrome) and is reliable and accurate. The result preserves all graphics, images, text, fonts, and the layout of the original HTML document or webpage.

+ + ConvertHTMLtoPDF + +

Syncfusion HTML-to-PDF converter will work seamlessly in various platforms like Azure Cloud or web apps, Azure Functions, Amazon Web Service (AWS), Docker, WinForms, WPF, ASP.NET MVC, ASP.NET Core with Windows, Linux, and macOS.

+ +

Key features for HTML Converter

+ + + Image +

Install HTML to PDF .NET library to your project

+ +

Include the HTML to PDF converter in your project using two approaches.

+
    +
  • NuGet packages (Recommended)
  • +
  • Assemblies.
  • +
+ + + +

Directly install the NuGet packages to your .NET application from nuget.org.

+ +
+

NOTE

The HTML to PDF converter library internally uses the Blink rendering engine for the conversion. The binaries will differ for Windows, Linux, Mac, and AWS. So, separate packages are provided based on OS. Include the packages based on your requirement.

+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ (.NET Core, .NET 5, .NET 6) Windows + +

Syncfusion.HtmlToPdfConverter.Net.Windows.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Linux + +

Syncfusion.HtmlToPdfConverter.Net.Linux.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) Mac + +

Syncfusion.HtmlToPdfConverter.Net.Mac.nupkg

+ +
+ (.NET Core, .NET 5, .NET 6) AWS + +

Syncfusion.HtmlToPdfConverter.Net.Aws.nupkg

+ +
+ +

Use the following packages for .NET Framework targeted applications. If you are using other Syncfusion libraries or components, use the HTML to PDF converter library with the same platform packages.

+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
Platform(s)NuGet Package
+ Windows Forms + +

Syncfusion.HtmlToPdfConverter.WinForms.nupkg

+ +
+ WPF + +

Syncfusion.HtmlToPdfConverter.Wpf.nupkg

+ +
+ ASP.NET + +

Syncfusion.HtmlToPdfConverter.AspNet.nupkg

+ +
+ ASP.NET MVC + +

Syncfusion.HtmlToPdfConverter.AspNet.Mvc5.nupkg

+ +
+ +

Assemblies Required

+ +

Get the following required assemblies by downloading the HTML converter installer. Download and install the HTML converter for Windows, Linux, and Mac, respectively. Please refer to the advanced installation steps for more details.

+ + + + + + + + + + + + + + + + + + + + + + + +
+ Platforms + + Assemblies +
+ WinForms + WPF + ASP.NET + ASP.NET MVC + +
    +
  • Syncfusion.Compression.Base.dll
  • +
  • Syncfusion.Pdf.Base.dll
  • +
  • Syncfusion.HtmlConverter.Base.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ .NET/.NET Core + Blazor + +
    +
  • Syncfusion.Compression.Portable.dll
  • +
  • Syncfusion.Pdf.Portable.dll
  • +
  • Syncfusion.HtmlConverter.Portable.dll
  • +
  • Newtonsoft.Json package (v13.0.1 or above)
  • +
+
+ + Convert HTML to PDF + +

Convert HTML to PDF in Linux

+ +

HTML to PDF converter .NET library supports conversion in Linux. Refer to this section for more information about HTML to PDF conversion in Linux.

+ +

Convert HTML to PDF in Docker

+ +

HTML to PDF converter .NET library supports conversion in Docker. Refer to this section for more information about HTML to PDF conversion in Docker.

+ +

Convert HTML to PDF in Mac

+ +

HTML to PDF converter .NET library supports conversion in Mac. Refer to this section for more information about HTML to PDF conversion in Mac.

+ +

Convert HTML to PDF in ASP.NET Core

+ +

HTML to PDF converter .NET library supports conversion in ASP.NET Core. Refer to this section for more information about HTML to PDF conversion in ASP.NET Core.

+ +

Convert HTML to PDF in ASP.NET MVC

+

HTML to PDF converter .NET library supports conversion in ASP.NET MVC. Refer to this section for more information about HTML to PDF conversion in ASP.NET MVC.

+ +

Convert HTML to PDF in Blazor

+

HTML to PDF converter .NET library supports conversion in Blazor. Refer to this section for more information about HTML to PDF conversion in Blazor.

+ +

Convert HTML to PDF in Azure

+

HTML to PDF converter .NET library supports conversion in Azure. Refer to this section for more information about HTML to PDF conversion in Azure.

+ +

Convert HTML to PDF in AWS

+

HTML to PDF converter .NET library supports conversion in AWS. Refer to this section for more information about HTML to PDF conversion in AWS.

+ +

Features

+ +

Refer to this section for more information about features in HTML to PDF converter, you can get the details, code examples and demo from this section.

+ + + +
+

HTML converter Features

+ +

URL to PDF

+ +

To convert website URL or local HTML file to PDF document using Convert method in HtmlToPdfConverter class. refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

HTML String to PDF

+ +

The HTML to PDF converter provides support for converting HTML string to PDF. While converting HTML string to PDF, converter provides option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the above image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location, then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to PDF using Convert method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

URL to Image

+ +

To convert website URL or local HTML file to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML String to Image

+ +

The Blink rendering engine supports converting HTML string to Image. While converting HTML string to Image, converter provides an option to specify the base URL.

+ +

baseURL: Path of the resources (images, style sheets, scripts.,) used in the input HTML string.

+ +

For the following HTML string, the baseURL will be the path of the syncfusion_logo.gif image.

+ +

For example, if the previous image is in “C:/Temp/ HTMLFiles/syncfusion_logo.gif” location then the baseURL will be as follows.

+ +

baseURL: C:/Temp/HTMLFiles/

+ +

To convert the HTML string to Image using ConvertToImage method, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

JavaScript

+ +

The Blink HTML converter supports enabling or disabling the JavaScript using EnableJavaScript property in BlinkConverterSettings class. while converting HTML to PDF. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Additional delay

+ +

The Blink HTML converter provides an option to set the AdditionalDelay property while converting HTML to PDF. Additional delay is the waiting time of the converter for loading the external resources (styles, scripts, images and more). Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

The Blink HTML converter support preserving URL links from HTML to PDF using EnableHyperLink property in BlinkConverterSettings class. Refer to the following code snippet.

+ +

You can download a complete working sample from GitHub.

+ +

Bookmarks

+ +

The Blink HTML converter provides support for creating bookmarks automatically by enabling the EnableBookmarks property.

+ +
+

NOTE

The bookmarks are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents

+ +

The Blink HTML converter provides support for creating a table of contents automatically by using the EnableToc property.

+ +
+

NOTE

TOC are added from the <h> tag, it supports from <h1> to <h6>.

+
+ +

You can download a complete working sample from GitHub.

+ +

Table of contents with custom style

+ +

The Blink HTML converter provides support for customizing the table of contents style. Each header tag style can be customized by using HtmlToPdfTocStyle.

+ +

You can download a complete working sample from GitHub.

+ +

Media Type

+ +

The Blink HTML Converter allows selection of media type while converting HTML to PDF. Blink rendering engine supports Screen and Print media types. Refer to the following code snippet to select Print MediaType.

+ +

You can download a complete working sample from GitHub.

+ +
+

NOTE

Print MediaType MediaType enables the repeat html table header and footer support on every PDF page.

+
+ +

HTML Form to PDF Form

+ +

Blink rendering engine provides support for converting HTML forms to PDF fillable forms automatically by using the EnableForm property. To convert HTML form to PDF form, refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Windows authentication

+ +

The webpage you want to convert may protected with windows authentication. Blink rendering engine provides support for converting the Windows Authenticated webpage to PDF document by providing the Username and Password property in BlinkConverterSettings class. Refer to the following code example.

+ + Convert HTML to PDF + +

You can download a complete working sample from GitHub.

+ +

Form authentication

+ +

The Blink HTML converter provides support for form authentication by using Cookies property in BlinkConverterSettings class. The cookies are send to web server for form authentication when the HTML page is requested. Each cookie is represented by a name and value. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Token-based authentication

+ +

The Blink HTML converter supports token-based authentication by using the HttpRequestHeaders property in BlinkConverterSettings class.. The token values will be send to web server when the HTML page is requested. Refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Offline conversion

+ +

The Blink HTML converter supports converting HTML to PDF in offline mode using EnableOfflineMode property in BlinkConverterSettings class. While converting HTML to PDF in offline mode, the converter does not access the resources from the internet. This may increase the performance in slow internet connection.

+ +
+

NOTE

If an online URL is converted in offline mode, the converter will generate empty PDF as it will not try to load any resource from online.

+
+ +

You can download a complete working sample from GitHub.

+ +

HTTP GET and POST

+ +

+ The Blink HTML converter supports transmitting the parameter to the webpage. There are two methods to access a webpage. By default, Blink uses GET method. By using HTTP GET method, the parameters can be passed in the query string. In POST method, the parameters can be passed by using the HttpPostFields property.
+ Refer to the following code snippet to access a webpage using HTTP POST. +

+ +

You can download a complete working sample from GitHub.

+ +

You can download a complete working sample from GitHub.

+ +

System proxy

+ +

By default, the Blink rendering engine use system proxy settings for converting HTML to PDF. If proxy server is configured in the system, then the rendering engine automatically use the same settings for the conversion. Follow the below steps to set the system proxy settings:

+ +
    +
  1. Control Panel > Network and Internet > Internet Options.
  2. +
  3. From Internet properties window, open LAN settings under connections tab.
  4. +
  5. Then, set proxy server address and port in LAN settings window.
  6. +
+ +

Manual proxy

+ +

You can specify the manual proxy settings for the conversion using the ProxySettings property. Refer to the following code snippet to configure the manual proxy settings for the conversion.

+ +

Viewport

+ +

+ Adjusting the HTML content size in PDF is possible by using the ViewPortSize property of Blink HTML converter.
+ Refer to the following code snippet to adjust Blink viewport. +

+ +

You can download a complete working sample from GitHub.

+ +

Partial webpage to PDF

+ +

The Blink rendering engine provides support for converting only the part of an HTML document like a table, div, or image elements from the URL/HTML string. You can convert the particular HTML element using ConvertPartialHtml method by specifying the HTML element ID, refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

HTML to single PDF page

+ +

By using this SinglePageLayout property, you can render the whole HTML content into a single PDF page. The PDF page size is limited to 14400 points. There are two options to enable this feature since this is disabled by default.

+ +
+
1. FitWidth
+2. FitHeight
+
+
+ +

+ Fit width option: Using this option, the HTML converter adjusts the PDF page height based on the HTML content height. PDF page width remains constant for this option.
+ Fit height option: Using this option, the HTML converter scale the HTML content and PDF page width to render the whole HTML content within the height. PDF page height remains constant for this option. +

+ +

Layout Result

+ +

Getting height of the HTML content in PDF document is possible by using the PdfLayoutResult class. Using this result, you can add contents after converting HTML to PDF. Refer to the following code example.

+ +

Windows status

+ +

Windows status can be used instead of additional delay. In additional delay, the amount of time required for loading the resources is unpredictable. This behavior can be avoided by using WindowStatus property.

+ +
+

NOTE

This feature requires changes in the HTML file.

+
+ +
+

NOTE

If windows status does not match in code and HTML, then the converter will meet with deadlock.

+
+ +

You can download a complete working sample from GitHub.

+ +

Page size customization

+ +

To set the page size when converting HTML to PDF, utilize the PdfPageSize property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Margin customization

+ +

To set the margin when converting HTML to PDF, utilize the Margin property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + +

To set the header and footer when converting HTML to PDF, utilize the PdfHeader and PdfFooter properties in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ +

Page orientation customization

+ +

To set the Orientation when converting HTML to PDF, utilize the Orientation property in the BlinkConverterSettings class. Please refer to the following code example.

+ +

You can download a complete working sample from GitHub.

+ + + diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/css/site.css b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/css/site.css new file mode 100644 index 0000000..f8d98fc --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/css/site.css @@ -0,0 +1,22 @@ +html { + font-size: 14px; +} + +@media (min-width: 768px) { + html { + font-size: 16px; + } +} + +.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus { + box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb; +} + +html { + position: relative; + min-height: 100%; +} + +body { + margin-bottom: 60px; +} \ No newline at end of file diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/favicon.ico b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..63e859b476eff5055e0e557aaa151ca8223fbeef GIT binary patch literal 5430 zcmc&&Yj2xp8Fqnv;>&(QB_ve7>^E#o2mu=cO~A%R>DU-_hfbSRv1t;m7zJ_AMrntN zy0+^f&8be>q&YYzH%(88lQ?#KwiCzaCO*ZEo%j&v;<}&Lj_stKTKK>#U3nin@AF>w zb3ONSAFR{u(S1d?cdw53y}Gt1b-Hirbh;;bm(Rcbnoc*%@jiaXM|4jU^1WO~`TYZ~ zC-~jh9~b-f?fX`DmwvcguQzn*uV}c^Vd&~?H|RUs4Epv~gTAfR(B0lT&?RWQOtduM z^1vUD9{HQsW!{a9|0crA34m7Z6lpG^}f6f?={zD+ zXAzk^i^aKN_}s2$eX81wjSMONE#WVdzf|MT)Ap*}Vsn!XbvsI#6o&ij{87^d%$|A{ z=F{KB%)g%@z76yBzbb7seW**Ju8r4e*Z3PWNX3_tTDgzZatz7)Q6ytwB%@&@A|XT; zecM`Snxx5po$C)%yCP!KEtos~eOS)@2=kX-RIm)4glMCoagTEFxrBeSX%Euz734Fk z%7)x(k~T!@Hbg_37NSQL!vlTBXoURSzt~I**Zw`&F24fH*&kx=%nvZv|49SC*daD( zIw<~%#=lk8{2-l(BcIjy^Q$Q&m#KlWL9?UG{b8@qhlD z;umc+6p%|NsAT~0@DgV4-NKgQuWPWrmPIK&&XhV&n%`{l zOl^bbWYjQNuVXTXESO)@|iUKVmErPUDfz2Wh`4dF@OFiaCW|d`3paV^@|r^8T_ZxM)Z+$p5qx# z#K=z@%;aBPO=C4JNNGqVv6@UGolIz;KZsAro``Rz8X%vq_gpi^qEV&evgHb_=Y9-l z`)imdx0UC>GWZYj)3+3aKh?zVb}=@%oNzg7a8%kfVl)SV-Amp1Okw&+hEZ3|v(k8vRjXW9?ih`&FFM zV$~{j3IzhtcXk?Mu_!12;=+I7XK-IR2>Yd%VB^?oI9c^E&Chb&&je$NV0P-R;ujkP z;cbLCCPEF6|22NDj=S`F^2e~XwT1ZnRX8ra0#DaFa9-X|8(xNW_+JhD75WnSd7cxo z2>I_J5{c|WPfrgl7E2R)^c}F7ry()Z>$Jhk9CzZxiPKL#_0%`&{MX>P_%b~Dx0D^S z7xP1(DQ!d_Icpk!RN3I1w@~|O1ru#CO==h#9M~S4Chx*@?=EKUPGBv$tmU+7Zs_al z`!jR?6T&Z7(%uVq>#yLu`abWk!FBlnY{RFNHlj~6zh*;@u}+}viRKsD`IIxN#R-X3 z@vxu#EA_m}I503U(8Qmx^}u;)KfGP`O9E1H1Q|xeeksX8jC%@!{YT1)!lWgO=+Y3*jr=iSxvOW1}^HSy=y){tOMQJ@an>sOl4FYniE z;GOxd7AqxZNbYFNqobpv&HVO$c-w!Y*6r;$2oJ~h(a#(Bp<-)dg*mNigX~9rPqcHv z^;c*|Md?tD)$y?6FO$DWl$jUGV`F1G_^E&E>sY*YnA~ruv3=z9F8&&~Xpm<<75?N3 z>x~`I&M9q)O1=zWZHN9hZWx>RQ}zLP+iL57Q)%&_^$Sme^^G7;e-P~CR?kqU#Io#( z(nH1Wn*Ig)|M>WLGrxoU?FZrS`4GO&w;+39A3f8w{{Q7eg|$+dIlNFPAe+tN=FOYU z{A&Fg|H73+w1IK(W=j*L>JQgz$g0 z7JpKXLHIh}#$wm|N`s}o-@|L_`>*(gTQ~)wr3Eap7g%PVNisKw82im;Gdv#85x#s+ zoqqtnwu4ycd>cOQgRh-=aEJbnvVK`}ja%+FZx}&ehtX)n(9nVfe4{mn0bgijUbNr7Tf5X^$*{qh2%`?--%+sbSrjE^;1e3>% zqa%jdY16{Y)a1hSy*mr0JGU05Z%=qlx5vGvTjSpTt6k%nR06q}1DU`SQh_ZAeJ}A@`hL~xvv05U?0%=spP`R>dk?cOWM9^KNb7B?xjex>OZo%JMQQ1Q zB|q@}8RiP@DWn-(fB;phPaIOP2Yp)XN3-Fsn)S3w($4&+p8f5W_f%gac}QvmkHfCj$2=!t`boCvQ zCW;&Dto=f8v##}dy^wg3VNaBy&kCe3N;1|@n@pUaMPT?(aJ9b*(gJ28$}(2qFt$H~u5z94xcIQkcOI++)*exzbrk?WOOOf*|%k5#KV zL=&ky3)Eirv$wbRJ2F2s_ILQY--D~~7>^f}W|Aw^e7inXr#WLI{@h`0|jHud2Y~cI~Yn{r_kU^Vo{1gja * { + box-sizing: border-box; + flex-shrink: 0; + width: 100%; + max-width: 100%; + padding-right: calc(var(--bs-gutter-x) * .5); + padding-left: calc(var(--bs-gutter-x) * .5); + margin-top: var(--bs-gutter-y); +} + +.col { + flex: 1 0 0%; +} + +.row-cols-auto > * { + flex: 0 0 auto; + width: auto; +} + +.row-cols-1 > * { + flex: 0 0 auto; + width: 100%; +} + +.row-cols-2 > * { + flex: 0 0 auto; + width: 50%; +} + +.row-cols-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; +} + +.row-cols-4 > * { + flex: 0 0 auto; + width: 25%; +} + +.row-cols-5 > * { + flex: 0 0 auto; + width: 20%; +} + +.row-cols-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; +} + +.col-auto { + flex: 0 0 auto; + width: auto; +} + +.col-1 { + flex: 0 0 auto; + width: 8.33333333%; +} + +.col-2 { + flex: 0 0 auto; + width: 16.66666667%; +} + +.col-3 { + flex: 0 0 auto; + width: 25%; +} + +.col-4 { + flex: 0 0 auto; + width: 33.33333333%; +} + +.col-5 { + flex: 0 0 auto; + width: 41.66666667%; +} + +.col-6 { + flex: 0 0 auto; + width: 50%; +} + +.col-7 { + flex: 0 0 auto; + width: 58.33333333%; +} + +.col-8 { + flex: 0 0 auto; + width: 66.66666667%; +} + +.col-9 { + flex: 0 0 auto; + width: 75%; +} + +.col-10 { + flex: 0 0 auto; + width: 83.33333333%; +} + +.col-11 { + flex: 0 0 auto; + width: 91.66666667%; +} + +.col-12 { + flex: 0 0 auto; + width: 100%; +} + +.offset-1 { + margin-left: 8.33333333%; +} + +.offset-2 { + margin-left: 16.66666667%; +} + +.offset-3 { + margin-left: 25%; +} + +.offset-4 { + margin-left: 33.33333333%; +} + +.offset-5 { + margin-left: 41.66666667%; +} + +.offset-6 { + margin-left: 50%; +} + +.offset-7 { + margin-left: 58.33333333%; +} + +.offset-8 { + margin-left: 66.66666667%; +} + +.offset-9 { + margin-left: 75%; +} + +.offset-10 { + margin-left: 83.33333333%; +} + +.offset-11 { + margin-left: 91.66666667%; +} + +.g-0, +.gx-0 { + --bs-gutter-x: 0; +} + +.g-0, +.gy-0 { + --bs-gutter-y: 0; +} + +.g-1, +.gx-1 { + --bs-gutter-x: 0.25rem; +} + +.g-1, +.gy-1 { + --bs-gutter-y: 0.25rem; +} + +.g-2, +.gx-2 { + --bs-gutter-x: 0.5rem; +} + +.g-2, +.gy-2 { + --bs-gutter-y: 0.5rem; +} + +.g-3, +.gx-3 { + --bs-gutter-x: 1rem; +} + +.g-3, +.gy-3 { + --bs-gutter-y: 1rem; +} + +.g-4, +.gx-4 { + --bs-gutter-x: 1.5rem; +} + +.g-4, +.gy-4 { + --bs-gutter-y: 1.5rem; +} + +.g-5, +.gx-5 { + --bs-gutter-x: 3rem; +} + +.g-5, +.gy-5 { + --bs-gutter-y: 3rem; +} + +@media (min-width: 576px) { + .col-sm { + flex: 1 0 0%; + } + + .row-cols-sm-auto > * { + flex: 0 0 auto; + width: auto; + } + + .row-cols-sm-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .row-cols-sm-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .row-cols-sm-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .row-cols-sm-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .row-cols-sm-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .row-cols-sm-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .col-sm-auto { + flex: 0 0 auto; + width: auto; + } + + .col-sm-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .col-sm-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .col-sm-3 { + flex: 0 0 auto; + width: 25%; + } + + .col-sm-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .col-sm-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .col-sm-6 { + flex: 0 0 auto; + width: 50%; + } + + .col-sm-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .col-sm-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .col-sm-9 { + flex: 0 0 auto; + width: 75%; + } + + .col-sm-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .col-sm-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .col-sm-12 { + flex: 0 0 auto; + width: 100%; + } + + .offset-sm-0 { + margin-left: 0; + } + + .offset-sm-1 { + margin-left: 8.33333333%; + } + + .offset-sm-2 { + margin-left: 16.66666667%; + } + + .offset-sm-3 { + margin-left: 25%; + } + + .offset-sm-4 { + margin-left: 33.33333333%; + } + + .offset-sm-5 { + margin-left: 41.66666667%; + } + + .offset-sm-6 { + margin-left: 50%; + } + + .offset-sm-7 { + margin-left: 58.33333333%; + } + + .offset-sm-8 { + margin-left: 66.66666667%; + } + + .offset-sm-9 { + margin-left: 75%; + } + + .offset-sm-10 { + margin-left: 83.33333333%; + } + + .offset-sm-11 { + margin-left: 91.66666667%; + } + + .g-sm-0, +.gx-sm-0 { + --bs-gutter-x: 0; + } + + .g-sm-0, +.gy-sm-0 { + --bs-gutter-y: 0; + } + + .g-sm-1, +.gx-sm-1 { + --bs-gutter-x: 0.25rem; + } + + .g-sm-1, +.gy-sm-1 { + --bs-gutter-y: 0.25rem; + } + + .g-sm-2, +.gx-sm-2 { + --bs-gutter-x: 0.5rem; + } + + .g-sm-2, +.gy-sm-2 { + --bs-gutter-y: 0.5rem; + } + + .g-sm-3, +.gx-sm-3 { + --bs-gutter-x: 1rem; + } + + .g-sm-3, +.gy-sm-3 { + --bs-gutter-y: 1rem; + } + + .g-sm-4, +.gx-sm-4 { + --bs-gutter-x: 1.5rem; + } + + .g-sm-4, +.gy-sm-4 { + --bs-gutter-y: 1.5rem; + } + + .g-sm-5, +.gx-sm-5 { + --bs-gutter-x: 3rem; + } + + .g-sm-5, +.gy-sm-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 768px) { + .col-md { + flex: 1 0 0%; + } + + .row-cols-md-auto > * { + flex: 0 0 auto; + width: auto; + } + + .row-cols-md-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .row-cols-md-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .row-cols-md-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .row-cols-md-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .row-cols-md-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .row-cols-md-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .col-md-auto { + flex: 0 0 auto; + width: auto; + } + + .col-md-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .col-md-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .col-md-3 { + flex: 0 0 auto; + width: 25%; + } + + .col-md-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .col-md-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .col-md-6 { + flex: 0 0 auto; + width: 50%; + } + + .col-md-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .col-md-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .col-md-9 { + flex: 0 0 auto; + width: 75%; + } + + .col-md-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .col-md-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .col-md-12 { + flex: 0 0 auto; + width: 100%; + } + + .offset-md-0 { + margin-left: 0; + } + + .offset-md-1 { + margin-left: 8.33333333%; + } + + .offset-md-2 { + margin-left: 16.66666667%; + } + + .offset-md-3 { + margin-left: 25%; + } + + .offset-md-4 { + margin-left: 33.33333333%; + } + + .offset-md-5 { + margin-left: 41.66666667%; + } + + .offset-md-6 { + margin-left: 50%; + } + + .offset-md-7 { + margin-left: 58.33333333%; + } + + .offset-md-8 { + margin-left: 66.66666667%; + } + + .offset-md-9 { + margin-left: 75%; + } + + .offset-md-10 { + margin-left: 83.33333333%; + } + + .offset-md-11 { + margin-left: 91.66666667%; + } + + .g-md-0, +.gx-md-0 { + --bs-gutter-x: 0; + } + + .g-md-0, +.gy-md-0 { + --bs-gutter-y: 0; + } + + .g-md-1, +.gx-md-1 { + --bs-gutter-x: 0.25rem; + } + + .g-md-1, +.gy-md-1 { + --bs-gutter-y: 0.25rem; + } + + .g-md-2, +.gx-md-2 { + --bs-gutter-x: 0.5rem; + } + + .g-md-2, +.gy-md-2 { + --bs-gutter-y: 0.5rem; + } + + .g-md-3, +.gx-md-3 { + --bs-gutter-x: 1rem; + } + + .g-md-3, +.gy-md-3 { + --bs-gutter-y: 1rem; + } + + .g-md-4, +.gx-md-4 { + --bs-gutter-x: 1.5rem; + } + + .g-md-4, +.gy-md-4 { + --bs-gutter-y: 1.5rem; + } + + .g-md-5, +.gx-md-5 { + --bs-gutter-x: 3rem; + } + + .g-md-5, +.gy-md-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 992px) { + .col-lg { + flex: 1 0 0%; + } + + .row-cols-lg-auto > * { + flex: 0 0 auto; + width: auto; + } + + .row-cols-lg-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .row-cols-lg-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .row-cols-lg-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .row-cols-lg-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .row-cols-lg-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .row-cols-lg-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .col-lg-auto { + flex: 0 0 auto; + width: auto; + } + + .col-lg-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .col-lg-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .col-lg-3 { + flex: 0 0 auto; + width: 25%; + } + + .col-lg-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .col-lg-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .col-lg-6 { + flex: 0 0 auto; + width: 50%; + } + + .col-lg-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .col-lg-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .col-lg-9 { + flex: 0 0 auto; + width: 75%; + } + + .col-lg-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .col-lg-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .col-lg-12 { + flex: 0 0 auto; + width: 100%; + } + + .offset-lg-0 { + margin-left: 0; + } + + .offset-lg-1 { + margin-left: 8.33333333%; + } + + .offset-lg-2 { + margin-left: 16.66666667%; + } + + .offset-lg-3 { + margin-left: 25%; + } + + .offset-lg-4 { + margin-left: 33.33333333%; + } + + .offset-lg-5 { + margin-left: 41.66666667%; + } + + .offset-lg-6 { + margin-left: 50%; + } + + .offset-lg-7 { + margin-left: 58.33333333%; + } + + .offset-lg-8 { + margin-left: 66.66666667%; + } + + .offset-lg-9 { + margin-left: 75%; + } + + .offset-lg-10 { + margin-left: 83.33333333%; + } + + .offset-lg-11 { + margin-left: 91.66666667%; + } + + .g-lg-0, +.gx-lg-0 { + --bs-gutter-x: 0; + } + + .g-lg-0, +.gy-lg-0 { + --bs-gutter-y: 0; + } + + .g-lg-1, +.gx-lg-1 { + --bs-gutter-x: 0.25rem; + } + + .g-lg-1, +.gy-lg-1 { + --bs-gutter-y: 0.25rem; + } + + .g-lg-2, +.gx-lg-2 { + --bs-gutter-x: 0.5rem; + } + + .g-lg-2, +.gy-lg-2 { + --bs-gutter-y: 0.5rem; + } + + .g-lg-3, +.gx-lg-3 { + --bs-gutter-x: 1rem; + } + + .g-lg-3, +.gy-lg-3 { + --bs-gutter-y: 1rem; + } + + .g-lg-4, +.gx-lg-4 { + --bs-gutter-x: 1.5rem; + } + + .g-lg-4, +.gy-lg-4 { + --bs-gutter-y: 1.5rem; + } + + .g-lg-5, +.gx-lg-5 { + --bs-gutter-x: 3rem; + } + + .g-lg-5, +.gy-lg-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 1200px) { + .col-xl { + flex: 1 0 0%; + } + + .row-cols-xl-auto > * { + flex: 0 0 auto; + width: auto; + } + + .row-cols-xl-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .row-cols-xl-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .row-cols-xl-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .row-cols-xl-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .row-cols-xl-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .row-cols-xl-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .col-xl-auto { + flex: 0 0 auto; + width: auto; + } + + .col-xl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .col-xl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .col-xl-3 { + flex: 0 0 auto; + width: 25%; + } + + .col-xl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .col-xl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .col-xl-6 { + flex: 0 0 auto; + width: 50%; + } + + .col-xl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .col-xl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .col-xl-9 { + flex: 0 0 auto; + width: 75%; + } + + .col-xl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .col-xl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .col-xl-12 { + flex: 0 0 auto; + width: 100%; + } + + .offset-xl-0 { + margin-left: 0; + } + + .offset-xl-1 { + margin-left: 8.33333333%; + } + + .offset-xl-2 { + margin-left: 16.66666667%; + } + + .offset-xl-3 { + margin-left: 25%; + } + + .offset-xl-4 { + margin-left: 33.33333333%; + } + + .offset-xl-5 { + margin-left: 41.66666667%; + } + + .offset-xl-6 { + margin-left: 50%; + } + + .offset-xl-7 { + margin-left: 58.33333333%; + } + + .offset-xl-8 { + margin-left: 66.66666667%; + } + + .offset-xl-9 { + margin-left: 75%; + } + + .offset-xl-10 { + margin-left: 83.33333333%; + } + + .offset-xl-11 { + margin-left: 91.66666667%; + } + + .g-xl-0, +.gx-xl-0 { + --bs-gutter-x: 0; + } + + .g-xl-0, +.gy-xl-0 { + --bs-gutter-y: 0; + } + + .g-xl-1, +.gx-xl-1 { + --bs-gutter-x: 0.25rem; + } + + .g-xl-1, +.gy-xl-1 { + --bs-gutter-y: 0.25rem; + } + + .g-xl-2, +.gx-xl-2 { + --bs-gutter-x: 0.5rem; + } + + .g-xl-2, +.gy-xl-2 { + --bs-gutter-y: 0.5rem; + } + + .g-xl-3, +.gx-xl-3 { + --bs-gutter-x: 1rem; + } + + .g-xl-3, +.gy-xl-3 { + --bs-gutter-y: 1rem; + } + + .g-xl-4, +.gx-xl-4 { + --bs-gutter-x: 1.5rem; + } + + .g-xl-4, +.gy-xl-4 { + --bs-gutter-y: 1.5rem; + } + + .g-xl-5, +.gx-xl-5 { + --bs-gutter-x: 3rem; + } + + .g-xl-5, +.gy-xl-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 1400px) { + .col-xxl { + flex: 1 0 0%; + } + + .row-cols-xxl-auto > * { + flex: 0 0 auto; + width: auto; + } + + .row-cols-xxl-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .row-cols-xxl-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .row-cols-xxl-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .row-cols-xxl-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .row-cols-xxl-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .row-cols-xxl-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .col-xxl-auto { + flex: 0 0 auto; + width: auto; + } + + .col-xxl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .col-xxl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .col-xxl-3 { + flex: 0 0 auto; + width: 25%; + } + + .col-xxl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .col-xxl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .col-xxl-6 { + flex: 0 0 auto; + width: 50%; + } + + .col-xxl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .col-xxl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .col-xxl-9 { + flex: 0 0 auto; + width: 75%; + } + + .col-xxl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .col-xxl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .col-xxl-12 { + flex: 0 0 auto; + width: 100%; + } + + .offset-xxl-0 { + margin-left: 0; + } + + .offset-xxl-1 { + margin-left: 8.33333333%; + } + + .offset-xxl-2 { + margin-left: 16.66666667%; + } + + .offset-xxl-3 { + margin-left: 25%; + } + + .offset-xxl-4 { + margin-left: 33.33333333%; + } + + .offset-xxl-5 { + margin-left: 41.66666667%; + } + + .offset-xxl-6 { + margin-left: 50%; + } + + .offset-xxl-7 { + margin-left: 58.33333333%; + } + + .offset-xxl-8 { + margin-left: 66.66666667%; + } + + .offset-xxl-9 { + margin-left: 75%; + } + + .offset-xxl-10 { + margin-left: 83.33333333%; + } + + .offset-xxl-11 { + margin-left: 91.66666667%; + } + + .g-xxl-0, +.gx-xxl-0 { + --bs-gutter-x: 0; + } + + .g-xxl-0, +.gy-xxl-0 { + --bs-gutter-y: 0; + } + + .g-xxl-1, +.gx-xxl-1 { + --bs-gutter-x: 0.25rem; + } + + .g-xxl-1, +.gy-xxl-1 { + --bs-gutter-y: 0.25rem; + } + + .g-xxl-2, +.gx-xxl-2 { + --bs-gutter-x: 0.5rem; + } + + .g-xxl-2, +.gy-xxl-2 { + --bs-gutter-y: 0.5rem; + } + + .g-xxl-3, +.gx-xxl-3 { + --bs-gutter-x: 1rem; + } + + .g-xxl-3, +.gy-xxl-3 { + --bs-gutter-y: 1rem; + } + + .g-xxl-4, +.gx-xxl-4 { + --bs-gutter-x: 1.5rem; + } + + .g-xxl-4, +.gy-xxl-4 { + --bs-gutter-y: 1.5rem; + } + + .g-xxl-5, +.gx-xxl-5 { + --bs-gutter-x: 3rem; + } + + .g-xxl-5, +.gy-xxl-5 { + --bs-gutter-y: 3rem; + } +} +.d-inline { + display: inline !important; +} + +.d-inline-block { + display: inline-block !important; +} + +.d-block { + display: block !important; +} + +.d-grid { + display: grid !important; +} + +.d-table { + display: table !important; +} + +.d-table-row { + display: table-row !important; +} + +.d-table-cell { + display: table-cell !important; +} + +.d-flex { + display: flex !important; +} + +.d-inline-flex { + display: inline-flex !important; +} + +.d-none { + display: none !important; +} + +.flex-fill { + flex: 1 1 auto !important; +} + +.flex-row { + flex-direction: row !important; +} + +.flex-column { + flex-direction: column !important; +} + +.flex-row-reverse { + flex-direction: row-reverse !important; +} + +.flex-column-reverse { + flex-direction: column-reverse !important; +} + +.flex-grow-0 { + flex-grow: 0 !important; +} + +.flex-grow-1 { + flex-grow: 1 !important; +} + +.flex-shrink-0 { + flex-shrink: 0 !important; +} + +.flex-shrink-1 { + flex-shrink: 1 !important; +} + +.flex-wrap { + flex-wrap: wrap !important; +} + +.flex-nowrap { + flex-wrap: nowrap !important; +} + +.flex-wrap-reverse { + flex-wrap: wrap-reverse !important; +} + +.justify-content-start { + justify-content: flex-start !important; +} + +.justify-content-end { + justify-content: flex-end !important; +} + +.justify-content-center { + justify-content: center !important; +} + +.justify-content-between { + justify-content: space-between !important; +} + +.justify-content-around { + justify-content: space-around !important; +} + +.justify-content-evenly { + justify-content: space-evenly !important; +} + +.align-items-start { + align-items: flex-start !important; +} + +.align-items-end { + align-items: flex-end !important; +} + +.align-items-center { + align-items: center !important; +} + +.align-items-baseline { + align-items: baseline !important; +} + +.align-items-stretch { + align-items: stretch !important; +} + +.align-content-start { + align-content: flex-start !important; +} + +.align-content-end { + align-content: flex-end !important; +} + +.align-content-center { + align-content: center !important; +} + +.align-content-between { + align-content: space-between !important; +} + +.align-content-around { + align-content: space-around !important; +} + +.align-content-stretch { + align-content: stretch !important; +} + +.align-self-auto { + align-self: auto !important; +} + +.align-self-start { + align-self: flex-start !important; +} + +.align-self-end { + align-self: flex-end !important; +} + +.align-self-center { + align-self: center !important; +} + +.align-self-baseline { + align-self: baseline !important; +} + +.align-self-stretch { + align-self: stretch !important; +} + +.order-first { + order: -1 !important; +} + +.order-0 { + order: 0 !important; +} + +.order-1 { + order: 1 !important; +} + +.order-2 { + order: 2 !important; +} + +.order-3 { + order: 3 !important; +} + +.order-4 { + order: 4 !important; +} + +.order-5 { + order: 5 !important; +} + +.order-last { + order: 6 !important; +} + +.m-0 { + margin: 0 !important; +} + +.m-1 { + margin: 0.25rem !important; +} + +.m-2 { + margin: 0.5rem !important; +} + +.m-3 { + margin: 1rem !important; +} + +.m-4 { + margin: 1.5rem !important; +} + +.m-5 { + margin: 3rem !important; +} + +.m-auto { + margin: auto !important; +} + +.mx-0 { + margin-right: 0 !important; + margin-left: 0 !important; +} + +.mx-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; +} + +.mx-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; +} + +.mx-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; +} + +.mx-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; +} + +.mx-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; +} + +.mx-auto { + margin-right: auto !important; + margin-left: auto !important; +} + +.my-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; +} + +.my-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; +} + +.my-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; +} + +.my-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; +} + +.my-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; +} + +.my-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; +} + +.my-auto { + margin-top: auto !important; + margin-bottom: auto !important; +} + +.mt-0 { + margin-top: 0 !important; +} + +.mt-1 { + margin-top: 0.25rem !important; +} + +.mt-2 { + margin-top: 0.5rem !important; +} + +.mt-3 { + margin-top: 1rem !important; +} + +.mt-4 { + margin-top: 1.5rem !important; +} + +.mt-5 { + margin-top: 3rem !important; +} + +.mt-auto { + margin-top: auto !important; +} + +.me-0 { + margin-right: 0 !important; +} + +.me-1 { + margin-right: 0.25rem !important; +} + +.me-2 { + margin-right: 0.5rem !important; +} + +.me-3 { + margin-right: 1rem !important; +} + +.me-4 { + margin-right: 1.5rem !important; +} + +.me-5 { + margin-right: 3rem !important; +} + +.me-auto { + margin-right: auto !important; +} + +.mb-0 { + margin-bottom: 0 !important; +} + +.mb-1 { + margin-bottom: 0.25rem !important; +} + +.mb-2 { + margin-bottom: 0.5rem !important; +} + +.mb-3 { + margin-bottom: 1rem !important; +} + +.mb-4 { + margin-bottom: 1.5rem !important; +} + +.mb-5 { + margin-bottom: 3rem !important; +} + +.mb-auto { + margin-bottom: auto !important; +} + +.ms-0 { + margin-left: 0 !important; +} + +.ms-1 { + margin-left: 0.25rem !important; +} + +.ms-2 { + margin-left: 0.5rem !important; +} + +.ms-3 { + margin-left: 1rem !important; +} + +.ms-4 { + margin-left: 1.5rem !important; +} + +.ms-5 { + margin-left: 3rem !important; +} + +.ms-auto { + margin-left: auto !important; +} + +.p-0 { + padding: 0 !important; +} + +.p-1 { + padding: 0.25rem !important; +} + +.p-2 { + padding: 0.5rem !important; +} + +.p-3 { + padding: 1rem !important; +} + +.p-4 { + padding: 1.5rem !important; +} + +.p-5 { + padding: 3rem !important; +} + +.px-0 { + padding-right: 0 !important; + padding-left: 0 !important; +} + +.px-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; +} + +.px-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; +} + +.px-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; +} + +.px-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; +} + +.px-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; +} + +.py-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; +} + +.py-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; +} + +.py-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; +} + +.py-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; +} + +.py-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; +} + +.py-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; +} + +.pt-0 { + padding-top: 0 !important; +} + +.pt-1 { + padding-top: 0.25rem !important; +} + +.pt-2 { + padding-top: 0.5rem !important; +} + +.pt-3 { + padding-top: 1rem !important; +} + +.pt-4 { + padding-top: 1.5rem !important; +} + +.pt-5 { + padding-top: 3rem !important; +} + +.pe-0 { + padding-right: 0 !important; +} + +.pe-1 { + padding-right: 0.25rem !important; +} + +.pe-2 { + padding-right: 0.5rem !important; +} + +.pe-3 { + padding-right: 1rem !important; +} + +.pe-4 { + padding-right: 1.5rem !important; +} + +.pe-5 { + padding-right: 3rem !important; +} + +.pb-0 { + padding-bottom: 0 !important; +} + +.pb-1 { + padding-bottom: 0.25rem !important; +} + +.pb-2 { + padding-bottom: 0.5rem !important; +} + +.pb-3 { + padding-bottom: 1rem !important; +} + +.pb-4 { + padding-bottom: 1.5rem !important; +} + +.pb-5 { + padding-bottom: 3rem !important; +} + +.ps-0 { + padding-left: 0 !important; +} + +.ps-1 { + padding-left: 0.25rem !important; +} + +.ps-2 { + padding-left: 0.5rem !important; +} + +.ps-3 { + padding-left: 1rem !important; +} + +.ps-4 { + padding-left: 1.5rem !important; +} + +.ps-5 { + padding-left: 3rem !important; +} + +@media (min-width: 576px) { + .d-sm-inline { + display: inline !important; + } + + .d-sm-inline-block { + display: inline-block !important; + } + + .d-sm-block { + display: block !important; + } + + .d-sm-grid { + display: grid !important; + } + + .d-sm-table { + display: table !important; + } + + .d-sm-table-row { + display: table-row !important; + } + + .d-sm-table-cell { + display: table-cell !important; + } + + .d-sm-flex { + display: flex !important; + } + + .d-sm-inline-flex { + display: inline-flex !important; + } + + .d-sm-none { + display: none !important; + } + + .flex-sm-fill { + flex: 1 1 auto !important; + } + + .flex-sm-row { + flex-direction: row !important; + } + + .flex-sm-column { + flex-direction: column !important; + } + + .flex-sm-row-reverse { + flex-direction: row-reverse !important; + } + + .flex-sm-column-reverse { + flex-direction: column-reverse !important; + } + + .flex-sm-grow-0 { + flex-grow: 0 !important; + } + + .flex-sm-grow-1 { + flex-grow: 1 !important; + } + + .flex-sm-shrink-0 { + flex-shrink: 0 !important; + } + + .flex-sm-shrink-1 { + flex-shrink: 1 !important; + } + + .flex-sm-wrap { + flex-wrap: wrap !important; + } + + .flex-sm-nowrap { + flex-wrap: nowrap !important; + } + + .flex-sm-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .justify-content-sm-start { + justify-content: flex-start !important; + } + + .justify-content-sm-end { + justify-content: flex-end !important; + } + + .justify-content-sm-center { + justify-content: center !important; + } + + .justify-content-sm-between { + justify-content: space-between !important; + } + + .justify-content-sm-around { + justify-content: space-around !important; + } + + .justify-content-sm-evenly { + justify-content: space-evenly !important; + } + + .align-items-sm-start { + align-items: flex-start !important; + } + + .align-items-sm-end { + align-items: flex-end !important; + } + + .align-items-sm-center { + align-items: center !important; + } + + .align-items-sm-baseline { + align-items: baseline !important; + } + + .align-items-sm-stretch { + align-items: stretch !important; + } + + .align-content-sm-start { + align-content: flex-start !important; + } + + .align-content-sm-end { + align-content: flex-end !important; + } + + .align-content-sm-center { + align-content: center !important; + } + + .align-content-sm-between { + align-content: space-between !important; + } + + .align-content-sm-around { + align-content: space-around !important; + } + + .align-content-sm-stretch { + align-content: stretch !important; + } + + .align-self-sm-auto { + align-self: auto !important; + } + + .align-self-sm-start { + align-self: flex-start !important; + } + + .align-self-sm-end { + align-self: flex-end !important; + } + + .align-self-sm-center { + align-self: center !important; + } + + .align-self-sm-baseline { + align-self: baseline !important; + } + + .align-self-sm-stretch { + align-self: stretch !important; + } + + .order-sm-first { + order: -1 !important; + } + + .order-sm-0 { + order: 0 !important; + } + + .order-sm-1 { + order: 1 !important; + } + + .order-sm-2 { + order: 2 !important; + } + + .order-sm-3 { + order: 3 !important; + } + + .order-sm-4 { + order: 4 !important; + } + + .order-sm-5 { + order: 5 !important; + } + + .order-sm-last { + order: 6 !important; + } + + .m-sm-0 { + margin: 0 !important; + } + + .m-sm-1 { + margin: 0.25rem !important; + } + + .m-sm-2 { + margin: 0.5rem !important; + } + + .m-sm-3 { + margin: 1rem !important; + } + + .m-sm-4 { + margin: 1.5rem !important; + } + + .m-sm-5 { + margin: 3rem !important; + } + + .m-sm-auto { + margin: auto !important; + } + + .mx-sm-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .mx-sm-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .mx-sm-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .mx-sm-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .mx-sm-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .mx-sm-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .mx-sm-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .my-sm-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .my-sm-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .my-sm-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .my-sm-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .my-sm-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .my-sm-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .my-sm-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .mt-sm-0 { + margin-top: 0 !important; + } + + .mt-sm-1 { + margin-top: 0.25rem !important; + } + + .mt-sm-2 { + margin-top: 0.5rem !important; + } + + .mt-sm-3 { + margin-top: 1rem !important; + } + + .mt-sm-4 { + margin-top: 1.5rem !important; + } + + .mt-sm-5 { + margin-top: 3rem !important; + } + + .mt-sm-auto { + margin-top: auto !important; + } + + .me-sm-0 { + margin-right: 0 !important; + } + + .me-sm-1 { + margin-right: 0.25rem !important; + } + + .me-sm-2 { + margin-right: 0.5rem !important; + } + + .me-sm-3 { + margin-right: 1rem !important; + } + + .me-sm-4 { + margin-right: 1.5rem !important; + } + + .me-sm-5 { + margin-right: 3rem !important; + } + + .me-sm-auto { + margin-right: auto !important; + } + + .mb-sm-0 { + margin-bottom: 0 !important; + } + + .mb-sm-1 { + margin-bottom: 0.25rem !important; + } + + .mb-sm-2 { + margin-bottom: 0.5rem !important; + } + + .mb-sm-3 { + margin-bottom: 1rem !important; + } + + .mb-sm-4 { + margin-bottom: 1.5rem !important; + } + + .mb-sm-5 { + margin-bottom: 3rem !important; + } + + .mb-sm-auto { + margin-bottom: auto !important; + } + + .ms-sm-0 { + margin-left: 0 !important; + } + + .ms-sm-1 { + margin-left: 0.25rem !important; + } + + .ms-sm-2 { + margin-left: 0.5rem !important; + } + + .ms-sm-3 { + margin-left: 1rem !important; + } + + .ms-sm-4 { + margin-left: 1.5rem !important; + } + + .ms-sm-5 { + margin-left: 3rem !important; + } + + .ms-sm-auto { + margin-left: auto !important; + } + + .p-sm-0 { + padding: 0 !important; + } + + .p-sm-1 { + padding: 0.25rem !important; + } + + .p-sm-2 { + padding: 0.5rem !important; + } + + .p-sm-3 { + padding: 1rem !important; + } + + .p-sm-4 { + padding: 1.5rem !important; + } + + .p-sm-5 { + padding: 3rem !important; + } + + .px-sm-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .px-sm-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .px-sm-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .px-sm-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .px-sm-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .px-sm-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .py-sm-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .py-sm-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .py-sm-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .py-sm-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .py-sm-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .py-sm-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .pt-sm-0 { + padding-top: 0 !important; + } + + .pt-sm-1 { + padding-top: 0.25rem !important; + } + + .pt-sm-2 { + padding-top: 0.5rem !important; + } + + .pt-sm-3 { + padding-top: 1rem !important; + } + + .pt-sm-4 { + padding-top: 1.5rem !important; + } + + .pt-sm-5 { + padding-top: 3rem !important; + } + + .pe-sm-0 { + padding-right: 0 !important; + } + + .pe-sm-1 { + padding-right: 0.25rem !important; + } + + .pe-sm-2 { + padding-right: 0.5rem !important; + } + + .pe-sm-3 { + padding-right: 1rem !important; + } + + .pe-sm-4 { + padding-right: 1.5rem !important; + } + + .pe-sm-5 { + padding-right: 3rem !important; + } + + .pb-sm-0 { + padding-bottom: 0 !important; + } + + .pb-sm-1 { + padding-bottom: 0.25rem !important; + } + + .pb-sm-2 { + padding-bottom: 0.5rem !important; + } + + .pb-sm-3 { + padding-bottom: 1rem !important; + } + + .pb-sm-4 { + padding-bottom: 1.5rem !important; + } + + .pb-sm-5 { + padding-bottom: 3rem !important; + } + + .ps-sm-0 { + padding-left: 0 !important; + } + + .ps-sm-1 { + padding-left: 0.25rem !important; + } + + .ps-sm-2 { + padding-left: 0.5rem !important; + } + + .ps-sm-3 { + padding-left: 1rem !important; + } + + .ps-sm-4 { + padding-left: 1.5rem !important; + } + + .ps-sm-5 { + padding-left: 3rem !important; + } +} +@media (min-width: 768px) { + .d-md-inline { + display: inline !important; + } + + .d-md-inline-block { + display: inline-block !important; + } + + .d-md-block { + display: block !important; + } + + .d-md-grid { + display: grid !important; + } + + .d-md-table { + display: table !important; + } + + .d-md-table-row { + display: table-row !important; + } + + .d-md-table-cell { + display: table-cell !important; + } + + .d-md-flex { + display: flex !important; + } + + .d-md-inline-flex { + display: inline-flex !important; + } + + .d-md-none { + display: none !important; + } + + .flex-md-fill { + flex: 1 1 auto !important; + } + + .flex-md-row { + flex-direction: row !important; + } + + .flex-md-column { + flex-direction: column !important; + } + + .flex-md-row-reverse { + flex-direction: row-reverse !important; + } + + .flex-md-column-reverse { + flex-direction: column-reverse !important; + } + + .flex-md-grow-0 { + flex-grow: 0 !important; + } + + .flex-md-grow-1 { + flex-grow: 1 !important; + } + + .flex-md-shrink-0 { + flex-shrink: 0 !important; + } + + .flex-md-shrink-1 { + flex-shrink: 1 !important; + } + + .flex-md-wrap { + flex-wrap: wrap !important; + } + + .flex-md-nowrap { + flex-wrap: nowrap !important; + } + + .flex-md-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .justify-content-md-start { + justify-content: flex-start !important; + } + + .justify-content-md-end { + justify-content: flex-end !important; + } + + .justify-content-md-center { + justify-content: center !important; + } + + .justify-content-md-between { + justify-content: space-between !important; + } + + .justify-content-md-around { + justify-content: space-around !important; + } + + .justify-content-md-evenly { + justify-content: space-evenly !important; + } + + .align-items-md-start { + align-items: flex-start !important; + } + + .align-items-md-end { + align-items: flex-end !important; + } + + .align-items-md-center { + align-items: center !important; + } + + .align-items-md-baseline { + align-items: baseline !important; + } + + .align-items-md-stretch { + align-items: stretch !important; + } + + .align-content-md-start { + align-content: flex-start !important; + } + + .align-content-md-end { + align-content: flex-end !important; + } + + .align-content-md-center { + align-content: center !important; + } + + .align-content-md-between { + align-content: space-between !important; + } + + .align-content-md-around { + align-content: space-around !important; + } + + .align-content-md-stretch { + align-content: stretch !important; + } + + .align-self-md-auto { + align-self: auto !important; + } + + .align-self-md-start { + align-self: flex-start !important; + } + + .align-self-md-end { + align-self: flex-end !important; + } + + .align-self-md-center { + align-self: center !important; + } + + .align-self-md-baseline { + align-self: baseline !important; + } + + .align-self-md-stretch { + align-self: stretch !important; + } + + .order-md-first { + order: -1 !important; + } + + .order-md-0 { + order: 0 !important; + } + + .order-md-1 { + order: 1 !important; + } + + .order-md-2 { + order: 2 !important; + } + + .order-md-3 { + order: 3 !important; + } + + .order-md-4 { + order: 4 !important; + } + + .order-md-5 { + order: 5 !important; + } + + .order-md-last { + order: 6 !important; + } + + .m-md-0 { + margin: 0 !important; + } + + .m-md-1 { + margin: 0.25rem !important; + } + + .m-md-2 { + margin: 0.5rem !important; + } + + .m-md-3 { + margin: 1rem !important; + } + + .m-md-4 { + margin: 1.5rem !important; + } + + .m-md-5 { + margin: 3rem !important; + } + + .m-md-auto { + margin: auto !important; + } + + .mx-md-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .mx-md-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .mx-md-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .mx-md-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .mx-md-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .mx-md-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .mx-md-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .my-md-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .my-md-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .my-md-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .my-md-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .my-md-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .my-md-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .my-md-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .mt-md-0 { + margin-top: 0 !important; + } + + .mt-md-1 { + margin-top: 0.25rem !important; + } + + .mt-md-2 { + margin-top: 0.5rem !important; + } + + .mt-md-3 { + margin-top: 1rem !important; + } + + .mt-md-4 { + margin-top: 1.5rem !important; + } + + .mt-md-5 { + margin-top: 3rem !important; + } + + .mt-md-auto { + margin-top: auto !important; + } + + .me-md-0 { + margin-right: 0 !important; + } + + .me-md-1 { + margin-right: 0.25rem !important; + } + + .me-md-2 { + margin-right: 0.5rem !important; + } + + .me-md-3 { + margin-right: 1rem !important; + } + + .me-md-4 { + margin-right: 1.5rem !important; + } + + .me-md-5 { + margin-right: 3rem !important; + } + + .me-md-auto { + margin-right: auto !important; + } + + .mb-md-0 { + margin-bottom: 0 !important; + } + + .mb-md-1 { + margin-bottom: 0.25rem !important; + } + + .mb-md-2 { + margin-bottom: 0.5rem !important; + } + + .mb-md-3 { + margin-bottom: 1rem !important; + } + + .mb-md-4 { + margin-bottom: 1.5rem !important; + } + + .mb-md-5 { + margin-bottom: 3rem !important; + } + + .mb-md-auto { + margin-bottom: auto !important; + } + + .ms-md-0 { + margin-left: 0 !important; + } + + .ms-md-1 { + margin-left: 0.25rem !important; + } + + .ms-md-2 { + margin-left: 0.5rem !important; + } + + .ms-md-3 { + margin-left: 1rem !important; + } + + .ms-md-4 { + margin-left: 1.5rem !important; + } + + .ms-md-5 { + margin-left: 3rem !important; + } + + .ms-md-auto { + margin-left: auto !important; + } + + .p-md-0 { + padding: 0 !important; + } + + .p-md-1 { + padding: 0.25rem !important; + } + + .p-md-2 { + padding: 0.5rem !important; + } + + .p-md-3 { + padding: 1rem !important; + } + + .p-md-4 { + padding: 1.5rem !important; + } + + .p-md-5 { + padding: 3rem !important; + } + + .px-md-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .px-md-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .px-md-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .px-md-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .px-md-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .px-md-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .py-md-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .py-md-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .py-md-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .py-md-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .py-md-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .py-md-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .pt-md-0 { + padding-top: 0 !important; + } + + .pt-md-1 { + padding-top: 0.25rem !important; + } + + .pt-md-2 { + padding-top: 0.5rem !important; + } + + .pt-md-3 { + padding-top: 1rem !important; + } + + .pt-md-4 { + padding-top: 1.5rem !important; + } + + .pt-md-5 { + padding-top: 3rem !important; + } + + .pe-md-0 { + padding-right: 0 !important; + } + + .pe-md-1 { + padding-right: 0.25rem !important; + } + + .pe-md-2 { + padding-right: 0.5rem !important; + } + + .pe-md-3 { + padding-right: 1rem !important; + } + + .pe-md-4 { + padding-right: 1.5rem !important; + } + + .pe-md-5 { + padding-right: 3rem !important; + } + + .pb-md-0 { + padding-bottom: 0 !important; + } + + .pb-md-1 { + padding-bottom: 0.25rem !important; + } + + .pb-md-2 { + padding-bottom: 0.5rem !important; + } + + .pb-md-3 { + padding-bottom: 1rem !important; + } + + .pb-md-4 { + padding-bottom: 1.5rem !important; + } + + .pb-md-5 { + padding-bottom: 3rem !important; + } + + .ps-md-0 { + padding-left: 0 !important; + } + + .ps-md-1 { + padding-left: 0.25rem !important; + } + + .ps-md-2 { + padding-left: 0.5rem !important; + } + + .ps-md-3 { + padding-left: 1rem !important; + } + + .ps-md-4 { + padding-left: 1.5rem !important; + } + + .ps-md-5 { + padding-left: 3rem !important; + } +} +@media (min-width: 992px) { + .d-lg-inline { + display: inline !important; + } + + .d-lg-inline-block { + display: inline-block !important; + } + + .d-lg-block { + display: block !important; + } + + .d-lg-grid { + display: grid !important; + } + + .d-lg-table { + display: table !important; + } + + .d-lg-table-row { + display: table-row !important; + } + + .d-lg-table-cell { + display: table-cell !important; + } + + .d-lg-flex { + display: flex !important; + } + + .d-lg-inline-flex { + display: inline-flex !important; + } + + .d-lg-none { + display: none !important; + } + + .flex-lg-fill { + flex: 1 1 auto !important; + } + + .flex-lg-row { + flex-direction: row !important; + } + + .flex-lg-column { + flex-direction: column !important; + } + + .flex-lg-row-reverse { + flex-direction: row-reverse !important; + } + + .flex-lg-column-reverse { + flex-direction: column-reverse !important; + } + + .flex-lg-grow-0 { + flex-grow: 0 !important; + } + + .flex-lg-grow-1 { + flex-grow: 1 !important; + } + + .flex-lg-shrink-0 { + flex-shrink: 0 !important; + } + + .flex-lg-shrink-1 { + flex-shrink: 1 !important; + } + + .flex-lg-wrap { + flex-wrap: wrap !important; + } + + .flex-lg-nowrap { + flex-wrap: nowrap !important; + } + + .flex-lg-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .justify-content-lg-start { + justify-content: flex-start !important; + } + + .justify-content-lg-end { + justify-content: flex-end !important; + } + + .justify-content-lg-center { + justify-content: center !important; + } + + .justify-content-lg-between { + justify-content: space-between !important; + } + + .justify-content-lg-around { + justify-content: space-around !important; + } + + .justify-content-lg-evenly { + justify-content: space-evenly !important; + } + + .align-items-lg-start { + align-items: flex-start !important; + } + + .align-items-lg-end { + align-items: flex-end !important; + } + + .align-items-lg-center { + align-items: center !important; + } + + .align-items-lg-baseline { + align-items: baseline !important; + } + + .align-items-lg-stretch { + align-items: stretch !important; + } + + .align-content-lg-start { + align-content: flex-start !important; + } + + .align-content-lg-end { + align-content: flex-end !important; + } + + .align-content-lg-center { + align-content: center !important; + } + + .align-content-lg-between { + align-content: space-between !important; + } + + .align-content-lg-around { + align-content: space-around !important; + } + + .align-content-lg-stretch { + align-content: stretch !important; + } + + .align-self-lg-auto { + align-self: auto !important; + } + + .align-self-lg-start { + align-self: flex-start !important; + } + + .align-self-lg-end { + align-self: flex-end !important; + } + + .align-self-lg-center { + align-self: center !important; + } + + .align-self-lg-baseline { + align-self: baseline !important; + } + + .align-self-lg-stretch { + align-self: stretch !important; + } + + .order-lg-first { + order: -1 !important; + } + + .order-lg-0 { + order: 0 !important; + } + + .order-lg-1 { + order: 1 !important; + } + + .order-lg-2 { + order: 2 !important; + } + + .order-lg-3 { + order: 3 !important; + } + + .order-lg-4 { + order: 4 !important; + } + + .order-lg-5 { + order: 5 !important; + } + + .order-lg-last { + order: 6 !important; + } + + .m-lg-0 { + margin: 0 !important; + } + + .m-lg-1 { + margin: 0.25rem !important; + } + + .m-lg-2 { + margin: 0.5rem !important; + } + + .m-lg-3 { + margin: 1rem !important; + } + + .m-lg-4 { + margin: 1.5rem !important; + } + + .m-lg-5 { + margin: 3rem !important; + } + + .m-lg-auto { + margin: auto !important; + } + + .mx-lg-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .mx-lg-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .mx-lg-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .mx-lg-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .mx-lg-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .mx-lg-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .mx-lg-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .my-lg-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .my-lg-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .my-lg-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .my-lg-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .my-lg-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .my-lg-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .my-lg-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .mt-lg-0 { + margin-top: 0 !important; + } + + .mt-lg-1 { + margin-top: 0.25rem !important; + } + + .mt-lg-2 { + margin-top: 0.5rem !important; + } + + .mt-lg-3 { + margin-top: 1rem !important; + } + + .mt-lg-4 { + margin-top: 1.5rem !important; + } + + .mt-lg-5 { + margin-top: 3rem !important; + } + + .mt-lg-auto { + margin-top: auto !important; + } + + .me-lg-0 { + margin-right: 0 !important; + } + + .me-lg-1 { + margin-right: 0.25rem !important; + } + + .me-lg-2 { + margin-right: 0.5rem !important; + } + + .me-lg-3 { + margin-right: 1rem !important; + } + + .me-lg-4 { + margin-right: 1.5rem !important; + } + + .me-lg-5 { + margin-right: 3rem !important; + } + + .me-lg-auto { + margin-right: auto !important; + } + + .mb-lg-0 { + margin-bottom: 0 !important; + } + + .mb-lg-1 { + margin-bottom: 0.25rem !important; + } + + .mb-lg-2 { + margin-bottom: 0.5rem !important; + } + + .mb-lg-3 { + margin-bottom: 1rem !important; + } + + .mb-lg-4 { + margin-bottom: 1.5rem !important; + } + + .mb-lg-5 { + margin-bottom: 3rem !important; + } + + .mb-lg-auto { + margin-bottom: auto !important; + } + + .ms-lg-0 { + margin-left: 0 !important; + } + + .ms-lg-1 { + margin-left: 0.25rem !important; + } + + .ms-lg-2 { + margin-left: 0.5rem !important; + } + + .ms-lg-3 { + margin-left: 1rem !important; + } + + .ms-lg-4 { + margin-left: 1.5rem !important; + } + + .ms-lg-5 { + margin-left: 3rem !important; + } + + .ms-lg-auto { + margin-left: auto !important; + } + + .p-lg-0 { + padding: 0 !important; + } + + .p-lg-1 { + padding: 0.25rem !important; + } + + .p-lg-2 { + padding: 0.5rem !important; + } + + .p-lg-3 { + padding: 1rem !important; + } + + .p-lg-4 { + padding: 1.5rem !important; + } + + .p-lg-5 { + padding: 3rem !important; + } + + .px-lg-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .px-lg-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .px-lg-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .px-lg-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .px-lg-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .px-lg-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .py-lg-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .py-lg-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .py-lg-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .py-lg-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .py-lg-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .py-lg-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .pt-lg-0 { + padding-top: 0 !important; + } + + .pt-lg-1 { + padding-top: 0.25rem !important; + } + + .pt-lg-2 { + padding-top: 0.5rem !important; + } + + .pt-lg-3 { + padding-top: 1rem !important; + } + + .pt-lg-4 { + padding-top: 1.5rem !important; + } + + .pt-lg-5 { + padding-top: 3rem !important; + } + + .pe-lg-0 { + padding-right: 0 !important; + } + + .pe-lg-1 { + padding-right: 0.25rem !important; + } + + .pe-lg-2 { + padding-right: 0.5rem !important; + } + + .pe-lg-3 { + padding-right: 1rem !important; + } + + .pe-lg-4 { + padding-right: 1.5rem !important; + } + + .pe-lg-5 { + padding-right: 3rem !important; + } + + .pb-lg-0 { + padding-bottom: 0 !important; + } + + .pb-lg-1 { + padding-bottom: 0.25rem !important; + } + + .pb-lg-2 { + padding-bottom: 0.5rem !important; + } + + .pb-lg-3 { + padding-bottom: 1rem !important; + } + + .pb-lg-4 { + padding-bottom: 1.5rem !important; + } + + .pb-lg-5 { + padding-bottom: 3rem !important; + } + + .ps-lg-0 { + padding-left: 0 !important; + } + + .ps-lg-1 { + padding-left: 0.25rem !important; + } + + .ps-lg-2 { + padding-left: 0.5rem !important; + } + + .ps-lg-3 { + padding-left: 1rem !important; + } + + .ps-lg-4 { + padding-left: 1.5rem !important; + } + + .ps-lg-5 { + padding-left: 3rem !important; + } +} +@media (min-width: 1200px) { + .d-xl-inline { + display: inline !important; + } + + .d-xl-inline-block { + display: inline-block !important; + } + + .d-xl-block { + display: block !important; + } + + .d-xl-grid { + display: grid !important; + } + + .d-xl-table { + display: table !important; + } + + .d-xl-table-row { + display: table-row !important; + } + + .d-xl-table-cell { + display: table-cell !important; + } + + .d-xl-flex { + display: flex !important; + } + + .d-xl-inline-flex { + display: inline-flex !important; + } + + .d-xl-none { + display: none !important; + } + + .flex-xl-fill { + flex: 1 1 auto !important; + } + + .flex-xl-row { + flex-direction: row !important; + } + + .flex-xl-column { + flex-direction: column !important; + } + + .flex-xl-row-reverse { + flex-direction: row-reverse !important; + } + + .flex-xl-column-reverse { + flex-direction: column-reverse !important; + } + + .flex-xl-grow-0 { + flex-grow: 0 !important; + } + + .flex-xl-grow-1 { + flex-grow: 1 !important; + } + + .flex-xl-shrink-0 { + flex-shrink: 0 !important; + } + + .flex-xl-shrink-1 { + flex-shrink: 1 !important; + } + + .flex-xl-wrap { + flex-wrap: wrap !important; + } + + .flex-xl-nowrap { + flex-wrap: nowrap !important; + } + + .flex-xl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .justify-content-xl-start { + justify-content: flex-start !important; + } + + .justify-content-xl-end { + justify-content: flex-end !important; + } + + .justify-content-xl-center { + justify-content: center !important; + } + + .justify-content-xl-between { + justify-content: space-between !important; + } + + .justify-content-xl-around { + justify-content: space-around !important; + } + + .justify-content-xl-evenly { + justify-content: space-evenly !important; + } + + .align-items-xl-start { + align-items: flex-start !important; + } + + .align-items-xl-end { + align-items: flex-end !important; + } + + .align-items-xl-center { + align-items: center !important; + } + + .align-items-xl-baseline { + align-items: baseline !important; + } + + .align-items-xl-stretch { + align-items: stretch !important; + } + + .align-content-xl-start { + align-content: flex-start !important; + } + + .align-content-xl-end { + align-content: flex-end !important; + } + + .align-content-xl-center { + align-content: center !important; + } + + .align-content-xl-between { + align-content: space-between !important; + } + + .align-content-xl-around { + align-content: space-around !important; + } + + .align-content-xl-stretch { + align-content: stretch !important; + } + + .align-self-xl-auto { + align-self: auto !important; + } + + .align-self-xl-start { + align-self: flex-start !important; + } + + .align-self-xl-end { + align-self: flex-end !important; + } + + .align-self-xl-center { + align-self: center !important; + } + + .align-self-xl-baseline { + align-self: baseline !important; + } + + .align-self-xl-stretch { + align-self: stretch !important; + } + + .order-xl-first { + order: -1 !important; + } + + .order-xl-0 { + order: 0 !important; + } + + .order-xl-1 { + order: 1 !important; + } + + .order-xl-2 { + order: 2 !important; + } + + .order-xl-3 { + order: 3 !important; + } + + .order-xl-4 { + order: 4 !important; + } + + .order-xl-5 { + order: 5 !important; + } + + .order-xl-last { + order: 6 !important; + } + + .m-xl-0 { + margin: 0 !important; + } + + .m-xl-1 { + margin: 0.25rem !important; + } + + .m-xl-2 { + margin: 0.5rem !important; + } + + .m-xl-3 { + margin: 1rem !important; + } + + .m-xl-4 { + margin: 1.5rem !important; + } + + .m-xl-5 { + margin: 3rem !important; + } + + .m-xl-auto { + margin: auto !important; + } + + .mx-xl-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .mx-xl-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .mx-xl-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .mx-xl-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .mx-xl-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .mx-xl-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .mx-xl-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .my-xl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .my-xl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .my-xl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .my-xl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .my-xl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .my-xl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .my-xl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .mt-xl-0 { + margin-top: 0 !important; + } + + .mt-xl-1 { + margin-top: 0.25rem !important; + } + + .mt-xl-2 { + margin-top: 0.5rem !important; + } + + .mt-xl-3 { + margin-top: 1rem !important; + } + + .mt-xl-4 { + margin-top: 1.5rem !important; + } + + .mt-xl-5 { + margin-top: 3rem !important; + } + + .mt-xl-auto { + margin-top: auto !important; + } + + .me-xl-0 { + margin-right: 0 !important; + } + + .me-xl-1 { + margin-right: 0.25rem !important; + } + + .me-xl-2 { + margin-right: 0.5rem !important; + } + + .me-xl-3 { + margin-right: 1rem !important; + } + + .me-xl-4 { + margin-right: 1.5rem !important; + } + + .me-xl-5 { + margin-right: 3rem !important; + } + + .me-xl-auto { + margin-right: auto !important; + } + + .mb-xl-0 { + margin-bottom: 0 !important; + } + + .mb-xl-1 { + margin-bottom: 0.25rem !important; + } + + .mb-xl-2 { + margin-bottom: 0.5rem !important; + } + + .mb-xl-3 { + margin-bottom: 1rem !important; + } + + .mb-xl-4 { + margin-bottom: 1.5rem !important; + } + + .mb-xl-5 { + margin-bottom: 3rem !important; + } + + .mb-xl-auto { + margin-bottom: auto !important; + } + + .ms-xl-0 { + margin-left: 0 !important; + } + + .ms-xl-1 { + margin-left: 0.25rem !important; + } + + .ms-xl-2 { + margin-left: 0.5rem !important; + } + + .ms-xl-3 { + margin-left: 1rem !important; + } + + .ms-xl-4 { + margin-left: 1.5rem !important; + } + + .ms-xl-5 { + margin-left: 3rem !important; + } + + .ms-xl-auto { + margin-left: auto !important; + } + + .p-xl-0 { + padding: 0 !important; + } + + .p-xl-1 { + padding: 0.25rem !important; + } + + .p-xl-2 { + padding: 0.5rem !important; + } + + .p-xl-3 { + padding: 1rem !important; + } + + .p-xl-4 { + padding: 1.5rem !important; + } + + .p-xl-5 { + padding: 3rem !important; + } + + .px-xl-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .px-xl-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .px-xl-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .px-xl-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .px-xl-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .px-xl-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .py-xl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .py-xl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .py-xl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .py-xl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .py-xl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .py-xl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .pt-xl-0 { + padding-top: 0 !important; + } + + .pt-xl-1 { + padding-top: 0.25rem !important; + } + + .pt-xl-2 { + padding-top: 0.5rem !important; + } + + .pt-xl-3 { + padding-top: 1rem !important; + } + + .pt-xl-4 { + padding-top: 1.5rem !important; + } + + .pt-xl-5 { + padding-top: 3rem !important; + } + + .pe-xl-0 { + padding-right: 0 !important; + } + + .pe-xl-1 { + padding-right: 0.25rem !important; + } + + .pe-xl-2 { + padding-right: 0.5rem !important; + } + + .pe-xl-3 { + padding-right: 1rem !important; + } + + .pe-xl-4 { + padding-right: 1.5rem !important; + } + + .pe-xl-5 { + padding-right: 3rem !important; + } + + .pb-xl-0 { + padding-bottom: 0 !important; + } + + .pb-xl-1 { + padding-bottom: 0.25rem !important; + } + + .pb-xl-2 { + padding-bottom: 0.5rem !important; + } + + .pb-xl-3 { + padding-bottom: 1rem !important; + } + + .pb-xl-4 { + padding-bottom: 1.5rem !important; + } + + .pb-xl-5 { + padding-bottom: 3rem !important; + } + + .ps-xl-0 { + padding-left: 0 !important; + } + + .ps-xl-1 { + padding-left: 0.25rem !important; + } + + .ps-xl-2 { + padding-left: 0.5rem !important; + } + + .ps-xl-3 { + padding-left: 1rem !important; + } + + .ps-xl-4 { + padding-left: 1.5rem !important; + } + + .ps-xl-5 { + padding-left: 3rem !important; + } +} +@media (min-width: 1400px) { + .d-xxl-inline { + display: inline !important; + } + + .d-xxl-inline-block { + display: inline-block !important; + } + + .d-xxl-block { + display: block !important; + } + + .d-xxl-grid { + display: grid !important; + } + + .d-xxl-table { + display: table !important; + } + + .d-xxl-table-row { + display: table-row !important; + } + + .d-xxl-table-cell { + display: table-cell !important; + } + + .d-xxl-flex { + display: flex !important; + } + + .d-xxl-inline-flex { + display: inline-flex !important; + } + + .d-xxl-none { + display: none !important; + } + + .flex-xxl-fill { + flex: 1 1 auto !important; + } + + .flex-xxl-row { + flex-direction: row !important; + } + + .flex-xxl-column { + flex-direction: column !important; + } + + .flex-xxl-row-reverse { + flex-direction: row-reverse !important; + } + + .flex-xxl-column-reverse { + flex-direction: column-reverse !important; + } + + .flex-xxl-grow-0 { + flex-grow: 0 !important; + } + + .flex-xxl-grow-1 { + flex-grow: 1 !important; + } + + .flex-xxl-shrink-0 { + flex-shrink: 0 !important; + } + + .flex-xxl-shrink-1 { + flex-shrink: 1 !important; + } + + .flex-xxl-wrap { + flex-wrap: wrap !important; + } + + .flex-xxl-nowrap { + flex-wrap: nowrap !important; + } + + .flex-xxl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .justify-content-xxl-start { + justify-content: flex-start !important; + } + + .justify-content-xxl-end { + justify-content: flex-end !important; + } + + .justify-content-xxl-center { + justify-content: center !important; + } + + .justify-content-xxl-between { + justify-content: space-between !important; + } + + .justify-content-xxl-around { + justify-content: space-around !important; + } + + .justify-content-xxl-evenly { + justify-content: space-evenly !important; + } + + .align-items-xxl-start { + align-items: flex-start !important; + } + + .align-items-xxl-end { + align-items: flex-end !important; + } + + .align-items-xxl-center { + align-items: center !important; + } + + .align-items-xxl-baseline { + align-items: baseline !important; + } + + .align-items-xxl-stretch { + align-items: stretch !important; + } + + .align-content-xxl-start { + align-content: flex-start !important; + } + + .align-content-xxl-end { + align-content: flex-end !important; + } + + .align-content-xxl-center { + align-content: center !important; + } + + .align-content-xxl-between { + align-content: space-between !important; + } + + .align-content-xxl-around { + align-content: space-around !important; + } + + .align-content-xxl-stretch { + align-content: stretch !important; + } + + .align-self-xxl-auto { + align-self: auto !important; + } + + .align-self-xxl-start { + align-self: flex-start !important; + } + + .align-self-xxl-end { + align-self: flex-end !important; + } + + .align-self-xxl-center { + align-self: center !important; + } + + .align-self-xxl-baseline { + align-self: baseline !important; + } + + .align-self-xxl-stretch { + align-self: stretch !important; + } + + .order-xxl-first { + order: -1 !important; + } + + .order-xxl-0 { + order: 0 !important; + } + + .order-xxl-1 { + order: 1 !important; + } + + .order-xxl-2 { + order: 2 !important; + } + + .order-xxl-3 { + order: 3 !important; + } + + .order-xxl-4 { + order: 4 !important; + } + + .order-xxl-5 { + order: 5 !important; + } + + .order-xxl-last { + order: 6 !important; + } + + .m-xxl-0 { + margin: 0 !important; + } + + .m-xxl-1 { + margin: 0.25rem !important; + } + + .m-xxl-2 { + margin: 0.5rem !important; + } + + .m-xxl-3 { + margin: 1rem !important; + } + + .m-xxl-4 { + margin: 1.5rem !important; + } + + .m-xxl-5 { + margin: 3rem !important; + } + + .m-xxl-auto { + margin: auto !important; + } + + .mx-xxl-0 { + margin-right: 0 !important; + margin-left: 0 !important; + } + + .mx-xxl-1 { + margin-right: 0.25rem !important; + margin-left: 0.25rem !important; + } + + .mx-xxl-2 { + margin-right: 0.5rem !important; + margin-left: 0.5rem !important; + } + + .mx-xxl-3 { + margin-right: 1rem !important; + margin-left: 1rem !important; + } + + .mx-xxl-4 { + margin-right: 1.5rem !important; + margin-left: 1.5rem !important; + } + + .mx-xxl-5 { + margin-right: 3rem !important; + margin-left: 3rem !important; + } + + .mx-xxl-auto { + margin-right: auto !important; + margin-left: auto !important; + } + + .my-xxl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .my-xxl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .my-xxl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .my-xxl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .my-xxl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .my-xxl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .my-xxl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .mt-xxl-0 { + margin-top: 0 !important; + } + + .mt-xxl-1 { + margin-top: 0.25rem !important; + } + + .mt-xxl-2 { + margin-top: 0.5rem !important; + } + + .mt-xxl-3 { + margin-top: 1rem !important; + } + + .mt-xxl-4 { + margin-top: 1.5rem !important; + } + + .mt-xxl-5 { + margin-top: 3rem !important; + } + + .mt-xxl-auto { + margin-top: auto !important; + } + + .me-xxl-0 { + margin-right: 0 !important; + } + + .me-xxl-1 { + margin-right: 0.25rem !important; + } + + .me-xxl-2 { + margin-right: 0.5rem !important; + } + + .me-xxl-3 { + margin-right: 1rem !important; + } + + .me-xxl-4 { + margin-right: 1.5rem !important; + } + + .me-xxl-5 { + margin-right: 3rem !important; + } + + .me-xxl-auto { + margin-right: auto !important; + } + + .mb-xxl-0 { + margin-bottom: 0 !important; + } + + .mb-xxl-1 { + margin-bottom: 0.25rem !important; + } + + .mb-xxl-2 { + margin-bottom: 0.5rem !important; + } + + .mb-xxl-3 { + margin-bottom: 1rem !important; + } + + .mb-xxl-4 { + margin-bottom: 1.5rem !important; + } + + .mb-xxl-5 { + margin-bottom: 3rem !important; + } + + .mb-xxl-auto { + margin-bottom: auto !important; + } + + .ms-xxl-0 { + margin-left: 0 !important; + } + + .ms-xxl-1 { + margin-left: 0.25rem !important; + } + + .ms-xxl-2 { + margin-left: 0.5rem !important; + } + + .ms-xxl-3 { + margin-left: 1rem !important; + } + + .ms-xxl-4 { + margin-left: 1.5rem !important; + } + + .ms-xxl-5 { + margin-left: 3rem !important; + } + + .ms-xxl-auto { + margin-left: auto !important; + } + + .p-xxl-0 { + padding: 0 !important; + } + + .p-xxl-1 { + padding: 0.25rem !important; + } + + .p-xxl-2 { + padding: 0.5rem !important; + } + + .p-xxl-3 { + padding: 1rem !important; + } + + .p-xxl-4 { + padding: 1.5rem !important; + } + + .p-xxl-5 { + padding: 3rem !important; + } + + .px-xxl-0 { + padding-right: 0 !important; + padding-left: 0 !important; + } + + .px-xxl-1 { + padding-right: 0.25rem !important; + padding-left: 0.25rem !important; + } + + .px-xxl-2 { + padding-right: 0.5rem !important; + padding-left: 0.5rem !important; + } + + .px-xxl-3 { + padding-right: 1rem !important; + padding-left: 1rem !important; + } + + .px-xxl-4 { + padding-right: 1.5rem !important; + padding-left: 1.5rem !important; + } + + .px-xxl-5 { + padding-right: 3rem !important; + padding-left: 3rem !important; + } + + .py-xxl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .py-xxl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .py-xxl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .py-xxl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .py-xxl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .py-xxl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .pt-xxl-0 { + padding-top: 0 !important; + } + + .pt-xxl-1 { + padding-top: 0.25rem !important; + } + + .pt-xxl-2 { + padding-top: 0.5rem !important; + } + + .pt-xxl-3 { + padding-top: 1rem !important; + } + + .pt-xxl-4 { + padding-top: 1.5rem !important; + } + + .pt-xxl-5 { + padding-top: 3rem !important; + } + + .pe-xxl-0 { + padding-right: 0 !important; + } + + .pe-xxl-1 { + padding-right: 0.25rem !important; + } + + .pe-xxl-2 { + padding-right: 0.5rem !important; + } + + .pe-xxl-3 { + padding-right: 1rem !important; + } + + .pe-xxl-4 { + padding-right: 1.5rem !important; + } + + .pe-xxl-5 { + padding-right: 3rem !important; + } + + .pb-xxl-0 { + padding-bottom: 0 !important; + } + + .pb-xxl-1 { + padding-bottom: 0.25rem !important; + } + + .pb-xxl-2 { + padding-bottom: 0.5rem !important; + } + + .pb-xxl-3 { + padding-bottom: 1rem !important; + } + + .pb-xxl-4 { + padding-bottom: 1.5rem !important; + } + + .pb-xxl-5 { + padding-bottom: 3rem !important; + } + + .ps-xxl-0 { + padding-left: 0 !important; + } + + .ps-xxl-1 { + padding-left: 0.25rem !important; + } + + .ps-xxl-2 { + padding-left: 0.5rem !important; + } + + .ps-xxl-3 { + padding-left: 1rem !important; + } + + .ps-xxl-4 { + padding-left: 1.5rem !important; + } + + .ps-xxl-5 { + padding-left: 3rem !important; + } +} +@media print { + .d-print-inline { + display: inline !important; + } + + .d-print-inline-block { + display: inline-block !important; + } + + .d-print-block { + display: block !important; + } + + .d-print-grid { + display: grid !important; + } + + .d-print-table { + display: table !important; + } + + .d-print-table-row { + display: table-row !important; + } + + .d-print-table-cell { + display: table-cell !important; + } + + .d-print-flex { + display: flex !important; + } + + .d-print-inline-flex { + display: inline-flex !important; + } + + .d-print-none { + display: none !important; + } +} + +/*# sourceMappingURL=bootstrap-grid.css.map */ \ No newline at end of file diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map new file mode 100644 index 0000000..c006d39 --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../scss/bootstrap-grid.scss","../../scss/_containers.scss","../../scss/mixins/_container.scss","bootstrap-grid.css","../../scss/mixins/_breakpoints.scss","../../scss/_variables.scss","../../scss/_grid.scss","../../scss/mixins/_grid.scss","../../scss/mixins/_utilities.scss","../../scss/utilities/_api.scss"],"names":[],"mappings":"AAAA;;;;;EAAA;ACME;;;;;;;ECHA,WAAA;EACA,0CAAA;EACA,yCAAA;EACA,kBAAA;EACA,iBAAA;ACWF;;AC6CI;EH5CE;IACE,gBIuce;EFpcrB;AACF;ACuCI;EH5CE;IACE,gBIuce;EF/brB;AACF;ACkCI;EH5CE;IACE,gBIuce;EF1brB;AACF;AC6BI;EH5CE;IACE,iBIuce;EFrbrB;AACF;ACwBI;EH5CE;IACE,iBIuce;EFhbrB;AACF;AGvCE;ECAA,qBAAA;EACA,gBAAA;EACA,aAAA;EACA,eAAA;EACA,yCAAA;EACA,4CAAA;EACA,2CAAA;AJ0CF;AG7CI;ECQF,sBAAA;EAIA,cAAA;EACA,WAAA;EACA,eAAA;EACA,4CAAA;EACA,2CAAA;EACA,8BAAA;AJqCF;;AIUM;EACE,YAAA;AJPR;;AIUM;EApCJ,cAAA;EACA,WAAA;AJ8BF;;AIhBE;EACE,cAAA;EACA,WAAA;AJmBJ;;AIrBE;EACE,cAAA;EACA,UAAA;AJwBJ;;AI1BE;EACE,cAAA;EACA,qBAAA;AJ6BJ;;AI/BE;EACE,cAAA;EACA,UAAA;AJkCJ;;AIpCE;EACE,cAAA;EACA,UAAA;AJuCJ;;AIzCE;EACE,cAAA;EACA,qBAAA;AJ4CJ;;AIbM;EAhDJ,cAAA;EACA,WAAA;AJiEF;;AIZU;EAhEN,cAAA;EACA,kBAAA;AJgFJ;;AIjBU;EAhEN,cAAA;EACA,mBAAA;AJqFJ;;AItBU;EAhEN,cAAA;EACA,UAAA;AJ0FJ;;AI3BU;EAhEN,cAAA;EACA,mBAAA;AJ+FJ;;AIhCU;EAhEN,cAAA;EACA,mBAAA;AJoGJ;;AIrCU;EAhEN,cAAA;EACA,UAAA;AJyGJ;;AI1CU;EAhEN,cAAA;EACA,mBAAA;AJ8GJ;;AI/CU;EAhEN,cAAA;EACA,mBAAA;AJmHJ;;AIpDU;EAhEN,cAAA;EACA,UAAA;AJwHJ;;AIzDU;EAhEN,cAAA;EACA,mBAAA;AJ6HJ;;AI9DU;EAhEN,cAAA;EACA,mBAAA;AJkIJ;;AInEU;EAhEN,cAAA;EACA,WAAA;AJuIJ;;AIhEY;EAxDV,wBAAA;AJ4HF;;AIpEY;EAxDV,yBAAA;AJgIF;;AIxEY;EAxDV,gBAAA;AJoIF;;AI5EY;EAxDV,yBAAA;AJwIF;;AIhFY;EAxDV,yBAAA;AJ4IF;;AIpFY;EAxDV,gBAAA;AJgJF;;AIxFY;EAxDV,yBAAA;AJoJF;;AI5FY;EAxDV,yBAAA;AJwJF;;AIhGY;EAxDV,gBAAA;AJ4JF;;AIpGY;EAxDV,yBAAA;AJgKF;;AIxGY;EAxDV,yBAAA;AJoKF;;AIjGQ;;EAEE,gBAAA;AJoGV;;AIjGQ;;EAEE,gBAAA;AJoGV;;AI3GQ;;EAEE,sBAAA;AJ8GV;;AI3GQ;;EAEE,sBAAA;AJ8GV;;AIrHQ;;EAEE,qBAAA;AJwHV;;AIrHQ;;EAEE,qBAAA;AJwHV;;AI/HQ;;EAEE,mBAAA;AJkIV;;AI/HQ;;EAEE,mBAAA;AJkIV;;AIzIQ;;EAEE,qBAAA;AJ4IV;;AIzIQ;;EAEE,qBAAA;AJ4IV;;AInJQ;;EAEE,mBAAA;AJsJV;;AInJQ;;EAEE,mBAAA;AJsJV;;AC/MI;EGSE;IACE,YAAA;EJ0MN;;EIvMI;IApCJ,cAAA;IACA,WAAA;EJ+OA;;EIjOA;IACE,cAAA;IACA,WAAA;EJoOF;;EItOA;IACE,cAAA;IACA,UAAA;EJyOF;;EI3OA;IACE,cAAA;IACA,qBAAA;EJ8OF;;EIhPA;IACE,cAAA;IACA,UAAA;EJmPF;;EIrPA;IACE,cAAA;IACA,UAAA;EJwPF;;EI1PA;IACE,cAAA;IACA,qBAAA;EJ6PF;;EI9NI;IAhDJ,cAAA;IACA,WAAA;EJkRA;;EI7NQ;IAhEN,cAAA;IACA,kBAAA;EJiSF;;EIlOQ;IAhEN,cAAA;IACA,mBAAA;EJsSF;;EIvOQ;IAhEN,cAAA;IACA,UAAA;EJ2SF;;EI5OQ;IAhEN,cAAA;IACA,mBAAA;EJgTF;;EIjPQ;IAhEN,cAAA;IACA,mBAAA;EJqTF;;EItPQ;IAhEN,cAAA;IACA,UAAA;EJ0TF;;EI3PQ;IAhEN,cAAA;IACA,mBAAA;EJ+TF;;EIhQQ;IAhEN,cAAA;IACA,mBAAA;EJoUF;;EIrQQ;IAhEN,cAAA;IACA,UAAA;EJyUF;;EI1QQ;IAhEN,cAAA;IACA,mBAAA;EJ8UF;;EI/QQ;IAhEN,cAAA;IACA,mBAAA;EJmVF;;EIpRQ;IAhEN,cAAA;IACA,WAAA;EJwVF;;EIjRU;IAxDV,cAAA;EJ6UA;;EIrRU;IAxDV,wBAAA;EJiVA;;EIzRU;IAxDV,yBAAA;EJqVA;;EI7RU;IAxDV,gBAAA;EJyVA;;EIjSU;IAxDV,yBAAA;EJ6VA;;EIrSU;IAxDV,yBAAA;EJiWA;;EIzSU;IAxDV,gBAAA;EJqWA;;EI7SU;IAxDV,yBAAA;EJyWA;;EIjTU;IAxDV,yBAAA;EJ6WA;;EIrTU;IAxDV,gBAAA;EJiXA;;EIzTU;IAxDV,yBAAA;EJqXA;;EI7TU;IAxDV,yBAAA;EJyXA;;EItTM;;IAEE,gBAAA;EJyTR;;EItTM;;IAEE,gBAAA;EJyTR;;EIhUM;;IAEE,sBAAA;EJmUR;;EIhUM;;IAEE,sBAAA;EJmUR;;EI1UM;;IAEE,qBAAA;EJ6UR;;EI1UM;;IAEE,qBAAA;EJ6UR;;EIpVM;;IAEE,mBAAA;EJuVR;;EIpVM;;IAEE,mBAAA;EJuVR;;EI9VM;;IAEE,qBAAA;EJiWR;;EI9VM;;IAEE,qBAAA;EJiWR;;EIxWM;;IAEE,mBAAA;EJ2WR;;EIxWM;;IAEE,mBAAA;EJ2WR;AACF;ACraI;EGSE;IACE,YAAA;EJ+ZN;;EI5ZI;IApCJ,cAAA;IACA,WAAA;EJocA;;EItbA;IACE,cAAA;IACA,WAAA;EJybF;;EI3bA;IACE,cAAA;IACA,UAAA;EJ8bF;;EIhcA;IACE,cAAA;IACA,qBAAA;EJmcF;;EIrcA;IACE,cAAA;IACA,UAAA;EJwcF;;EI1cA;IACE,cAAA;IACA,UAAA;EJ6cF;;EI/cA;IACE,cAAA;IACA,qBAAA;EJkdF;;EInbI;IAhDJ,cAAA;IACA,WAAA;EJueA;;EIlbQ;IAhEN,cAAA;IACA,kBAAA;EJsfF;;EIvbQ;IAhEN,cAAA;IACA,mBAAA;EJ2fF;;EI5bQ;IAhEN,cAAA;IACA,UAAA;EJggBF;;EIjcQ;IAhEN,cAAA;IACA,mBAAA;EJqgBF;;EItcQ;IAhEN,cAAA;IACA,mBAAA;EJ0gBF;;EI3cQ;IAhEN,cAAA;IACA,UAAA;EJ+gBF;;EIhdQ;IAhEN,cAAA;IACA,mBAAA;EJohBF;;EIrdQ;IAhEN,cAAA;IACA,mBAAA;EJyhBF;;EI1dQ;IAhEN,cAAA;IACA,UAAA;EJ8hBF;;EI/dQ;IAhEN,cAAA;IACA,mBAAA;EJmiBF;;EIpeQ;IAhEN,cAAA;IACA,mBAAA;EJwiBF;;EIzeQ;IAhEN,cAAA;IACA,WAAA;EJ6iBF;;EIteU;IAxDV,cAAA;EJkiBA;;EI1eU;IAxDV,wBAAA;EJsiBA;;EI9eU;IAxDV,yBAAA;EJ0iBA;;EIlfU;IAxDV,gBAAA;EJ8iBA;;EItfU;IAxDV,yBAAA;EJkjBA;;EI1fU;IAxDV,yBAAA;EJsjBA;;EI9fU;IAxDV,gBAAA;EJ0jBA;;EIlgBU;IAxDV,yBAAA;EJ8jBA;;EItgBU;IAxDV,yBAAA;EJkkBA;;EI1gBU;IAxDV,gBAAA;EJskBA;;EI9gBU;IAxDV,yBAAA;EJ0kBA;;EIlhBU;IAxDV,yBAAA;EJ8kBA;;EI3gBM;;IAEE,gBAAA;EJ8gBR;;EI3gBM;;IAEE,gBAAA;EJ8gBR;;EIrhBM;;IAEE,sBAAA;EJwhBR;;EIrhBM;;IAEE,sBAAA;EJwhBR;;EI/hBM;;IAEE,qBAAA;EJkiBR;;EI/hBM;;IAEE,qBAAA;EJkiBR;;EIziBM;;IAEE,mBAAA;EJ4iBR;;EIziBM;;IAEE,mBAAA;EJ4iBR;;EInjBM;;IAEE,qBAAA;EJsjBR;;EInjBM;;IAEE,qBAAA;EJsjBR;;EI7jBM;;IAEE,mBAAA;EJgkBR;;EI7jBM;;IAEE,mBAAA;EJgkBR;AACF;AC1nBI;EGSE;IACE,YAAA;EJonBN;;EIjnBI;IApCJ,cAAA;IACA,WAAA;EJypBA;;EI3oBA;IACE,cAAA;IACA,WAAA;EJ8oBF;;EIhpBA;IACE,cAAA;IACA,UAAA;EJmpBF;;EIrpBA;IACE,cAAA;IACA,qBAAA;EJwpBF;;EI1pBA;IACE,cAAA;IACA,UAAA;EJ6pBF;;EI/pBA;IACE,cAAA;IACA,UAAA;EJkqBF;;EIpqBA;IACE,cAAA;IACA,qBAAA;EJuqBF;;EIxoBI;IAhDJ,cAAA;IACA,WAAA;EJ4rBA;;EIvoBQ;IAhEN,cAAA;IACA,kBAAA;EJ2sBF;;EI5oBQ;IAhEN,cAAA;IACA,mBAAA;EJgtBF;;EIjpBQ;IAhEN,cAAA;IACA,UAAA;EJqtBF;;EItpBQ;IAhEN,cAAA;IACA,mBAAA;EJ0tBF;;EI3pBQ;IAhEN,cAAA;IACA,mBAAA;EJ+tBF;;EIhqBQ;IAhEN,cAAA;IACA,UAAA;EJouBF;;EIrqBQ;IAhEN,cAAA;IACA,mBAAA;EJyuBF;;EI1qBQ;IAhEN,cAAA;IACA,mBAAA;EJ8uBF;;EI/qBQ;IAhEN,cAAA;IACA,UAAA;EJmvBF;;EIprBQ;IAhEN,cAAA;IACA,mBAAA;EJwvBF;;EIzrBQ;IAhEN,cAAA;IACA,mBAAA;EJ6vBF;;EI9rBQ;IAhEN,cAAA;IACA,WAAA;EJkwBF;;EI3rBU;IAxDV,cAAA;EJuvBA;;EI/rBU;IAxDV,wBAAA;EJ2vBA;;EInsBU;IAxDV,yBAAA;EJ+vBA;;EIvsBU;IAxDV,gBAAA;EJmwBA;;EI3sBU;IAxDV,yBAAA;EJuwBA;;EI/sBU;IAxDV,yBAAA;EJ2wBA;;EIntBU;IAxDV,gBAAA;EJ+wBA;;EIvtBU;IAxDV,yBAAA;EJmxBA;;EI3tBU;IAxDV,yBAAA;EJuxBA;;EI/tBU;IAxDV,gBAAA;EJ2xBA;;EInuBU;IAxDV,yBAAA;EJ+xBA;;EIvuBU;IAxDV,yBAAA;EJmyBA;;EIhuBM;;IAEE,gBAAA;EJmuBR;;EIhuBM;;IAEE,gBAAA;EJmuBR;;EI1uBM;;IAEE,sBAAA;EJ6uBR;;EI1uBM;;IAEE,sBAAA;EJ6uBR;;EIpvBM;;IAEE,qBAAA;EJuvBR;;EIpvBM;;IAEE,qBAAA;EJuvBR;;EI9vBM;;IAEE,mBAAA;EJiwBR;;EI9vBM;;IAEE,mBAAA;EJiwBR;;EIxwBM;;IAEE,qBAAA;EJ2wBR;;EIxwBM;;IAEE,qBAAA;EJ2wBR;;EIlxBM;;IAEE,mBAAA;EJqxBR;;EIlxBM;;IAEE,mBAAA;EJqxBR;AACF;AC/0BI;EGSE;IACE,YAAA;EJy0BN;;EIt0BI;IApCJ,cAAA;IACA,WAAA;EJ82BA;;EIh2BA;IACE,cAAA;IACA,WAAA;EJm2BF;;EIr2BA;IACE,cAAA;IACA,UAAA;EJw2BF;;EI12BA;IACE,cAAA;IACA,qBAAA;EJ62BF;;EI/2BA;IACE,cAAA;IACA,UAAA;EJk3BF;;EIp3BA;IACE,cAAA;IACA,UAAA;EJu3BF;;EIz3BA;IACE,cAAA;IACA,qBAAA;EJ43BF;;EI71BI;IAhDJ,cAAA;IACA,WAAA;EJi5BA;;EI51BQ;IAhEN,cAAA;IACA,kBAAA;EJg6BF;;EIj2BQ;IAhEN,cAAA;IACA,mBAAA;EJq6BF;;EIt2BQ;IAhEN,cAAA;IACA,UAAA;EJ06BF;;EI32BQ;IAhEN,cAAA;IACA,mBAAA;EJ+6BF;;EIh3BQ;IAhEN,cAAA;IACA,mBAAA;EJo7BF;;EIr3BQ;IAhEN,cAAA;IACA,UAAA;EJy7BF;;EI13BQ;IAhEN,cAAA;IACA,mBAAA;EJ87BF;;EI/3BQ;IAhEN,cAAA;IACA,mBAAA;EJm8BF;;EIp4BQ;IAhEN,cAAA;IACA,UAAA;EJw8BF;;EIz4BQ;IAhEN,cAAA;IACA,mBAAA;EJ68BF;;EI94BQ;IAhEN,cAAA;IACA,mBAAA;EJk9BF;;EIn5BQ;IAhEN,cAAA;IACA,WAAA;EJu9BF;;EIh5BU;IAxDV,cAAA;EJ48BA;;EIp5BU;IAxDV,wBAAA;EJg9BA;;EIx5BU;IAxDV,yBAAA;EJo9BA;;EI55BU;IAxDV,gBAAA;EJw9BA;;EIh6BU;IAxDV,yBAAA;EJ49BA;;EIp6BU;IAxDV,yBAAA;EJg+BA;;EIx6BU;IAxDV,gBAAA;EJo+BA;;EI56BU;IAxDV,yBAAA;EJw+BA;;EIh7BU;IAxDV,yBAAA;EJ4+BA;;EIp7BU;IAxDV,gBAAA;EJg/BA;;EIx7BU;IAxDV,yBAAA;EJo/BA;;EI57BU;IAxDV,yBAAA;EJw/BA;;EIr7BM;;IAEE,gBAAA;EJw7BR;;EIr7BM;;IAEE,gBAAA;EJw7BR;;EI/7BM;;IAEE,sBAAA;EJk8BR;;EI/7BM;;IAEE,sBAAA;EJk8BR;;EIz8BM;;IAEE,qBAAA;EJ48BR;;EIz8BM;;IAEE,qBAAA;EJ48BR;;EIn9BM;;IAEE,mBAAA;EJs9BR;;EIn9BM;;IAEE,mBAAA;EJs9BR;;EI79BM;;IAEE,qBAAA;EJg+BR;;EI79BM;;IAEE,qBAAA;EJg+BR;;EIv+BM;;IAEE,mBAAA;EJ0+BR;;EIv+BM;;IAEE,mBAAA;EJ0+BR;AACF;ACpiCI;EGSE;IACE,YAAA;EJ8hCN;;EI3hCI;IApCJ,cAAA;IACA,WAAA;EJmkCA;;EIrjCA;IACE,cAAA;IACA,WAAA;EJwjCF;;EI1jCA;IACE,cAAA;IACA,UAAA;EJ6jCF;;EI/jCA;IACE,cAAA;IACA,qBAAA;EJkkCF;;EIpkCA;IACE,cAAA;IACA,UAAA;EJukCF;;EIzkCA;IACE,cAAA;IACA,UAAA;EJ4kCF;;EI9kCA;IACE,cAAA;IACA,qBAAA;EJilCF;;EIljCI;IAhDJ,cAAA;IACA,WAAA;EJsmCA;;EIjjCQ;IAhEN,cAAA;IACA,kBAAA;EJqnCF;;EItjCQ;IAhEN,cAAA;IACA,mBAAA;EJ0nCF;;EI3jCQ;IAhEN,cAAA;IACA,UAAA;EJ+nCF;;EIhkCQ;IAhEN,cAAA;IACA,mBAAA;EJooCF;;EIrkCQ;IAhEN,cAAA;IACA,mBAAA;EJyoCF;;EI1kCQ;IAhEN,cAAA;IACA,UAAA;EJ8oCF;;EI/kCQ;IAhEN,cAAA;IACA,mBAAA;EJmpCF;;EIplCQ;IAhEN,cAAA;IACA,mBAAA;EJwpCF;;EIzlCQ;IAhEN,cAAA;IACA,UAAA;EJ6pCF;;EI9lCQ;IAhEN,cAAA;IACA,mBAAA;EJkqCF;;EInmCQ;IAhEN,cAAA;IACA,mBAAA;EJuqCF;;EIxmCQ;IAhEN,cAAA;IACA,WAAA;EJ4qCF;;EIrmCU;IAxDV,cAAA;EJiqCA;;EIzmCU;IAxDV,wBAAA;EJqqCA;;EI7mCU;IAxDV,yBAAA;EJyqCA;;EIjnCU;IAxDV,gBAAA;EJ6qCA;;EIrnCU;IAxDV,yBAAA;EJirCA;;EIznCU;IAxDV,yBAAA;EJqrCA;;EI7nCU;IAxDV,gBAAA;EJyrCA;;EIjoCU;IAxDV,yBAAA;EJ6rCA;;EIroCU;IAxDV,yBAAA;EJisCA;;EIzoCU;IAxDV,gBAAA;EJqsCA;;EI7oCU;IAxDV,yBAAA;EJysCA;;EIjpCU;IAxDV,yBAAA;EJ6sCA;;EI1oCM;;IAEE,gBAAA;EJ6oCR;;EI1oCM;;IAEE,gBAAA;EJ6oCR;;EIppCM;;IAEE,sBAAA;EJupCR;;EIppCM;;IAEE,sBAAA;EJupCR;;EI9pCM;;IAEE,qBAAA;EJiqCR;;EI9pCM;;IAEE,qBAAA;EJiqCR;;EIxqCM;;IAEE,mBAAA;EJ2qCR;;EIxqCM;;IAEE,mBAAA;EJ2qCR;;EIlrCM;;IAEE,qBAAA;EJqrCR;;EIlrCM;;IAEE,qBAAA;EJqrCR;;EI5rCM;;IAEE,mBAAA;EJ+rCR;;EI5rCM;;IAEE,mBAAA;EJ+rCR;AACF;AKzvCQ;EAOI,0BAAA;ALqvCZ;;AK5vCQ;EAOI,gCAAA;ALyvCZ;;AKhwCQ;EAOI,yBAAA;AL6vCZ;;AKpwCQ;EAOI,wBAAA;ALiwCZ;;AKxwCQ;EAOI,yBAAA;ALqwCZ;;AK5wCQ;EAOI,6BAAA;ALywCZ;;AKhxCQ;EAOI,8BAAA;AL6wCZ;;AKpxCQ;EAOI,wBAAA;ALixCZ;;AKxxCQ;EAOI,+BAAA;ALqxCZ;;AK5xCQ;EAOI,wBAAA;ALyxCZ;;AKhyCQ;EAOI,yBAAA;AL6xCZ;;AKpyCQ;EAOI,8BAAA;ALiyCZ;;AKxyCQ;EAOI,iCAAA;ALqyCZ;;AK5yCQ;EAOI,sCAAA;ALyyCZ;;AKhzCQ;EAOI,yCAAA;AL6yCZ;;AKpzCQ;EAOI,uBAAA;ALizCZ;;AKxzCQ;EAOI,uBAAA;ALqzCZ;;AK5zCQ;EAOI,yBAAA;ALyzCZ;;AKh0CQ;EAOI,yBAAA;AL6zCZ;;AKp0CQ;EAOI,0BAAA;ALi0CZ;;AKx0CQ;EAOI,4BAAA;ALq0CZ;;AK50CQ;EAOI,kCAAA;ALy0CZ;;AKh1CQ;EAOI,sCAAA;AL60CZ;;AKp1CQ;EAOI,oCAAA;ALi1CZ;;AKx1CQ;EAOI,kCAAA;ALq1CZ;;AK51CQ;EAOI,yCAAA;ALy1CZ;;AKh2CQ;EAOI,wCAAA;AL61CZ;;AKp2CQ;EAOI,wCAAA;ALi2CZ;;AKx2CQ;EAOI,kCAAA;ALq2CZ;;AK52CQ;EAOI,gCAAA;ALy2CZ;;AKh3CQ;EAOI,8BAAA;AL62CZ;;AKp3CQ;EAOI,gCAAA;ALi3CZ;;AKx3CQ;EAOI,+BAAA;ALq3CZ;;AK53CQ;EAOI,oCAAA;ALy3CZ;;AKh4CQ;EAOI,kCAAA;AL63CZ;;AKp4CQ;EAOI,gCAAA;ALi4CZ;;AKx4CQ;EAOI,uCAAA;ALq4CZ;;AK54CQ;EAOI,sCAAA;ALy4CZ;;AKh5CQ;EAOI,iCAAA;AL64CZ;;AKp5CQ;EAOI,2BAAA;ALi5CZ;;AKx5CQ;EAOI,iCAAA;ALq5CZ;;AK55CQ;EAOI,+BAAA;ALy5CZ;;AKh6CQ;EAOI,6BAAA;AL65CZ;;AKp6CQ;EAOI,+BAAA;ALi6CZ;;AKx6CQ;EAOI,8BAAA;ALq6CZ;;AK56CQ;EAOI,oBAAA;ALy6CZ;;AKh7CQ;EAOI,mBAAA;AL66CZ;;AKp7CQ;EAOI,mBAAA;ALi7CZ;;AKx7CQ;EAOI,mBAAA;ALq7CZ;;AK57CQ;EAOI,mBAAA;ALy7CZ;;AKh8CQ;EAOI,mBAAA;AL67CZ;;AKp8CQ;EAOI,mBAAA;ALi8CZ;;AKx8CQ;EAOI,mBAAA;ALq8CZ;;AK58CQ;EAOI,oBAAA;ALy8CZ;;AKh9CQ;EAOI,0BAAA;AL68CZ;;AKp9CQ;EAOI,yBAAA;ALi9CZ;;AKx9CQ;EAOI,uBAAA;ALq9CZ;;AK59CQ;EAOI,yBAAA;ALy9CZ;;AKh+CQ;EAOI,uBAAA;AL69CZ;;AKp+CQ;EAOI,uBAAA;ALi+CZ;;AKx+CQ;EAOI,0BAAA;EAAA,yBAAA;ALs+CZ;;AK7+CQ;EAOI,gCAAA;EAAA,+BAAA;AL2+CZ;;AKl/CQ;EAOI,+BAAA;EAAA,8BAAA;ALg/CZ;;AKv/CQ;EAOI,6BAAA;EAAA,4BAAA;ALq/CZ;;AK5/CQ;EAOI,+BAAA;EAAA,8BAAA;AL0/CZ;;AKjgDQ;EAOI,6BAAA;EAAA,4BAAA;AL+/CZ;;AKtgDQ;EAOI,6BAAA;EAAA,4BAAA;ALogDZ;;AK3gDQ;EAOI,wBAAA;EAAA,2BAAA;ALygDZ;;AKhhDQ;EAOI,8BAAA;EAAA,iCAAA;AL8gDZ;;AKrhDQ;EAOI,6BAAA;EAAA,gCAAA;ALmhDZ;;AK1hDQ;EAOI,2BAAA;EAAA,8BAAA;ALwhDZ;;AK/hDQ;EAOI,6BAAA;EAAA,gCAAA;AL6hDZ;;AKpiDQ;EAOI,2BAAA;EAAA,8BAAA;ALkiDZ;;AKziDQ;EAOI,2BAAA;EAAA,8BAAA;ALuiDZ;;AK9iDQ;EAOI,wBAAA;AL2iDZ;;AKljDQ;EAOI,8BAAA;AL+iDZ;;AKtjDQ;EAOI,6BAAA;ALmjDZ;;AK1jDQ;EAOI,2BAAA;ALujDZ;;AK9jDQ;EAOI,6BAAA;AL2jDZ;;AKlkDQ;EAOI,2BAAA;AL+jDZ;;AKtkDQ;EAOI,2BAAA;ALmkDZ;;AK1kDQ;EAOI,0BAAA;ALukDZ;;AK9kDQ;EAOI,gCAAA;AL2kDZ;;AKllDQ;EAOI,+BAAA;AL+kDZ;;AKtlDQ;EAOI,6BAAA;ALmlDZ;;AK1lDQ;EAOI,+BAAA;ALulDZ;;AK9lDQ;EAOI,6BAAA;AL2lDZ;;AKlmDQ;EAOI,6BAAA;AL+lDZ;;AKtmDQ;EAOI,2BAAA;ALmmDZ;;AK1mDQ;EAOI,iCAAA;ALumDZ;;AK9mDQ;EAOI,gCAAA;AL2mDZ;;AKlnDQ;EAOI,8BAAA;AL+mDZ;;AKtnDQ;EAOI,gCAAA;ALmnDZ;;AK1nDQ;EAOI,8BAAA;ALunDZ;;AK9nDQ;EAOI,8BAAA;AL2nDZ;;AKloDQ;EAOI,yBAAA;AL+nDZ;;AKtoDQ;EAOI,+BAAA;ALmoDZ;;AK1oDQ;EAOI,8BAAA;ALuoDZ;;AK9oDQ;EAOI,4BAAA;AL2oDZ;;AKlpDQ;EAOI,8BAAA;AL+oDZ;;AKtpDQ;EAOI,4BAAA;ALmpDZ;;AK1pDQ;EAOI,4BAAA;ALupDZ;;AK9pDQ;EAOI,qBAAA;AL2pDZ;;AKlqDQ;EAOI,2BAAA;AL+pDZ;;AKtqDQ;EAOI,0BAAA;ALmqDZ;;AK1qDQ;EAOI,wBAAA;ALuqDZ;;AK9qDQ;EAOI,0BAAA;AL2qDZ;;AKlrDQ;EAOI,wBAAA;AL+qDZ;;AKtrDQ;EAOI,2BAAA;EAAA,0BAAA;ALorDZ;;AK3rDQ;EAOI,iCAAA;EAAA,gCAAA;ALyrDZ;;AKhsDQ;EAOI,gCAAA;EAAA,+BAAA;AL8rDZ;;AKrsDQ;EAOI,8BAAA;EAAA,6BAAA;ALmsDZ;;AK1sDQ;EAOI,gCAAA;EAAA,+BAAA;ALwsDZ;;AK/sDQ;EAOI,8BAAA;EAAA,6BAAA;AL6sDZ;;AKptDQ;EAOI,yBAAA;EAAA,4BAAA;ALktDZ;;AKztDQ;EAOI,+BAAA;EAAA,kCAAA;ALutDZ;;AK9tDQ;EAOI,8BAAA;EAAA,iCAAA;AL4tDZ;;AKnuDQ;EAOI,4BAAA;EAAA,+BAAA;ALiuDZ;;AKxuDQ;EAOI,8BAAA;EAAA,iCAAA;ALsuDZ;;AK7uDQ;EAOI,4BAAA;EAAA,+BAAA;AL2uDZ;;AKlvDQ;EAOI,yBAAA;AL+uDZ;;AKtvDQ;EAOI,+BAAA;ALmvDZ;;AK1vDQ;EAOI,8BAAA;ALuvDZ;;AK9vDQ;EAOI,4BAAA;AL2vDZ;;AKlwDQ;EAOI,8BAAA;AL+vDZ;;AKtwDQ;EAOI,4BAAA;ALmwDZ;;AK1wDQ;EAOI,2BAAA;ALuwDZ;;AK9wDQ;EAOI,iCAAA;AL2wDZ;;AKlxDQ;EAOI,gCAAA;AL+wDZ;;AKtxDQ;EAOI,8BAAA;ALmxDZ;;AK1xDQ;EAOI,gCAAA;ALuxDZ;;AK9xDQ;EAOI,8BAAA;AL2xDZ;;AKlyDQ;EAOI,4BAAA;AL+xDZ;;AKtyDQ;EAOI,kCAAA;ALmyDZ;;AK1yDQ;EAOI,iCAAA;ALuyDZ;;AK9yDQ;EAOI,+BAAA;AL2yDZ;;AKlzDQ;EAOI,iCAAA;AL+yDZ;;AKtzDQ;EAOI,+BAAA;ALmzDZ;;AK1zDQ;EAOI,0BAAA;ALuzDZ;;AK9zDQ;EAOI,gCAAA;AL2zDZ;;AKl0DQ;EAOI,+BAAA;AL+zDZ;;AKt0DQ;EAOI,6BAAA;ALm0DZ;;AK10DQ;EAOI,+BAAA;ALu0DZ;;AK90DQ;EAOI,6BAAA;AL20DZ;;ACl1DI;EIAI;IAOI,0BAAA;ELg1DV;;EKv1DM;IAOI,gCAAA;ELo1DV;;EK31DM;IAOI,yBAAA;ELw1DV;;EK/1DM;IAOI,wBAAA;EL41DV;;EKn2DM;IAOI,yBAAA;ELg2DV;;EKv2DM;IAOI,6BAAA;ELo2DV;;EK32DM;IAOI,8BAAA;ELw2DV;;EK/2DM;IAOI,wBAAA;EL42DV;;EKn3DM;IAOI,+BAAA;ELg3DV;;EKv3DM;IAOI,wBAAA;ELo3DV;;EK33DM;IAOI,yBAAA;ELw3DV;;EK/3DM;IAOI,8BAAA;EL43DV;;EKn4DM;IAOI,iCAAA;ELg4DV;;EKv4DM;IAOI,sCAAA;ELo4DV;;EK34DM;IAOI,yCAAA;ELw4DV;;EK/4DM;IAOI,uBAAA;EL44DV;;EKn5DM;IAOI,uBAAA;ELg5DV;;EKv5DM;IAOI,yBAAA;ELo5DV;;EK35DM;IAOI,yBAAA;ELw5DV;;EK/5DM;IAOI,0BAAA;EL45DV;;EKn6DM;IAOI,4BAAA;ELg6DV;;EKv6DM;IAOI,kCAAA;ELo6DV;;EK36DM;IAOI,sCAAA;ELw6DV;;EK/6DM;IAOI,oCAAA;EL46DV;;EKn7DM;IAOI,kCAAA;ELg7DV;;EKv7DM;IAOI,yCAAA;ELo7DV;;EK37DM;IAOI,wCAAA;ELw7DV;;EK/7DM;IAOI,wCAAA;EL47DV;;EKn8DM;IAOI,kCAAA;ELg8DV;;EKv8DM;IAOI,gCAAA;ELo8DV;;EK38DM;IAOI,8BAAA;ELw8DV;;EK/8DM;IAOI,gCAAA;EL48DV;;EKn9DM;IAOI,+BAAA;ELg9DV;;EKv9DM;IAOI,oCAAA;ELo9DV;;EK39DM;IAOI,kCAAA;ELw9DV;;EK/9DM;IAOI,gCAAA;EL49DV;;EKn+DM;IAOI,uCAAA;ELg+DV;;EKv+DM;IAOI,sCAAA;ELo+DV;;EK3+DM;IAOI,iCAAA;ELw+DV;;EK/+DM;IAOI,2BAAA;EL4+DV;;EKn/DM;IAOI,iCAAA;ELg/DV;;EKv/DM;IAOI,+BAAA;ELo/DV;;EK3/DM;IAOI,6BAAA;ELw/DV;;EK//DM;IAOI,+BAAA;EL4/DV;;EKngEM;IAOI,8BAAA;ELggEV;;EKvgEM;IAOI,oBAAA;ELogEV;;EK3gEM;IAOI,mBAAA;ELwgEV;;EK/gEM;IAOI,mBAAA;EL4gEV;;EKnhEM;IAOI,mBAAA;ELghEV;;EKvhEM;IAOI,mBAAA;ELohEV;;EK3hEM;IAOI,mBAAA;ELwhEV;;EK/hEM;IAOI,mBAAA;EL4hEV;;EKniEM;IAOI,mBAAA;ELgiEV;;EKviEM;IAOI,oBAAA;ELoiEV;;EK3iEM;IAOI,0BAAA;ELwiEV;;EK/iEM;IAOI,yBAAA;EL4iEV;;EKnjEM;IAOI,uBAAA;ELgjEV;;EKvjEM;IAOI,yBAAA;ELojEV;;EK3jEM;IAOI,uBAAA;ELwjEV;;EK/jEM;IAOI,uBAAA;EL4jEV;;EKnkEM;IAOI,0BAAA;IAAA,yBAAA;ELikEV;;EKxkEM;IAOI,gCAAA;IAAA,+BAAA;ELskEV;;EK7kEM;IAOI,+BAAA;IAAA,8BAAA;EL2kEV;;EKllEM;IAOI,6BAAA;IAAA,4BAAA;ELglEV;;EKvlEM;IAOI,+BAAA;IAAA,8BAAA;ELqlEV;;EK5lEM;IAOI,6BAAA;IAAA,4BAAA;EL0lEV;;EKjmEM;IAOI,6BAAA;IAAA,4BAAA;EL+lEV;;EKtmEM;IAOI,wBAAA;IAAA,2BAAA;ELomEV;;EK3mEM;IAOI,8BAAA;IAAA,iCAAA;ELymEV;;EKhnEM;IAOI,6BAAA;IAAA,gCAAA;EL8mEV;;EKrnEM;IAOI,2BAAA;IAAA,8BAAA;ELmnEV;;EK1nEM;IAOI,6BAAA;IAAA,gCAAA;ELwnEV;;EK/nEM;IAOI,2BAAA;IAAA,8BAAA;EL6nEV;;EKpoEM;IAOI,2BAAA;IAAA,8BAAA;ELkoEV;;EKzoEM;IAOI,wBAAA;ELsoEV;;EK7oEM;IAOI,8BAAA;EL0oEV;;EKjpEM;IAOI,6BAAA;EL8oEV;;EKrpEM;IAOI,2BAAA;ELkpEV;;EKzpEM;IAOI,6BAAA;ELspEV;;EK7pEM;IAOI,2BAAA;EL0pEV;;EKjqEM;IAOI,2BAAA;EL8pEV;;EKrqEM;IAOI,0BAAA;ELkqEV;;EKzqEM;IAOI,gCAAA;ELsqEV;;EK7qEM;IAOI,+BAAA;EL0qEV;;EKjrEM;IAOI,6BAAA;EL8qEV;;EKrrEM;IAOI,+BAAA;ELkrEV;;EKzrEM;IAOI,6BAAA;ELsrEV;;EK7rEM;IAOI,6BAAA;EL0rEV;;EKjsEM;IAOI,2BAAA;EL8rEV;;EKrsEM;IAOI,iCAAA;ELksEV;;EKzsEM;IAOI,gCAAA;ELssEV;;EK7sEM;IAOI,8BAAA;EL0sEV;;EKjtEM;IAOI,gCAAA;EL8sEV;;EKrtEM;IAOI,8BAAA;ELktEV;;EKztEM;IAOI,8BAAA;ELstEV;;EK7tEM;IAOI,yBAAA;EL0tEV;;EKjuEM;IAOI,+BAAA;EL8tEV;;EKruEM;IAOI,8BAAA;ELkuEV;;EKzuEM;IAOI,4BAAA;ELsuEV;;EK7uEM;IAOI,8BAAA;EL0uEV;;EKjvEM;IAOI,4BAAA;EL8uEV;;EKrvEM;IAOI,4BAAA;ELkvEV;;EKzvEM;IAOI,qBAAA;ELsvEV;;EK7vEM;IAOI,2BAAA;EL0vEV;;EKjwEM;IAOI,0BAAA;EL8vEV;;EKrwEM;IAOI,wBAAA;ELkwEV;;EKzwEM;IAOI,0BAAA;ELswEV;;EK7wEM;IAOI,wBAAA;EL0wEV;;EKjxEM;IAOI,2BAAA;IAAA,0BAAA;EL+wEV;;EKtxEM;IAOI,iCAAA;IAAA,gCAAA;ELoxEV;;EK3xEM;IAOI,gCAAA;IAAA,+BAAA;ELyxEV;;EKhyEM;IAOI,8BAAA;IAAA,6BAAA;EL8xEV;;EKryEM;IAOI,gCAAA;IAAA,+BAAA;ELmyEV;;EK1yEM;IAOI,8BAAA;IAAA,6BAAA;ELwyEV;;EK/yEM;IAOI,yBAAA;IAAA,4BAAA;EL6yEV;;EKpzEM;IAOI,+BAAA;IAAA,kCAAA;ELkzEV;;EKzzEM;IAOI,8BAAA;IAAA,iCAAA;ELuzEV;;EK9zEM;IAOI,4BAAA;IAAA,+BAAA;EL4zEV;;EKn0EM;IAOI,8BAAA;IAAA,iCAAA;ELi0EV;;EKx0EM;IAOI,4BAAA;IAAA,+BAAA;ELs0EV;;EK70EM;IAOI,yBAAA;EL00EV;;EKj1EM;IAOI,+BAAA;EL80EV;;EKr1EM;IAOI,8BAAA;ELk1EV;;EKz1EM;IAOI,4BAAA;ELs1EV;;EK71EM;IAOI,8BAAA;EL01EV;;EKj2EM;IAOI,4BAAA;EL81EV;;EKr2EM;IAOI,2BAAA;ELk2EV;;EKz2EM;IAOI,iCAAA;ELs2EV;;EK72EM;IAOI,gCAAA;EL02EV;;EKj3EM;IAOI,8BAAA;EL82EV;;EKr3EM;IAOI,gCAAA;ELk3EV;;EKz3EM;IAOI,8BAAA;ELs3EV;;EK73EM;IAOI,4BAAA;EL03EV;;EKj4EM;IAOI,kCAAA;EL83EV;;EKr4EM;IAOI,iCAAA;ELk4EV;;EKz4EM;IAOI,+BAAA;ELs4EV;;EK74EM;IAOI,iCAAA;EL04EV;;EKj5EM;IAOI,+BAAA;EL84EV;;EKr5EM;IAOI,0BAAA;ELk5EV;;EKz5EM;IAOI,gCAAA;ELs5EV;;EK75EM;IAOI,+BAAA;EL05EV;;EKj6EM;IAOI,6BAAA;EL85EV;;EKr6EM;IAOI,+BAAA;ELk6EV;;EKz6EM;IAOI,6BAAA;ELs6EV;AACF;AC96EI;EIAI;IAOI,0BAAA;EL26EV;;EKl7EM;IAOI,gCAAA;EL+6EV;;EKt7EM;IAOI,yBAAA;ELm7EV;;EK17EM;IAOI,wBAAA;ELu7EV;;EK97EM;IAOI,yBAAA;EL27EV;;EKl8EM;IAOI,6BAAA;EL+7EV;;EKt8EM;IAOI,8BAAA;ELm8EV;;EK18EM;IAOI,wBAAA;ELu8EV;;EK98EM;IAOI,+BAAA;EL28EV;;EKl9EM;IAOI,wBAAA;EL+8EV;;EKt9EM;IAOI,yBAAA;ELm9EV;;EK19EM;IAOI,8BAAA;ELu9EV;;EK99EM;IAOI,iCAAA;EL29EV;;EKl+EM;IAOI,sCAAA;EL+9EV;;EKt+EM;IAOI,yCAAA;ELm+EV;;EK1+EM;IAOI,uBAAA;ELu+EV;;EK9+EM;IAOI,uBAAA;EL2+EV;;EKl/EM;IAOI,yBAAA;EL++EV;;EKt/EM;IAOI,yBAAA;ELm/EV;;EK1/EM;IAOI,0BAAA;ELu/EV;;EK9/EM;IAOI,4BAAA;EL2/EV;;EKlgFM;IAOI,kCAAA;EL+/EV;;EKtgFM;IAOI,sCAAA;ELmgFV;;EK1gFM;IAOI,oCAAA;ELugFV;;EK9gFM;IAOI,kCAAA;EL2gFV;;EKlhFM;IAOI,yCAAA;EL+gFV;;EKthFM;IAOI,wCAAA;ELmhFV;;EK1hFM;IAOI,wCAAA;ELuhFV;;EK9hFM;IAOI,kCAAA;EL2hFV;;EKliFM;IAOI,gCAAA;EL+hFV;;EKtiFM;IAOI,8BAAA;ELmiFV;;EK1iFM;IAOI,gCAAA;ELuiFV;;EK9iFM;IAOI,+BAAA;EL2iFV;;EKljFM;IAOI,oCAAA;EL+iFV;;EKtjFM;IAOI,kCAAA;ELmjFV;;EK1jFM;IAOI,gCAAA;ELujFV;;EK9jFM;IAOI,uCAAA;EL2jFV;;EKlkFM;IAOI,sCAAA;EL+jFV;;EKtkFM;IAOI,iCAAA;ELmkFV;;EK1kFM;IAOI,2BAAA;ELukFV;;EK9kFM;IAOI,iCAAA;EL2kFV;;EKllFM;IAOI,+BAAA;EL+kFV;;EKtlFM;IAOI,6BAAA;ELmlFV;;EK1lFM;IAOI,+BAAA;ELulFV;;EK9lFM;IAOI,8BAAA;EL2lFV;;EKlmFM;IAOI,oBAAA;EL+lFV;;EKtmFM;IAOI,mBAAA;ELmmFV;;EK1mFM;IAOI,mBAAA;ELumFV;;EK9mFM;IAOI,mBAAA;EL2mFV;;EKlnFM;IAOI,mBAAA;EL+mFV;;EKtnFM;IAOI,mBAAA;ELmnFV;;EK1nFM;IAOI,mBAAA;ELunFV;;EK9nFM;IAOI,mBAAA;EL2nFV;;EKloFM;IAOI,oBAAA;EL+nFV;;EKtoFM;IAOI,0BAAA;ELmoFV;;EK1oFM;IAOI,yBAAA;ELuoFV;;EK9oFM;IAOI,uBAAA;EL2oFV;;EKlpFM;IAOI,yBAAA;EL+oFV;;EKtpFM;IAOI,uBAAA;ELmpFV;;EK1pFM;IAOI,uBAAA;ELupFV;;EK9pFM;IAOI,0BAAA;IAAA,yBAAA;EL4pFV;;EKnqFM;IAOI,gCAAA;IAAA,+BAAA;ELiqFV;;EKxqFM;IAOI,+BAAA;IAAA,8BAAA;ELsqFV;;EK7qFM;IAOI,6BAAA;IAAA,4BAAA;EL2qFV;;EKlrFM;IAOI,+BAAA;IAAA,8BAAA;ELgrFV;;EKvrFM;IAOI,6BAAA;IAAA,4BAAA;ELqrFV;;EK5rFM;IAOI,6BAAA;IAAA,4BAAA;EL0rFV;;EKjsFM;IAOI,wBAAA;IAAA,2BAAA;EL+rFV;;EKtsFM;IAOI,8BAAA;IAAA,iCAAA;ELosFV;;EK3sFM;IAOI,6BAAA;IAAA,gCAAA;ELysFV;;EKhtFM;IAOI,2BAAA;IAAA,8BAAA;EL8sFV;;EKrtFM;IAOI,6BAAA;IAAA,gCAAA;ELmtFV;;EK1tFM;IAOI,2BAAA;IAAA,8BAAA;ELwtFV;;EK/tFM;IAOI,2BAAA;IAAA,8BAAA;EL6tFV;;EKpuFM;IAOI,wBAAA;ELiuFV;;EKxuFM;IAOI,8BAAA;ELquFV;;EK5uFM;IAOI,6BAAA;ELyuFV;;EKhvFM;IAOI,2BAAA;EL6uFV;;EKpvFM;IAOI,6BAAA;ELivFV;;EKxvFM;IAOI,2BAAA;ELqvFV;;EK5vFM;IAOI,2BAAA;ELyvFV;;EKhwFM;IAOI,0BAAA;EL6vFV;;EKpwFM;IAOI,gCAAA;ELiwFV;;EKxwFM;IAOI,+BAAA;ELqwFV;;EK5wFM;IAOI,6BAAA;ELywFV;;EKhxFM;IAOI,+BAAA;EL6wFV;;EKpxFM;IAOI,6BAAA;ELixFV;;EKxxFM;IAOI,6BAAA;ELqxFV;;EK5xFM;IAOI,2BAAA;ELyxFV;;EKhyFM;IAOI,iCAAA;EL6xFV;;EKpyFM;IAOI,gCAAA;ELiyFV;;EKxyFM;IAOI,8BAAA;ELqyFV;;EK5yFM;IAOI,gCAAA;ELyyFV;;EKhzFM;IAOI,8BAAA;EL6yFV;;EKpzFM;IAOI,8BAAA;ELizFV;;EKxzFM;IAOI,yBAAA;ELqzFV;;EK5zFM;IAOI,+BAAA;ELyzFV;;EKh0FM;IAOI,8BAAA;EL6zFV;;EKp0FM;IAOI,4BAAA;ELi0FV;;EKx0FM;IAOI,8BAAA;ELq0FV;;EK50FM;IAOI,4BAAA;ELy0FV;;EKh1FM;IAOI,4BAAA;EL60FV;;EKp1FM;IAOI,qBAAA;ELi1FV;;EKx1FM;IAOI,2BAAA;ELq1FV;;EK51FM;IAOI,0BAAA;ELy1FV;;EKh2FM;IAOI,wBAAA;EL61FV;;EKp2FM;IAOI,0BAAA;ELi2FV;;EKx2FM;IAOI,wBAAA;ELq2FV;;EK52FM;IAOI,2BAAA;IAAA,0BAAA;EL02FV;;EKj3FM;IAOI,iCAAA;IAAA,gCAAA;EL+2FV;;EKt3FM;IAOI,gCAAA;IAAA,+BAAA;ELo3FV;;EK33FM;IAOI,8BAAA;IAAA,6BAAA;ELy3FV;;EKh4FM;IAOI,gCAAA;IAAA,+BAAA;EL83FV;;EKr4FM;IAOI,8BAAA;IAAA,6BAAA;ELm4FV;;EK14FM;IAOI,yBAAA;IAAA,4BAAA;ELw4FV;;EK/4FM;IAOI,+BAAA;IAAA,kCAAA;EL64FV;;EKp5FM;IAOI,8BAAA;IAAA,iCAAA;ELk5FV;;EKz5FM;IAOI,4BAAA;IAAA,+BAAA;ELu5FV;;EK95FM;IAOI,8BAAA;IAAA,iCAAA;EL45FV;;EKn6FM;IAOI,4BAAA;IAAA,+BAAA;ELi6FV;;EKx6FM;IAOI,yBAAA;ELq6FV;;EK56FM;IAOI,+BAAA;ELy6FV;;EKh7FM;IAOI,8BAAA;EL66FV;;EKp7FM;IAOI,4BAAA;ELi7FV;;EKx7FM;IAOI,8BAAA;ELq7FV;;EK57FM;IAOI,4BAAA;ELy7FV;;EKh8FM;IAOI,2BAAA;EL67FV;;EKp8FM;IAOI,iCAAA;ELi8FV;;EKx8FM;IAOI,gCAAA;ELq8FV;;EK58FM;IAOI,8BAAA;ELy8FV;;EKh9FM;IAOI,gCAAA;EL68FV;;EKp9FM;IAOI,8BAAA;ELi9FV;;EKx9FM;IAOI,4BAAA;ELq9FV;;EK59FM;IAOI,kCAAA;ELy9FV;;EKh+FM;IAOI,iCAAA;EL69FV;;EKp+FM;IAOI,+BAAA;ELi+FV;;EKx+FM;IAOI,iCAAA;ELq+FV;;EK5+FM;IAOI,+BAAA;ELy+FV;;EKh/FM;IAOI,0BAAA;EL6+FV;;EKp/FM;IAOI,gCAAA;ELi/FV;;EKx/FM;IAOI,+BAAA;ELq/FV;;EK5/FM;IAOI,6BAAA;ELy/FV;;EKhgGM;IAOI,+BAAA;EL6/FV;;EKpgGM;IAOI,6BAAA;ELigGV;AACF;ACzgGI;EIAI;IAOI,0BAAA;ELsgGV;;EK7gGM;IAOI,gCAAA;EL0gGV;;EKjhGM;IAOI,yBAAA;EL8gGV;;EKrhGM;IAOI,wBAAA;ELkhGV;;EKzhGM;IAOI,yBAAA;ELshGV;;EK7hGM;IAOI,6BAAA;EL0hGV;;EKjiGM;IAOI,8BAAA;EL8hGV;;EKriGM;IAOI,wBAAA;ELkiGV;;EKziGM;IAOI,+BAAA;ELsiGV;;EK7iGM;IAOI,wBAAA;EL0iGV;;EKjjGM;IAOI,yBAAA;EL8iGV;;EKrjGM;IAOI,8BAAA;ELkjGV;;EKzjGM;IAOI,iCAAA;ELsjGV;;EK7jGM;IAOI,sCAAA;EL0jGV;;EKjkGM;IAOI,yCAAA;EL8jGV;;EKrkGM;IAOI,uBAAA;ELkkGV;;EKzkGM;IAOI,uBAAA;ELskGV;;EK7kGM;IAOI,yBAAA;EL0kGV;;EKjlGM;IAOI,yBAAA;EL8kGV;;EKrlGM;IAOI,0BAAA;ELklGV;;EKzlGM;IAOI,4BAAA;ELslGV;;EK7lGM;IAOI,kCAAA;EL0lGV;;EKjmGM;IAOI,sCAAA;EL8lGV;;EKrmGM;IAOI,oCAAA;ELkmGV;;EKzmGM;IAOI,kCAAA;ELsmGV;;EK7mGM;IAOI,yCAAA;EL0mGV;;EKjnGM;IAOI,wCAAA;EL8mGV;;EKrnGM;IAOI,wCAAA;ELknGV;;EKznGM;IAOI,kCAAA;ELsnGV;;EK7nGM;IAOI,gCAAA;EL0nGV;;EKjoGM;IAOI,8BAAA;EL8nGV;;EKroGM;IAOI,gCAAA;ELkoGV;;EKzoGM;IAOI,+BAAA;ELsoGV;;EK7oGM;IAOI,oCAAA;EL0oGV;;EKjpGM;IAOI,kCAAA;EL8oGV;;EKrpGM;IAOI,gCAAA;ELkpGV;;EKzpGM;IAOI,uCAAA;ELspGV;;EK7pGM;IAOI,sCAAA;EL0pGV;;EKjqGM;IAOI,iCAAA;EL8pGV;;EKrqGM;IAOI,2BAAA;ELkqGV;;EKzqGM;IAOI,iCAAA;ELsqGV;;EK7qGM;IAOI,+BAAA;EL0qGV;;EKjrGM;IAOI,6BAAA;EL8qGV;;EKrrGM;IAOI,+BAAA;ELkrGV;;EKzrGM;IAOI,8BAAA;ELsrGV;;EK7rGM;IAOI,oBAAA;EL0rGV;;EKjsGM;IAOI,mBAAA;EL8rGV;;EKrsGM;IAOI,mBAAA;ELksGV;;EKzsGM;IAOI,mBAAA;ELssGV;;EK7sGM;IAOI,mBAAA;EL0sGV;;EKjtGM;IAOI,mBAAA;EL8sGV;;EKrtGM;IAOI,mBAAA;ELktGV;;EKztGM;IAOI,mBAAA;ELstGV;;EK7tGM;IAOI,oBAAA;EL0tGV;;EKjuGM;IAOI,0BAAA;EL8tGV;;EKruGM;IAOI,yBAAA;ELkuGV;;EKzuGM;IAOI,uBAAA;ELsuGV;;EK7uGM;IAOI,yBAAA;EL0uGV;;EKjvGM;IAOI,uBAAA;EL8uGV;;EKrvGM;IAOI,uBAAA;ELkvGV;;EKzvGM;IAOI,0BAAA;IAAA,yBAAA;ELuvGV;;EK9vGM;IAOI,gCAAA;IAAA,+BAAA;EL4vGV;;EKnwGM;IAOI,+BAAA;IAAA,8BAAA;ELiwGV;;EKxwGM;IAOI,6BAAA;IAAA,4BAAA;ELswGV;;EK7wGM;IAOI,+BAAA;IAAA,8BAAA;EL2wGV;;EKlxGM;IAOI,6BAAA;IAAA,4BAAA;ELgxGV;;EKvxGM;IAOI,6BAAA;IAAA,4BAAA;ELqxGV;;EK5xGM;IAOI,wBAAA;IAAA,2BAAA;EL0xGV;;EKjyGM;IAOI,8BAAA;IAAA,iCAAA;EL+xGV;;EKtyGM;IAOI,6BAAA;IAAA,gCAAA;ELoyGV;;EK3yGM;IAOI,2BAAA;IAAA,8BAAA;ELyyGV;;EKhzGM;IAOI,6BAAA;IAAA,gCAAA;EL8yGV;;EKrzGM;IAOI,2BAAA;IAAA,8BAAA;ELmzGV;;EK1zGM;IAOI,2BAAA;IAAA,8BAAA;ELwzGV;;EK/zGM;IAOI,wBAAA;EL4zGV;;EKn0GM;IAOI,8BAAA;ELg0GV;;EKv0GM;IAOI,6BAAA;ELo0GV;;EK30GM;IAOI,2BAAA;ELw0GV;;EK/0GM;IAOI,6BAAA;EL40GV;;EKn1GM;IAOI,2BAAA;ELg1GV;;EKv1GM;IAOI,2BAAA;ELo1GV;;EK31GM;IAOI,0BAAA;ELw1GV;;EK/1GM;IAOI,gCAAA;EL41GV;;EKn2GM;IAOI,+BAAA;ELg2GV;;EKv2GM;IAOI,6BAAA;ELo2GV;;EK32GM;IAOI,+BAAA;ELw2GV;;EK/2GM;IAOI,6BAAA;EL42GV;;EKn3GM;IAOI,6BAAA;ELg3GV;;EKv3GM;IAOI,2BAAA;ELo3GV;;EK33GM;IAOI,iCAAA;ELw3GV;;EK/3GM;IAOI,gCAAA;EL43GV;;EKn4GM;IAOI,8BAAA;ELg4GV;;EKv4GM;IAOI,gCAAA;ELo4GV;;EK34GM;IAOI,8BAAA;ELw4GV;;EK/4GM;IAOI,8BAAA;EL44GV;;EKn5GM;IAOI,yBAAA;ELg5GV;;EKv5GM;IAOI,+BAAA;ELo5GV;;EK35GM;IAOI,8BAAA;ELw5GV;;EK/5GM;IAOI,4BAAA;EL45GV;;EKn6GM;IAOI,8BAAA;ELg6GV;;EKv6GM;IAOI,4BAAA;ELo6GV;;EK36GM;IAOI,4BAAA;ELw6GV;;EK/6GM;IAOI,qBAAA;EL46GV;;EKn7GM;IAOI,2BAAA;ELg7GV;;EKv7GM;IAOI,0BAAA;ELo7GV;;EK37GM;IAOI,wBAAA;ELw7GV;;EK/7GM;IAOI,0BAAA;EL47GV;;EKn8GM;IAOI,wBAAA;ELg8GV;;EKv8GM;IAOI,2BAAA;IAAA,0BAAA;ELq8GV;;EK58GM;IAOI,iCAAA;IAAA,gCAAA;EL08GV;;EKj9GM;IAOI,gCAAA;IAAA,+BAAA;EL+8GV;;EKt9GM;IAOI,8BAAA;IAAA,6BAAA;ELo9GV;;EK39GM;IAOI,gCAAA;IAAA,+BAAA;ELy9GV;;EKh+GM;IAOI,8BAAA;IAAA,6BAAA;EL89GV;;EKr+GM;IAOI,yBAAA;IAAA,4BAAA;ELm+GV;;EK1+GM;IAOI,+BAAA;IAAA,kCAAA;ELw+GV;;EK/+GM;IAOI,8BAAA;IAAA,iCAAA;EL6+GV;;EKp/GM;IAOI,4BAAA;IAAA,+BAAA;ELk/GV;;EKz/GM;IAOI,8BAAA;IAAA,iCAAA;ELu/GV;;EK9/GM;IAOI,4BAAA;IAAA,+BAAA;EL4/GV;;EKngHM;IAOI,yBAAA;ELggHV;;EKvgHM;IAOI,+BAAA;ELogHV;;EK3gHM;IAOI,8BAAA;ELwgHV;;EK/gHM;IAOI,4BAAA;EL4gHV;;EKnhHM;IAOI,8BAAA;ELghHV;;EKvhHM;IAOI,4BAAA;ELohHV;;EK3hHM;IAOI,2BAAA;ELwhHV;;EK/hHM;IAOI,iCAAA;EL4hHV;;EKniHM;IAOI,gCAAA;ELgiHV;;EKviHM;IAOI,8BAAA;ELoiHV;;EK3iHM;IAOI,gCAAA;ELwiHV;;EK/iHM;IAOI,8BAAA;EL4iHV;;EKnjHM;IAOI,4BAAA;ELgjHV;;EKvjHM;IAOI,kCAAA;ELojHV;;EK3jHM;IAOI,iCAAA;ELwjHV;;EK/jHM;IAOI,+BAAA;EL4jHV;;EKnkHM;IAOI,iCAAA;ELgkHV;;EKvkHM;IAOI,+BAAA;ELokHV;;EK3kHM;IAOI,0BAAA;ELwkHV;;EK/kHM;IAOI,gCAAA;EL4kHV;;EKnlHM;IAOI,+BAAA;ELglHV;;EKvlHM;IAOI,6BAAA;ELolHV;;EK3lHM;IAOI,+BAAA;ELwlHV;;EK/lHM;IAOI,6BAAA;EL4lHV;AACF;ACpmHI;EIAI;IAOI,0BAAA;ELimHV;;EKxmHM;IAOI,gCAAA;ELqmHV;;EK5mHM;IAOI,yBAAA;ELymHV;;EKhnHM;IAOI,wBAAA;EL6mHV;;EKpnHM;IAOI,yBAAA;ELinHV;;EKxnHM;IAOI,6BAAA;ELqnHV;;EK5nHM;IAOI,8BAAA;ELynHV;;EKhoHM;IAOI,wBAAA;EL6nHV;;EKpoHM;IAOI,+BAAA;ELioHV;;EKxoHM;IAOI,wBAAA;ELqoHV;;EK5oHM;IAOI,yBAAA;ELyoHV;;EKhpHM;IAOI,8BAAA;EL6oHV;;EKppHM;IAOI,iCAAA;ELipHV;;EKxpHM;IAOI,sCAAA;ELqpHV;;EK5pHM;IAOI,yCAAA;ELypHV;;EKhqHM;IAOI,uBAAA;EL6pHV;;EKpqHM;IAOI,uBAAA;ELiqHV;;EKxqHM;IAOI,yBAAA;ELqqHV;;EK5qHM;IAOI,yBAAA;ELyqHV;;EKhrHM;IAOI,0BAAA;EL6qHV;;EKprHM;IAOI,4BAAA;ELirHV;;EKxrHM;IAOI,kCAAA;ELqrHV;;EK5rHM;IAOI,sCAAA;ELyrHV;;EKhsHM;IAOI,oCAAA;EL6rHV;;EKpsHM;IAOI,kCAAA;ELisHV;;EKxsHM;IAOI,yCAAA;ELqsHV;;EK5sHM;IAOI,wCAAA;ELysHV;;EKhtHM;IAOI,wCAAA;EL6sHV;;EKptHM;IAOI,kCAAA;ELitHV;;EKxtHM;IAOI,gCAAA;ELqtHV;;EK5tHM;IAOI,8BAAA;ELytHV;;EKhuHM;IAOI,gCAAA;EL6tHV;;EKpuHM;IAOI,+BAAA;ELiuHV;;EKxuHM;IAOI,oCAAA;ELquHV;;EK5uHM;IAOI,kCAAA;ELyuHV;;EKhvHM;IAOI,gCAAA;EL6uHV;;EKpvHM;IAOI,uCAAA;ELivHV;;EKxvHM;IAOI,sCAAA;ELqvHV;;EK5vHM;IAOI,iCAAA;ELyvHV;;EKhwHM;IAOI,2BAAA;EL6vHV;;EKpwHM;IAOI,iCAAA;ELiwHV;;EKxwHM;IAOI,+BAAA;ELqwHV;;EK5wHM;IAOI,6BAAA;ELywHV;;EKhxHM;IAOI,+BAAA;EL6wHV;;EKpxHM;IAOI,8BAAA;ELixHV;;EKxxHM;IAOI,oBAAA;ELqxHV;;EK5xHM;IAOI,mBAAA;ELyxHV;;EKhyHM;IAOI,mBAAA;EL6xHV;;EKpyHM;IAOI,mBAAA;ELiyHV;;EKxyHM;IAOI,mBAAA;ELqyHV;;EK5yHM;IAOI,mBAAA;ELyyHV;;EKhzHM;IAOI,mBAAA;EL6yHV;;EKpzHM;IAOI,mBAAA;ELizHV;;EKxzHM;IAOI,oBAAA;ELqzHV;;EK5zHM;IAOI,0BAAA;ELyzHV;;EKh0HM;IAOI,yBAAA;EL6zHV;;EKp0HM;IAOI,uBAAA;ELi0HV;;EKx0HM;IAOI,yBAAA;ELq0HV;;EK50HM;IAOI,uBAAA;ELy0HV;;EKh1HM;IAOI,uBAAA;EL60HV;;EKp1HM;IAOI,0BAAA;IAAA,yBAAA;ELk1HV;;EKz1HM;IAOI,gCAAA;IAAA,+BAAA;ELu1HV;;EK91HM;IAOI,+BAAA;IAAA,8BAAA;EL41HV;;EKn2HM;IAOI,6BAAA;IAAA,4BAAA;ELi2HV;;EKx2HM;IAOI,+BAAA;IAAA,8BAAA;ELs2HV;;EK72HM;IAOI,6BAAA;IAAA,4BAAA;EL22HV;;EKl3HM;IAOI,6BAAA;IAAA,4BAAA;ELg3HV;;EKv3HM;IAOI,wBAAA;IAAA,2BAAA;ELq3HV;;EK53HM;IAOI,8BAAA;IAAA,iCAAA;EL03HV;;EKj4HM;IAOI,6BAAA;IAAA,gCAAA;EL+3HV;;EKt4HM;IAOI,2BAAA;IAAA,8BAAA;ELo4HV;;EK34HM;IAOI,6BAAA;IAAA,gCAAA;ELy4HV;;EKh5HM;IAOI,2BAAA;IAAA,8BAAA;EL84HV;;EKr5HM;IAOI,2BAAA;IAAA,8BAAA;ELm5HV;;EK15HM;IAOI,wBAAA;ELu5HV;;EK95HM;IAOI,8BAAA;EL25HV;;EKl6HM;IAOI,6BAAA;EL+5HV;;EKt6HM;IAOI,2BAAA;ELm6HV;;EK16HM;IAOI,6BAAA;ELu6HV;;EK96HM;IAOI,2BAAA;EL26HV;;EKl7HM;IAOI,2BAAA;EL+6HV;;EKt7HM;IAOI,0BAAA;ELm7HV;;EK17HM;IAOI,gCAAA;ELu7HV;;EK97HM;IAOI,+BAAA;EL27HV;;EKl8HM;IAOI,6BAAA;EL+7HV;;EKt8HM;IAOI,+BAAA;ELm8HV;;EK18HM;IAOI,6BAAA;ELu8HV;;EK98HM;IAOI,6BAAA;EL28HV;;EKl9HM;IAOI,2BAAA;EL+8HV;;EKt9HM;IAOI,iCAAA;ELm9HV;;EK19HM;IAOI,gCAAA;ELu9HV;;EK99HM;IAOI,8BAAA;EL29HV;;EKl+HM;IAOI,gCAAA;EL+9HV;;EKt+HM;IAOI,8BAAA;ELm+HV;;EK1+HM;IAOI,8BAAA;ELu+HV;;EK9+HM;IAOI,yBAAA;EL2+HV;;EKl/HM;IAOI,+BAAA;EL++HV;;EKt/HM;IAOI,8BAAA;ELm/HV;;EK1/HM;IAOI,4BAAA;ELu/HV;;EK9/HM;IAOI,8BAAA;EL2/HV;;EKlgIM;IAOI,4BAAA;EL+/HV;;EKtgIM;IAOI,4BAAA;ELmgIV;;EK1gIM;IAOI,qBAAA;ELugIV;;EK9gIM;IAOI,2BAAA;EL2gIV;;EKlhIM;IAOI,0BAAA;EL+gIV;;EKthIM;IAOI,wBAAA;ELmhIV;;EK1hIM;IAOI,0BAAA;ELuhIV;;EK9hIM;IAOI,wBAAA;EL2hIV;;EKliIM;IAOI,2BAAA;IAAA,0BAAA;ELgiIV;;EKviIM;IAOI,iCAAA;IAAA,gCAAA;ELqiIV;;EK5iIM;IAOI,gCAAA;IAAA,+BAAA;EL0iIV;;EKjjIM;IAOI,8BAAA;IAAA,6BAAA;EL+iIV;;EKtjIM;IAOI,gCAAA;IAAA,+BAAA;ELojIV;;EK3jIM;IAOI,8BAAA;IAAA,6BAAA;ELyjIV;;EKhkIM;IAOI,yBAAA;IAAA,4BAAA;EL8jIV;;EKrkIM;IAOI,+BAAA;IAAA,kCAAA;ELmkIV;;EK1kIM;IAOI,8BAAA;IAAA,iCAAA;ELwkIV;;EK/kIM;IAOI,4BAAA;IAAA,+BAAA;EL6kIV;;EKplIM;IAOI,8BAAA;IAAA,iCAAA;ELklIV;;EKzlIM;IAOI,4BAAA;IAAA,+BAAA;ELulIV;;EK9lIM;IAOI,yBAAA;EL2lIV;;EKlmIM;IAOI,+BAAA;EL+lIV;;EKtmIM;IAOI,8BAAA;ELmmIV;;EK1mIM;IAOI,4BAAA;ELumIV;;EK9mIM;IAOI,8BAAA;EL2mIV;;EKlnIM;IAOI,4BAAA;EL+mIV;;EKtnIM;IAOI,2BAAA;ELmnIV;;EK1nIM;IAOI,iCAAA;ELunIV;;EK9nIM;IAOI,gCAAA;EL2nIV;;EKloIM;IAOI,8BAAA;EL+nIV;;EKtoIM;IAOI,gCAAA;ELmoIV;;EK1oIM;IAOI,8BAAA;ELuoIV;;EK9oIM;IAOI,4BAAA;EL2oIV;;EKlpIM;IAOI,kCAAA;EL+oIV;;EKtpIM;IAOI,iCAAA;ELmpIV;;EK1pIM;IAOI,+BAAA;ELupIV;;EK9pIM;IAOI,iCAAA;EL2pIV;;EKlqIM;IAOI,+BAAA;EL+pIV;;EKtqIM;IAOI,0BAAA;ELmqIV;;EK1qIM;IAOI,gCAAA;ELuqIV;;EK9qIM;IAOI,+BAAA;EL2qIV;;EKlrIM;IAOI,6BAAA;EL+qIV;;EKtrIM;IAOI,+BAAA;ELmrIV;;EK1rIM;IAOI,6BAAA;ELurIV;AACF;AC/rII;EIAI;IAOI,0BAAA;EL4rIV;;EKnsIM;IAOI,gCAAA;ELgsIV;;EKvsIM;IAOI,yBAAA;ELosIV;;EK3sIM;IAOI,wBAAA;ELwsIV;;EK/sIM;IAOI,yBAAA;EL4sIV;;EKntIM;IAOI,6BAAA;ELgtIV;;EKvtIM;IAOI,8BAAA;ELotIV;;EK3tIM;IAOI,wBAAA;ELwtIV;;EK/tIM;IAOI,+BAAA;EL4tIV;;EKnuIM;IAOI,wBAAA;ELguIV;;EKvuIM;IAOI,yBAAA;ELouIV;;EK3uIM;IAOI,8BAAA;ELwuIV;;EK/uIM;IAOI,iCAAA;EL4uIV;;EKnvIM;IAOI,sCAAA;ELgvIV;;EKvvIM;IAOI,yCAAA;ELovIV;;EK3vIM;IAOI,uBAAA;ELwvIV;;EK/vIM;IAOI,uBAAA;EL4vIV;;EKnwIM;IAOI,yBAAA;ELgwIV;;EKvwIM;IAOI,yBAAA;ELowIV;;EK3wIM;IAOI,0BAAA;ELwwIV;;EK/wIM;IAOI,4BAAA;EL4wIV;;EKnxIM;IAOI,kCAAA;ELgxIV;;EKvxIM;IAOI,sCAAA;ELoxIV;;EK3xIM;IAOI,oCAAA;ELwxIV;;EK/xIM;IAOI,kCAAA;EL4xIV;;EKnyIM;IAOI,yCAAA;ELgyIV;;EKvyIM;IAOI,wCAAA;ELoyIV;;EK3yIM;IAOI,wCAAA;ELwyIV;;EK/yIM;IAOI,kCAAA;EL4yIV;;EKnzIM;IAOI,gCAAA;ELgzIV;;EKvzIM;IAOI,8BAAA;ELozIV;;EK3zIM;IAOI,gCAAA;ELwzIV;;EK/zIM;IAOI,+BAAA;EL4zIV;;EKn0IM;IAOI,oCAAA;ELg0IV;;EKv0IM;IAOI,kCAAA;ELo0IV;;EK30IM;IAOI,gCAAA;ELw0IV;;EK/0IM;IAOI,uCAAA;EL40IV;;EKn1IM;IAOI,sCAAA;ELg1IV;;EKv1IM;IAOI,iCAAA;ELo1IV;;EK31IM;IAOI,2BAAA;ELw1IV;;EK/1IM;IAOI,iCAAA;EL41IV;;EKn2IM;IAOI,+BAAA;ELg2IV;;EKv2IM;IAOI,6BAAA;ELo2IV;;EK32IM;IAOI,+BAAA;ELw2IV;;EK/2IM;IAOI,8BAAA;EL42IV;;EKn3IM;IAOI,oBAAA;ELg3IV;;EKv3IM;IAOI,mBAAA;ELo3IV;;EK33IM;IAOI,mBAAA;ELw3IV;;EK/3IM;IAOI,mBAAA;EL43IV;;EKn4IM;IAOI,mBAAA;ELg4IV;;EKv4IM;IAOI,mBAAA;ELo4IV;;EK34IM;IAOI,mBAAA;ELw4IV;;EK/4IM;IAOI,mBAAA;EL44IV;;EKn5IM;IAOI,oBAAA;ELg5IV;;EKv5IM;IAOI,0BAAA;ELo5IV;;EK35IM;IAOI,yBAAA;ELw5IV;;EK/5IM;IAOI,uBAAA;EL45IV;;EKn6IM;IAOI,yBAAA;ELg6IV;;EKv6IM;IAOI,uBAAA;ELo6IV;;EK36IM;IAOI,uBAAA;ELw6IV;;EK/6IM;IAOI,0BAAA;IAAA,yBAAA;EL66IV;;EKp7IM;IAOI,gCAAA;IAAA,+BAAA;ELk7IV;;EKz7IM;IAOI,+BAAA;IAAA,8BAAA;ELu7IV;;EK97IM;IAOI,6BAAA;IAAA,4BAAA;EL47IV;;EKn8IM;IAOI,+BAAA;IAAA,8BAAA;ELi8IV;;EKx8IM;IAOI,6BAAA;IAAA,4BAAA;ELs8IV;;EK78IM;IAOI,6BAAA;IAAA,4BAAA;EL28IV;;EKl9IM;IAOI,wBAAA;IAAA,2BAAA;ELg9IV;;EKv9IM;IAOI,8BAAA;IAAA,iCAAA;ELq9IV;;EK59IM;IAOI,6BAAA;IAAA,gCAAA;EL09IV;;EKj+IM;IAOI,2BAAA;IAAA,8BAAA;EL+9IV;;EKt+IM;IAOI,6BAAA;IAAA,gCAAA;ELo+IV;;EK3+IM;IAOI,2BAAA;IAAA,8BAAA;ELy+IV;;EKh/IM;IAOI,2BAAA;IAAA,8BAAA;EL8+IV;;EKr/IM;IAOI,wBAAA;ELk/IV;;EKz/IM;IAOI,8BAAA;ELs/IV;;EK7/IM;IAOI,6BAAA;EL0/IV;;EKjgJM;IAOI,2BAAA;EL8/IV;;EKrgJM;IAOI,6BAAA;ELkgJV;;EKzgJM;IAOI,2BAAA;ELsgJV;;EK7gJM;IAOI,2BAAA;EL0gJV;;EKjhJM;IAOI,0BAAA;EL8gJV;;EKrhJM;IAOI,gCAAA;ELkhJV;;EKzhJM;IAOI,+BAAA;ELshJV;;EK7hJM;IAOI,6BAAA;EL0hJV;;EKjiJM;IAOI,+BAAA;EL8hJV;;EKriJM;IAOI,6BAAA;ELkiJV;;EKziJM;IAOI,6BAAA;ELsiJV;;EK7iJM;IAOI,2BAAA;EL0iJV;;EKjjJM;IAOI,iCAAA;EL8iJV;;EKrjJM;IAOI,gCAAA;ELkjJV;;EKzjJM;IAOI,8BAAA;ELsjJV;;EK7jJM;IAOI,gCAAA;EL0jJV;;EKjkJM;IAOI,8BAAA;EL8jJV;;EKrkJM;IAOI,8BAAA;ELkkJV;;EKzkJM;IAOI,yBAAA;ELskJV;;EK7kJM;IAOI,+BAAA;EL0kJV;;EKjlJM;IAOI,8BAAA;EL8kJV;;EKrlJM;IAOI,4BAAA;ELklJV;;EKzlJM;IAOI,8BAAA;ELslJV;;EK7lJM;IAOI,4BAAA;EL0lJV;;EKjmJM;IAOI,4BAAA;EL8lJV;;EKrmJM;IAOI,qBAAA;ELkmJV;;EKzmJM;IAOI,2BAAA;ELsmJV;;EK7mJM;IAOI,0BAAA;EL0mJV;;EKjnJM;IAOI,wBAAA;EL8mJV;;EKrnJM;IAOI,0BAAA;ELknJV;;EKznJM;IAOI,wBAAA;ELsnJV;;EK7nJM;IAOI,2BAAA;IAAA,0BAAA;EL2nJV;;EKloJM;IAOI,iCAAA;IAAA,gCAAA;ELgoJV;;EKvoJM;IAOI,gCAAA;IAAA,+BAAA;ELqoJV;;EK5oJM;IAOI,8BAAA;IAAA,6BAAA;EL0oJV;;EKjpJM;IAOI,gCAAA;IAAA,+BAAA;EL+oJV;;EKtpJM;IAOI,8BAAA;IAAA,6BAAA;ELopJV;;EK3pJM;IAOI,yBAAA;IAAA,4BAAA;ELypJV;;EKhqJM;IAOI,+BAAA;IAAA,kCAAA;EL8pJV;;EKrqJM;IAOI,8BAAA;IAAA,iCAAA;ELmqJV;;EK1qJM;IAOI,4BAAA;IAAA,+BAAA;ELwqJV;;EK/qJM;IAOI,8BAAA;IAAA,iCAAA;EL6qJV;;EKprJM;IAOI,4BAAA;IAAA,+BAAA;ELkrJV;;EKzrJM;IAOI,yBAAA;ELsrJV;;EK7rJM;IAOI,+BAAA;EL0rJV;;EKjsJM;IAOI,8BAAA;EL8rJV;;EKrsJM;IAOI,4BAAA;ELksJV;;EKzsJM;IAOI,8BAAA;ELssJV;;EK7sJM;IAOI,4BAAA;EL0sJV;;EKjtJM;IAOI,2BAAA;EL8sJV;;EKrtJM;IAOI,iCAAA;ELktJV;;EKztJM;IAOI,gCAAA;ELstJV;;EK7tJM;IAOI,8BAAA;EL0tJV;;EKjuJM;IAOI,gCAAA;EL8tJV;;EKruJM;IAOI,8BAAA;ELkuJV;;EKzuJM;IAOI,4BAAA;ELsuJV;;EK7uJM;IAOI,kCAAA;EL0uJV;;EKjvJM;IAOI,iCAAA;EL8uJV;;EKrvJM;IAOI,+BAAA;ELkvJV;;EKzvJM;IAOI,iCAAA;ELsvJV;;EK7vJM;IAOI,+BAAA;EL0vJV;;EKjwJM;IAOI,0BAAA;EL8vJV;;EKrwJM;IAOI,gCAAA;ELkwJV;;EKzwJM;IAOI,+BAAA;ELswJV;;EK7wJM;IAOI,6BAAA;EL0wJV;;EKjxJM;IAOI,+BAAA;EL8wJV;;EKrxJM;IAOI,6BAAA;ELkxJV;AACF;AMnzJA;EDyBQ;IAOI,0BAAA;ELuxJV;;EK9xJM;IAOI,gCAAA;EL2xJV;;EKlyJM;IAOI,yBAAA;EL+xJV;;EKtyJM;IAOI,wBAAA;ELmyJV;;EK1yJM;IAOI,yBAAA;ELuyJV;;EK9yJM;IAOI,6BAAA;EL2yJV;;EKlzJM;IAOI,8BAAA;EL+yJV;;EKtzJM;IAOI,wBAAA;ELmzJV;;EK1zJM;IAOI,+BAAA;ELuzJV;;EK9zJM;IAOI,wBAAA;EL2zJV;AACF","file":"bootstrap-grid.css","sourcesContent":["/*!\n * Bootstrap Grid v5.1.0 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n\n$include-column-box-sizing: true !default;\n\n@import \"functions\";\n@import \"variables\";\n\n@import \"mixins/lists\";\n@import \"mixins/breakpoints\";\n@import \"mixins/container\";\n@import \"mixins/grid\";\n@import \"mixins/utilities\";\n\n@import \"vendor/rfs\";\n\n@import \"containers\";\n@import \"grid\";\n\n@import \"utilities\";\n// Only use the utilities we need\n// stylelint-disable-next-line scss/dollar-variable-default\n$utilities: map-get-multiple(\n $utilities,\n (\n \"display\",\n \"order\",\n \"flex\",\n \"flex-direction\",\n \"flex-grow\",\n \"flex-shrink\",\n \"flex-wrap\",\n \"justify-content\",\n \"align-items\",\n \"align-content\",\n \"align-self\",\n \"margin\",\n \"margin-x\",\n \"margin-y\",\n \"margin-top\",\n \"margin-end\",\n \"margin-bottom\",\n \"margin-start\",\n \"negative-margin\",\n \"negative-margin-x\",\n \"negative-margin-y\",\n \"negative-margin-top\",\n \"negative-margin-end\",\n \"negative-margin-bottom\",\n \"negative-margin-start\",\n \"padding\",\n \"padding-x\",\n \"padding-y\",\n \"padding-top\",\n \"padding-end\",\n \"padding-bottom\",\n \"padding-start\",\n )\n);\n\n@import \"utilities/api\";\n","// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n@if $enable-grid-classes {\n // Single container class with breakpoint max-widths\n .container,\n // 100% wide container at all breakpoints\n .container-fluid {\n @include make-container();\n }\n\n // Responsive containers that are 100% wide until a breakpoint\n @each $breakpoint, $container-max-width in $container-max-widths {\n .container-#{$breakpoint} {\n @extend .container-fluid;\n }\n\n @include media-breakpoint-up($breakpoint, $grid-breakpoints) {\n %responsive-container-#{$breakpoint} {\n max-width: $container-max-width;\n }\n\n // Extend each breakpoint which is smaller or equal to the current breakpoint\n $extend-breakpoint: true;\n\n @each $name, $width in $grid-breakpoints {\n @if ($extend-breakpoint) {\n .container#{breakpoint-infix($name, $grid-breakpoints)} {\n @extend %responsive-container-#{$breakpoint};\n }\n\n // Once the current breakpoint is reached, stop extending\n @if ($breakpoint == $name) {\n $extend-breakpoint: false;\n }\n }\n }\n }\n }\n}\n","// Container mixins\n\n@mixin make-container($gutter: $container-padding-x) {\n width: 100%;\n padding-right: var(--#{$variable-prefix}gutter-x, #{$gutter});\n padding-left: var(--#{$variable-prefix}gutter-x, #{$gutter});\n margin-right: auto;\n margin-left: auto;\n}\n","/*!\n * Bootstrap Grid v5.1.0 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n.container,\n.container-fluid,\n.container-xxl,\n.container-xl,\n.container-lg,\n.container-md,\n.container-sm {\n width: 100%;\n padding-right: var(--bs-gutter-x, 0.75rem);\n padding-left: var(--bs-gutter-x, 0.75rem);\n margin-right: auto;\n margin-left: auto;\n}\n\n@media (min-width: 576px) {\n .container-sm, .container {\n max-width: 540px;\n }\n}\n@media (min-width: 768px) {\n .container-md, .container-sm, .container {\n max-width: 720px;\n }\n}\n@media (min-width: 992px) {\n .container-lg, .container-md, .container-sm, .container {\n max-width: 960px;\n }\n}\n@media (min-width: 1200px) {\n .container-xl, .container-lg, .container-md, .container-sm, .container {\n max-width: 1140px;\n }\n}\n@media (min-width: 1400px) {\n .container-xxl, .container-xl, .container-lg, .container-md, .container-sm, .container {\n max-width: 1320px;\n }\n}\n.row {\n --bs-gutter-x: 1.5rem;\n --bs-gutter-y: 0;\n display: flex;\n flex-wrap: wrap;\n margin-top: calc(var(--bs-gutter-y) * -1);\n margin-right: calc(var(--bs-gutter-x) * -.5);\n margin-left: calc(var(--bs-gutter-x) * -.5);\n}\n.row > * {\n box-sizing: border-box;\n flex-shrink: 0;\n width: 100%;\n max-width: 100%;\n padding-right: calc(var(--bs-gutter-x) * .5);\n padding-left: calc(var(--bs-gutter-x) * .5);\n margin-top: var(--bs-gutter-y);\n}\n\n.col {\n flex: 1 0 0%;\n}\n\n.row-cols-auto > * {\n flex: 0 0 auto;\n width: auto;\n}\n\n.row-cols-1 > * {\n flex: 0 0 auto;\n width: 100%;\n}\n\n.row-cols-2 > * {\n flex: 0 0 auto;\n width: 50%;\n}\n\n.row-cols-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n}\n\n.row-cols-4 > * {\n flex: 0 0 auto;\n width: 25%;\n}\n\n.row-cols-5 > * {\n flex: 0 0 auto;\n width: 20%;\n}\n\n.row-cols-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n}\n\n.col-auto {\n flex: 0 0 auto;\n width: auto;\n}\n\n.col-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n}\n\n.col-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n}\n\n.col-3 {\n flex: 0 0 auto;\n width: 25%;\n}\n\n.col-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n}\n\n.col-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n}\n\n.col-6 {\n flex: 0 0 auto;\n width: 50%;\n}\n\n.col-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n}\n\n.col-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n}\n\n.col-9 {\n flex: 0 0 auto;\n width: 75%;\n}\n\n.col-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n}\n\n.col-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n}\n\n.col-12 {\n flex: 0 0 auto;\n width: 100%;\n}\n\n.offset-1 {\n margin-left: 8.33333333%;\n}\n\n.offset-2 {\n margin-left: 16.66666667%;\n}\n\n.offset-3 {\n margin-left: 25%;\n}\n\n.offset-4 {\n margin-left: 33.33333333%;\n}\n\n.offset-5 {\n margin-left: 41.66666667%;\n}\n\n.offset-6 {\n margin-left: 50%;\n}\n\n.offset-7 {\n margin-left: 58.33333333%;\n}\n\n.offset-8 {\n margin-left: 66.66666667%;\n}\n\n.offset-9 {\n margin-left: 75%;\n}\n\n.offset-10 {\n margin-left: 83.33333333%;\n}\n\n.offset-11 {\n margin-left: 91.66666667%;\n}\n\n.g-0,\n.gx-0 {\n --bs-gutter-x: 0;\n}\n\n.g-0,\n.gy-0 {\n --bs-gutter-y: 0;\n}\n\n.g-1,\n.gx-1 {\n --bs-gutter-x: 0.25rem;\n}\n\n.g-1,\n.gy-1 {\n --bs-gutter-y: 0.25rem;\n}\n\n.g-2,\n.gx-2 {\n --bs-gutter-x: 0.5rem;\n}\n\n.g-2,\n.gy-2 {\n --bs-gutter-y: 0.5rem;\n}\n\n.g-3,\n.gx-3 {\n --bs-gutter-x: 1rem;\n}\n\n.g-3,\n.gy-3 {\n --bs-gutter-y: 1rem;\n}\n\n.g-4,\n.gx-4 {\n --bs-gutter-x: 1.5rem;\n}\n\n.g-4,\n.gy-4 {\n --bs-gutter-y: 1.5rem;\n}\n\n.g-5,\n.gx-5 {\n --bs-gutter-x: 3rem;\n}\n\n.g-5,\n.gy-5 {\n --bs-gutter-y: 3rem;\n}\n\n@media (min-width: 576px) {\n .col-sm {\n flex: 1 0 0%;\n }\n\n .row-cols-sm-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-sm-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-sm-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-sm-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-sm-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-sm-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-sm-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-sm-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-sm-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-sm-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-sm-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-sm-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-sm-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-sm-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-sm-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-sm-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-sm-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-sm-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-sm-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-sm-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-sm-0 {\n margin-left: 0;\n }\n\n .offset-sm-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-sm-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-sm-3 {\n margin-left: 25%;\n }\n\n .offset-sm-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-sm-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-sm-6 {\n margin-left: 50%;\n }\n\n .offset-sm-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-sm-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-sm-9 {\n margin-left: 75%;\n }\n\n .offset-sm-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-sm-11 {\n margin-left: 91.66666667%;\n }\n\n .g-sm-0,\n.gx-sm-0 {\n --bs-gutter-x: 0;\n }\n\n .g-sm-0,\n.gy-sm-0 {\n --bs-gutter-y: 0;\n }\n\n .g-sm-1,\n.gx-sm-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-sm-1,\n.gy-sm-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-sm-2,\n.gx-sm-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-sm-2,\n.gy-sm-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-sm-3,\n.gx-sm-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-sm-3,\n.gy-sm-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-sm-4,\n.gx-sm-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-sm-4,\n.gy-sm-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-sm-5,\n.gx-sm-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-sm-5,\n.gy-sm-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 768px) {\n .col-md {\n flex: 1 0 0%;\n }\n\n .row-cols-md-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-md-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-md-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-md-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-md-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-md-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-md-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-md-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-md-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-md-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-md-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-md-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-md-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-md-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-md-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-md-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-md-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-md-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-md-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-md-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-md-0 {\n margin-left: 0;\n }\n\n .offset-md-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-md-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-md-3 {\n margin-left: 25%;\n }\n\n .offset-md-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-md-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-md-6 {\n margin-left: 50%;\n }\n\n .offset-md-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-md-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-md-9 {\n margin-left: 75%;\n }\n\n .offset-md-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-md-11 {\n margin-left: 91.66666667%;\n }\n\n .g-md-0,\n.gx-md-0 {\n --bs-gutter-x: 0;\n }\n\n .g-md-0,\n.gy-md-0 {\n --bs-gutter-y: 0;\n }\n\n .g-md-1,\n.gx-md-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-md-1,\n.gy-md-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-md-2,\n.gx-md-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-md-2,\n.gy-md-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-md-3,\n.gx-md-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-md-3,\n.gy-md-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-md-4,\n.gx-md-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-md-4,\n.gy-md-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-md-5,\n.gx-md-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-md-5,\n.gy-md-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 992px) {\n .col-lg {\n flex: 1 0 0%;\n }\n\n .row-cols-lg-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-lg-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-lg-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-lg-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-lg-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-lg-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-lg-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-lg-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-lg-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-lg-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-lg-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-lg-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-lg-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-lg-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-lg-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-lg-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-lg-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-lg-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-lg-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-lg-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-lg-0 {\n margin-left: 0;\n }\n\n .offset-lg-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-lg-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-lg-3 {\n margin-left: 25%;\n }\n\n .offset-lg-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-lg-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-lg-6 {\n margin-left: 50%;\n }\n\n .offset-lg-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-lg-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-lg-9 {\n margin-left: 75%;\n }\n\n .offset-lg-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-lg-11 {\n margin-left: 91.66666667%;\n }\n\n .g-lg-0,\n.gx-lg-0 {\n --bs-gutter-x: 0;\n }\n\n .g-lg-0,\n.gy-lg-0 {\n --bs-gutter-y: 0;\n }\n\n .g-lg-1,\n.gx-lg-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-lg-1,\n.gy-lg-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-lg-2,\n.gx-lg-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-lg-2,\n.gy-lg-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-lg-3,\n.gx-lg-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-lg-3,\n.gy-lg-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-lg-4,\n.gx-lg-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-lg-4,\n.gy-lg-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-lg-5,\n.gx-lg-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-lg-5,\n.gy-lg-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 1200px) {\n .col-xl {\n flex: 1 0 0%;\n }\n\n .row-cols-xl-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-xl-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-xl-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-xl-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-xl-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-xl-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-xl-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-xl-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-xl-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-xl-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-xl-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-xl-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-xl-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-xl-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-xl-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-xl-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-xl-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-xl-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-xl-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-xl-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-xl-0 {\n margin-left: 0;\n }\n\n .offset-xl-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-xl-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-xl-3 {\n margin-left: 25%;\n }\n\n .offset-xl-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-xl-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-xl-6 {\n margin-left: 50%;\n }\n\n .offset-xl-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-xl-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-xl-9 {\n margin-left: 75%;\n }\n\n .offset-xl-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-xl-11 {\n margin-left: 91.66666667%;\n }\n\n .g-xl-0,\n.gx-xl-0 {\n --bs-gutter-x: 0;\n }\n\n .g-xl-0,\n.gy-xl-0 {\n --bs-gutter-y: 0;\n }\n\n .g-xl-1,\n.gx-xl-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-xl-1,\n.gy-xl-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-xl-2,\n.gx-xl-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-xl-2,\n.gy-xl-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-xl-3,\n.gx-xl-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-xl-3,\n.gy-xl-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-xl-4,\n.gx-xl-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-xl-4,\n.gy-xl-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-xl-5,\n.gx-xl-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-xl-5,\n.gy-xl-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 1400px) {\n .col-xxl {\n flex: 1 0 0%;\n }\n\n .row-cols-xxl-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-xxl-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-xxl-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-xxl-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-xxl-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-xxl-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-xxl-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-xxl-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-xxl-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-xxl-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-xxl-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-xxl-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-xxl-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-xxl-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-xxl-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-xxl-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-xxl-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-xxl-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-xxl-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-xxl-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-xxl-0 {\n margin-left: 0;\n }\n\n .offset-xxl-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-xxl-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-xxl-3 {\n margin-left: 25%;\n }\n\n .offset-xxl-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-xxl-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-xxl-6 {\n margin-left: 50%;\n }\n\n .offset-xxl-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-xxl-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-xxl-9 {\n margin-left: 75%;\n }\n\n .offset-xxl-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-xxl-11 {\n margin-left: 91.66666667%;\n }\n\n .g-xxl-0,\n.gx-xxl-0 {\n --bs-gutter-x: 0;\n }\n\n .g-xxl-0,\n.gy-xxl-0 {\n --bs-gutter-y: 0;\n }\n\n .g-xxl-1,\n.gx-xxl-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-xxl-1,\n.gy-xxl-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-xxl-2,\n.gx-xxl-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-xxl-2,\n.gy-xxl-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-xxl-3,\n.gx-xxl-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-xxl-3,\n.gy-xxl-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-xxl-4,\n.gx-xxl-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-xxl-4,\n.gy-xxl-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-xxl-5,\n.gx-xxl-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-xxl-5,\n.gy-xxl-5 {\n --bs-gutter-y: 3rem;\n }\n}\n.d-inline {\n display: inline !important;\n}\n\n.d-inline-block {\n display: inline-block !important;\n}\n\n.d-block {\n display: block !important;\n}\n\n.d-grid {\n display: grid !important;\n}\n\n.d-table {\n display: table !important;\n}\n\n.d-table-row {\n display: table-row !important;\n}\n\n.d-table-cell {\n display: table-cell !important;\n}\n\n.d-flex {\n display: flex !important;\n}\n\n.d-inline-flex {\n display: inline-flex !important;\n}\n\n.d-none {\n display: none !important;\n}\n\n.flex-fill {\n flex: 1 1 auto !important;\n}\n\n.flex-row {\n flex-direction: row !important;\n}\n\n.flex-column {\n flex-direction: column !important;\n}\n\n.flex-row-reverse {\n flex-direction: row-reverse !important;\n}\n\n.flex-column-reverse {\n flex-direction: column-reverse !important;\n}\n\n.flex-grow-0 {\n flex-grow: 0 !important;\n}\n\n.flex-grow-1 {\n flex-grow: 1 !important;\n}\n\n.flex-shrink-0 {\n flex-shrink: 0 !important;\n}\n\n.flex-shrink-1 {\n flex-shrink: 1 !important;\n}\n\n.flex-wrap {\n flex-wrap: wrap !important;\n}\n\n.flex-nowrap {\n flex-wrap: nowrap !important;\n}\n\n.flex-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n}\n\n.justify-content-start {\n justify-content: flex-start !important;\n}\n\n.justify-content-end {\n justify-content: flex-end !important;\n}\n\n.justify-content-center {\n justify-content: center !important;\n}\n\n.justify-content-between {\n justify-content: space-between !important;\n}\n\n.justify-content-around {\n justify-content: space-around !important;\n}\n\n.justify-content-evenly {\n justify-content: space-evenly !important;\n}\n\n.align-items-start {\n align-items: flex-start !important;\n}\n\n.align-items-end {\n align-items: flex-end !important;\n}\n\n.align-items-center {\n align-items: center !important;\n}\n\n.align-items-baseline {\n align-items: baseline !important;\n}\n\n.align-items-stretch {\n align-items: stretch !important;\n}\n\n.align-content-start {\n align-content: flex-start !important;\n}\n\n.align-content-end {\n align-content: flex-end !important;\n}\n\n.align-content-center {\n align-content: center !important;\n}\n\n.align-content-between {\n align-content: space-between !important;\n}\n\n.align-content-around {\n align-content: space-around !important;\n}\n\n.align-content-stretch {\n align-content: stretch !important;\n}\n\n.align-self-auto {\n align-self: auto !important;\n}\n\n.align-self-start {\n align-self: flex-start !important;\n}\n\n.align-self-end {\n align-self: flex-end !important;\n}\n\n.align-self-center {\n align-self: center !important;\n}\n\n.align-self-baseline {\n align-self: baseline !important;\n}\n\n.align-self-stretch {\n align-self: stretch !important;\n}\n\n.order-first {\n order: -1 !important;\n}\n\n.order-0 {\n order: 0 !important;\n}\n\n.order-1 {\n order: 1 !important;\n}\n\n.order-2 {\n order: 2 !important;\n}\n\n.order-3 {\n order: 3 !important;\n}\n\n.order-4 {\n order: 4 !important;\n}\n\n.order-5 {\n order: 5 !important;\n}\n\n.order-last {\n order: 6 !important;\n}\n\n.m-0 {\n margin: 0 !important;\n}\n\n.m-1 {\n margin: 0.25rem !important;\n}\n\n.m-2 {\n margin: 0.5rem !important;\n}\n\n.m-3 {\n margin: 1rem !important;\n}\n\n.m-4 {\n margin: 1.5rem !important;\n}\n\n.m-5 {\n margin: 3rem !important;\n}\n\n.m-auto {\n margin: auto !important;\n}\n\n.mx-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n}\n\n.mx-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n}\n\n.mx-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n}\n\n.mx-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n}\n\n.mx-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n}\n\n.mx-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n}\n\n.mx-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n}\n\n.my-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n}\n\n.my-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n}\n\n.my-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n}\n\n.my-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n}\n\n.my-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n}\n\n.my-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n}\n\n.my-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n}\n\n.mt-0 {\n margin-top: 0 !important;\n}\n\n.mt-1 {\n margin-top: 0.25rem !important;\n}\n\n.mt-2 {\n margin-top: 0.5rem !important;\n}\n\n.mt-3 {\n margin-top: 1rem !important;\n}\n\n.mt-4 {\n margin-top: 1.5rem !important;\n}\n\n.mt-5 {\n margin-top: 3rem !important;\n}\n\n.mt-auto {\n margin-top: auto !important;\n}\n\n.me-0 {\n margin-right: 0 !important;\n}\n\n.me-1 {\n margin-right: 0.25rem !important;\n}\n\n.me-2 {\n margin-right: 0.5rem !important;\n}\n\n.me-3 {\n margin-right: 1rem !important;\n}\n\n.me-4 {\n margin-right: 1.5rem !important;\n}\n\n.me-5 {\n margin-right: 3rem !important;\n}\n\n.me-auto {\n margin-right: auto !important;\n}\n\n.mb-0 {\n margin-bottom: 0 !important;\n}\n\n.mb-1 {\n margin-bottom: 0.25rem !important;\n}\n\n.mb-2 {\n margin-bottom: 0.5rem !important;\n}\n\n.mb-3 {\n margin-bottom: 1rem !important;\n}\n\n.mb-4 {\n margin-bottom: 1.5rem !important;\n}\n\n.mb-5 {\n margin-bottom: 3rem !important;\n}\n\n.mb-auto {\n margin-bottom: auto !important;\n}\n\n.ms-0 {\n margin-left: 0 !important;\n}\n\n.ms-1 {\n margin-left: 0.25rem !important;\n}\n\n.ms-2 {\n margin-left: 0.5rem !important;\n}\n\n.ms-3 {\n margin-left: 1rem !important;\n}\n\n.ms-4 {\n margin-left: 1.5rem !important;\n}\n\n.ms-5 {\n margin-left: 3rem !important;\n}\n\n.ms-auto {\n margin-left: auto !important;\n}\n\n.p-0 {\n padding: 0 !important;\n}\n\n.p-1 {\n padding: 0.25rem !important;\n}\n\n.p-2 {\n padding: 0.5rem !important;\n}\n\n.p-3 {\n padding: 1rem !important;\n}\n\n.p-4 {\n padding: 1.5rem !important;\n}\n\n.p-5 {\n padding: 3rem !important;\n}\n\n.px-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n}\n\n.px-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n}\n\n.px-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n}\n\n.px-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n}\n\n.px-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n}\n\n.px-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n}\n\n.py-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n}\n\n.py-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n}\n\n.py-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n}\n\n.py-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n}\n\n.py-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n}\n\n.py-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n}\n\n.pt-0 {\n padding-top: 0 !important;\n}\n\n.pt-1 {\n padding-top: 0.25rem !important;\n}\n\n.pt-2 {\n padding-top: 0.5rem !important;\n}\n\n.pt-3 {\n padding-top: 1rem !important;\n}\n\n.pt-4 {\n padding-top: 1.5rem !important;\n}\n\n.pt-5 {\n padding-top: 3rem !important;\n}\n\n.pe-0 {\n padding-right: 0 !important;\n}\n\n.pe-1 {\n padding-right: 0.25rem !important;\n}\n\n.pe-2 {\n padding-right: 0.5rem !important;\n}\n\n.pe-3 {\n padding-right: 1rem !important;\n}\n\n.pe-4 {\n padding-right: 1.5rem !important;\n}\n\n.pe-5 {\n padding-right: 3rem !important;\n}\n\n.pb-0 {\n padding-bottom: 0 !important;\n}\n\n.pb-1 {\n padding-bottom: 0.25rem !important;\n}\n\n.pb-2 {\n padding-bottom: 0.5rem !important;\n}\n\n.pb-3 {\n padding-bottom: 1rem !important;\n}\n\n.pb-4 {\n padding-bottom: 1.5rem !important;\n}\n\n.pb-5 {\n padding-bottom: 3rem !important;\n}\n\n.ps-0 {\n padding-left: 0 !important;\n}\n\n.ps-1 {\n padding-left: 0.25rem !important;\n}\n\n.ps-2 {\n padding-left: 0.5rem !important;\n}\n\n.ps-3 {\n padding-left: 1rem !important;\n}\n\n.ps-4 {\n padding-left: 1.5rem !important;\n}\n\n.ps-5 {\n padding-left: 3rem !important;\n}\n\n@media (min-width: 576px) {\n .d-sm-inline {\n display: inline !important;\n }\n\n .d-sm-inline-block {\n display: inline-block !important;\n }\n\n .d-sm-block {\n display: block !important;\n }\n\n .d-sm-grid {\n display: grid !important;\n }\n\n .d-sm-table {\n display: table !important;\n }\n\n .d-sm-table-row {\n display: table-row !important;\n }\n\n .d-sm-table-cell {\n display: table-cell !important;\n }\n\n .d-sm-flex {\n display: flex !important;\n }\n\n .d-sm-inline-flex {\n display: inline-flex !important;\n }\n\n .d-sm-none {\n display: none !important;\n }\n\n .flex-sm-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-sm-row {\n flex-direction: row !important;\n }\n\n .flex-sm-column {\n flex-direction: column !important;\n }\n\n .flex-sm-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-sm-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-sm-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-sm-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-sm-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-sm-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-sm-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-sm-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-sm-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-sm-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-sm-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-sm-center {\n justify-content: center !important;\n }\n\n .justify-content-sm-between {\n justify-content: space-between !important;\n }\n\n .justify-content-sm-around {\n justify-content: space-around !important;\n }\n\n .justify-content-sm-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-sm-start {\n align-items: flex-start !important;\n }\n\n .align-items-sm-end {\n align-items: flex-end !important;\n }\n\n .align-items-sm-center {\n align-items: center !important;\n }\n\n .align-items-sm-baseline {\n align-items: baseline !important;\n }\n\n .align-items-sm-stretch {\n align-items: stretch !important;\n }\n\n .align-content-sm-start {\n align-content: flex-start !important;\n }\n\n .align-content-sm-end {\n align-content: flex-end !important;\n }\n\n .align-content-sm-center {\n align-content: center !important;\n }\n\n .align-content-sm-between {\n align-content: space-between !important;\n }\n\n .align-content-sm-around {\n align-content: space-around !important;\n }\n\n .align-content-sm-stretch {\n align-content: stretch !important;\n }\n\n .align-self-sm-auto {\n align-self: auto !important;\n }\n\n .align-self-sm-start {\n align-self: flex-start !important;\n }\n\n .align-self-sm-end {\n align-self: flex-end !important;\n }\n\n .align-self-sm-center {\n align-self: center !important;\n }\n\n .align-self-sm-baseline {\n align-self: baseline !important;\n }\n\n .align-self-sm-stretch {\n align-self: stretch !important;\n }\n\n .order-sm-first {\n order: -1 !important;\n }\n\n .order-sm-0 {\n order: 0 !important;\n }\n\n .order-sm-1 {\n order: 1 !important;\n }\n\n .order-sm-2 {\n order: 2 !important;\n }\n\n .order-sm-3 {\n order: 3 !important;\n }\n\n .order-sm-4 {\n order: 4 !important;\n }\n\n .order-sm-5 {\n order: 5 !important;\n }\n\n .order-sm-last {\n order: 6 !important;\n }\n\n .m-sm-0 {\n margin: 0 !important;\n }\n\n .m-sm-1 {\n margin: 0.25rem !important;\n }\n\n .m-sm-2 {\n margin: 0.5rem !important;\n }\n\n .m-sm-3 {\n margin: 1rem !important;\n }\n\n .m-sm-4 {\n margin: 1.5rem !important;\n }\n\n .m-sm-5 {\n margin: 3rem !important;\n }\n\n .m-sm-auto {\n margin: auto !important;\n }\n\n .mx-sm-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-sm-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-sm-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-sm-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-sm-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-sm-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-sm-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-sm-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-sm-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-sm-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-sm-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-sm-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-sm-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-sm-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-sm-0 {\n margin-top: 0 !important;\n }\n\n .mt-sm-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-sm-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-sm-3 {\n margin-top: 1rem !important;\n }\n\n .mt-sm-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-sm-5 {\n margin-top: 3rem !important;\n }\n\n .mt-sm-auto {\n margin-top: auto !important;\n }\n\n .me-sm-0 {\n margin-right: 0 !important;\n }\n\n .me-sm-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-sm-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-sm-3 {\n margin-right: 1rem !important;\n }\n\n .me-sm-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-sm-5 {\n margin-right: 3rem !important;\n }\n\n .me-sm-auto {\n margin-right: auto !important;\n }\n\n .mb-sm-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-sm-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-sm-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-sm-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-sm-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-sm-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-sm-auto {\n margin-bottom: auto !important;\n }\n\n .ms-sm-0 {\n margin-left: 0 !important;\n }\n\n .ms-sm-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-sm-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-sm-3 {\n margin-left: 1rem !important;\n }\n\n .ms-sm-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-sm-5 {\n margin-left: 3rem !important;\n }\n\n .ms-sm-auto {\n margin-left: auto !important;\n }\n\n .p-sm-0 {\n padding: 0 !important;\n }\n\n .p-sm-1 {\n padding: 0.25rem !important;\n }\n\n .p-sm-2 {\n padding: 0.5rem !important;\n }\n\n .p-sm-3 {\n padding: 1rem !important;\n }\n\n .p-sm-4 {\n padding: 1.5rem !important;\n }\n\n .p-sm-5 {\n padding: 3rem !important;\n }\n\n .px-sm-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-sm-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-sm-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-sm-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-sm-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-sm-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-sm-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-sm-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-sm-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-sm-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-sm-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-sm-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-sm-0 {\n padding-top: 0 !important;\n }\n\n .pt-sm-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-sm-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-sm-3 {\n padding-top: 1rem !important;\n }\n\n .pt-sm-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-sm-5 {\n padding-top: 3rem !important;\n }\n\n .pe-sm-0 {\n padding-right: 0 !important;\n }\n\n .pe-sm-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-sm-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-sm-3 {\n padding-right: 1rem !important;\n }\n\n .pe-sm-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-sm-5 {\n padding-right: 3rem !important;\n }\n\n .pb-sm-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-sm-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-sm-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-sm-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-sm-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-sm-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-sm-0 {\n padding-left: 0 !important;\n }\n\n .ps-sm-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-sm-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-sm-3 {\n padding-left: 1rem !important;\n }\n\n .ps-sm-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-sm-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 768px) {\n .d-md-inline {\n display: inline !important;\n }\n\n .d-md-inline-block {\n display: inline-block !important;\n }\n\n .d-md-block {\n display: block !important;\n }\n\n .d-md-grid {\n display: grid !important;\n }\n\n .d-md-table {\n display: table !important;\n }\n\n .d-md-table-row {\n display: table-row !important;\n }\n\n .d-md-table-cell {\n display: table-cell !important;\n }\n\n .d-md-flex {\n display: flex !important;\n }\n\n .d-md-inline-flex {\n display: inline-flex !important;\n }\n\n .d-md-none {\n display: none !important;\n }\n\n .flex-md-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-md-row {\n flex-direction: row !important;\n }\n\n .flex-md-column {\n flex-direction: column !important;\n }\n\n .flex-md-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-md-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-md-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-md-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-md-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-md-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-md-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-md-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-md-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-md-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-md-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-md-center {\n justify-content: center !important;\n }\n\n .justify-content-md-between {\n justify-content: space-between !important;\n }\n\n .justify-content-md-around {\n justify-content: space-around !important;\n }\n\n .justify-content-md-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-md-start {\n align-items: flex-start !important;\n }\n\n .align-items-md-end {\n align-items: flex-end !important;\n }\n\n .align-items-md-center {\n align-items: center !important;\n }\n\n .align-items-md-baseline {\n align-items: baseline !important;\n }\n\n .align-items-md-stretch {\n align-items: stretch !important;\n }\n\n .align-content-md-start {\n align-content: flex-start !important;\n }\n\n .align-content-md-end {\n align-content: flex-end !important;\n }\n\n .align-content-md-center {\n align-content: center !important;\n }\n\n .align-content-md-between {\n align-content: space-between !important;\n }\n\n .align-content-md-around {\n align-content: space-around !important;\n }\n\n .align-content-md-stretch {\n align-content: stretch !important;\n }\n\n .align-self-md-auto {\n align-self: auto !important;\n }\n\n .align-self-md-start {\n align-self: flex-start !important;\n }\n\n .align-self-md-end {\n align-self: flex-end !important;\n }\n\n .align-self-md-center {\n align-self: center !important;\n }\n\n .align-self-md-baseline {\n align-self: baseline !important;\n }\n\n .align-self-md-stretch {\n align-self: stretch !important;\n }\n\n .order-md-first {\n order: -1 !important;\n }\n\n .order-md-0 {\n order: 0 !important;\n }\n\n .order-md-1 {\n order: 1 !important;\n }\n\n .order-md-2 {\n order: 2 !important;\n }\n\n .order-md-3 {\n order: 3 !important;\n }\n\n .order-md-4 {\n order: 4 !important;\n }\n\n .order-md-5 {\n order: 5 !important;\n }\n\n .order-md-last {\n order: 6 !important;\n }\n\n .m-md-0 {\n margin: 0 !important;\n }\n\n .m-md-1 {\n margin: 0.25rem !important;\n }\n\n .m-md-2 {\n margin: 0.5rem !important;\n }\n\n .m-md-3 {\n margin: 1rem !important;\n }\n\n .m-md-4 {\n margin: 1.5rem !important;\n }\n\n .m-md-5 {\n margin: 3rem !important;\n }\n\n .m-md-auto {\n margin: auto !important;\n }\n\n .mx-md-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-md-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-md-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-md-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-md-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-md-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-md-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-md-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-md-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-md-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-md-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-md-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-md-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-md-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-md-0 {\n margin-top: 0 !important;\n }\n\n .mt-md-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-md-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-md-3 {\n margin-top: 1rem !important;\n }\n\n .mt-md-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-md-5 {\n margin-top: 3rem !important;\n }\n\n .mt-md-auto {\n margin-top: auto !important;\n }\n\n .me-md-0 {\n margin-right: 0 !important;\n }\n\n .me-md-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-md-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-md-3 {\n margin-right: 1rem !important;\n }\n\n .me-md-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-md-5 {\n margin-right: 3rem !important;\n }\n\n .me-md-auto {\n margin-right: auto !important;\n }\n\n .mb-md-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-md-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-md-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-md-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-md-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-md-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-md-auto {\n margin-bottom: auto !important;\n }\n\n .ms-md-0 {\n margin-left: 0 !important;\n }\n\n .ms-md-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-md-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-md-3 {\n margin-left: 1rem !important;\n }\n\n .ms-md-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-md-5 {\n margin-left: 3rem !important;\n }\n\n .ms-md-auto {\n margin-left: auto !important;\n }\n\n .p-md-0 {\n padding: 0 !important;\n }\n\n .p-md-1 {\n padding: 0.25rem !important;\n }\n\n .p-md-2 {\n padding: 0.5rem !important;\n }\n\n .p-md-3 {\n padding: 1rem !important;\n }\n\n .p-md-4 {\n padding: 1.5rem !important;\n }\n\n .p-md-5 {\n padding: 3rem !important;\n }\n\n .px-md-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-md-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-md-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-md-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-md-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-md-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-md-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-md-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-md-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-md-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-md-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-md-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-md-0 {\n padding-top: 0 !important;\n }\n\n .pt-md-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-md-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-md-3 {\n padding-top: 1rem !important;\n }\n\n .pt-md-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-md-5 {\n padding-top: 3rem !important;\n }\n\n .pe-md-0 {\n padding-right: 0 !important;\n }\n\n .pe-md-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-md-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-md-3 {\n padding-right: 1rem !important;\n }\n\n .pe-md-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-md-5 {\n padding-right: 3rem !important;\n }\n\n .pb-md-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-md-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-md-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-md-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-md-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-md-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-md-0 {\n padding-left: 0 !important;\n }\n\n .ps-md-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-md-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-md-3 {\n padding-left: 1rem !important;\n }\n\n .ps-md-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-md-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 992px) {\n .d-lg-inline {\n display: inline !important;\n }\n\n .d-lg-inline-block {\n display: inline-block !important;\n }\n\n .d-lg-block {\n display: block !important;\n }\n\n .d-lg-grid {\n display: grid !important;\n }\n\n .d-lg-table {\n display: table !important;\n }\n\n .d-lg-table-row {\n display: table-row !important;\n }\n\n .d-lg-table-cell {\n display: table-cell !important;\n }\n\n .d-lg-flex {\n display: flex !important;\n }\n\n .d-lg-inline-flex {\n display: inline-flex !important;\n }\n\n .d-lg-none {\n display: none !important;\n }\n\n .flex-lg-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-lg-row {\n flex-direction: row !important;\n }\n\n .flex-lg-column {\n flex-direction: column !important;\n }\n\n .flex-lg-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-lg-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-lg-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-lg-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-lg-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-lg-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-lg-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-lg-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-lg-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-lg-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-lg-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-lg-center {\n justify-content: center !important;\n }\n\n .justify-content-lg-between {\n justify-content: space-between !important;\n }\n\n .justify-content-lg-around {\n justify-content: space-around !important;\n }\n\n .justify-content-lg-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-lg-start {\n align-items: flex-start !important;\n }\n\n .align-items-lg-end {\n align-items: flex-end !important;\n }\n\n .align-items-lg-center {\n align-items: center !important;\n }\n\n .align-items-lg-baseline {\n align-items: baseline !important;\n }\n\n .align-items-lg-stretch {\n align-items: stretch !important;\n }\n\n .align-content-lg-start {\n align-content: flex-start !important;\n }\n\n .align-content-lg-end {\n align-content: flex-end !important;\n }\n\n .align-content-lg-center {\n align-content: center !important;\n }\n\n .align-content-lg-between {\n align-content: space-between !important;\n }\n\n .align-content-lg-around {\n align-content: space-around !important;\n }\n\n .align-content-lg-stretch {\n align-content: stretch !important;\n }\n\n .align-self-lg-auto {\n align-self: auto !important;\n }\n\n .align-self-lg-start {\n align-self: flex-start !important;\n }\n\n .align-self-lg-end {\n align-self: flex-end !important;\n }\n\n .align-self-lg-center {\n align-self: center !important;\n }\n\n .align-self-lg-baseline {\n align-self: baseline !important;\n }\n\n .align-self-lg-stretch {\n align-self: stretch !important;\n }\n\n .order-lg-first {\n order: -1 !important;\n }\n\n .order-lg-0 {\n order: 0 !important;\n }\n\n .order-lg-1 {\n order: 1 !important;\n }\n\n .order-lg-2 {\n order: 2 !important;\n }\n\n .order-lg-3 {\n order: 3 !important;\n }\n\n .order-lg-4 {\n order: 4 !important;\n }\n\n .order-lg-5 {\n order: 5 !important;\n }\n\n .order-lg-last {\n order: 6 !important;\n }\n\n .m-lg-0 {\n margin: 0 !important;\n }\n\n .m-lg-1 {\n margin: 0.25rem !important;\n }\n\n .m-lg-2 {\n margin: 0.5rem !important;\n }\n\n .m-lg-3 {\n margin: 1rem !important;\n }\n\n .m-lg-4 {\n margin: 1.5rem !important;\n }\n\n .m-lg-5 {\n margin: 3rem !important;\n }\n\n .m-lg-auto {\n margin: auto !important;\n }\n\n .mx-lg-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-lg-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-lg-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-lg-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-lg-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-lg-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-lg-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-lg-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-lg-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-lg-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-lg-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-lg-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-lg-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-lg-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-lg-0 {\n margin-top: 0 !important;\n }\n\n .mt-lg-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-lg-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-lg-3 {\n margin-top: 1rem !important;\n }\n\n .mt-lg-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-lg-5 {\n margin-top: 3rem !important;\n }\n\n .mt-lg-auto {\n margin-top: auto !important;\n }\n\n .me-lg-0 {\n margin-right: 0 !important;\n }\n\n .me-lg-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-lg-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-lg-3 {\n margin-right: 1rem !important;\n }\n\n .me-lg-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-lg-5 {\n margin-right: 3rem !important;\n }\n\n .me-lg-auto {\n margin-right: auto !important;\n }\n\n .mb-lg-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-lg-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-lg-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-lg-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-lg-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-lg-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-lg-auto {\n margin-bottom: auto !important;\n }\n\n .ms-lg-0 {\n margin-left: 0 !important;\n }\n\n .ms-lg-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-lg-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-lg-3 {\n margin-left: 1rem !important;\n }\n\n .ms-lg-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-lg-5 {\n margin-left: 3rem !important;\n }\n\n .ms-lg-auto {\n margin-left: auto !important;\n }\n\n .p-lg-0 {\n padding: 0 !important;\n }\n\n .p-lg-1 {\n padding: 0.25rem !important;\n }\n\n .p-lg-2 {\n padding: 0.5rem !important;\n }\n\n .p-lg-3 {\n padding: 1rem !important;\n }\n\n .p-lg-4 {\n padding: 1.5rem !important;\n }\n\n .p-lg-5 {\n padding: 3rem !important;\n }\n\n .px-lg-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-lg-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-lg-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-lg-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-lg-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-lg-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-lg-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-lg-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-lg-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-lg-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-lg-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-lg-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-lg-0 {\n padding-top: 0 !important;\n }\n\n .pt-lg-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-lg-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-lg-3 {\n padding-top: 1rem !important;\n }\n\n .pt-lg-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-lg-5 {\n padding-top: 3rem !important;\n }\n\n .pe-lg-0 {\n padding-right: 0 !important;\n }\n\n .pe-lg-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-lg-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-lg-3 {\n padding-right: 1rem !important;\n }\n\n .pe-lg-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-lg-5 {\n padding-right: 3rem !important;\n }\n\n .pb-lg-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-lg-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-lg-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-lg-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-lg-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-lg-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-lg-0 {\n padding-left: 0 !important;\n }\n\n .ps-lg-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-lg-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-lg-3 {\n padding-left: 1rem !important;\n }\n\n .ps-lg-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-lg-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 1200px) {\n .d-xl-inline {\n display: inline !important;\n }\n\n .d-xl-inline-block {\n display: inline-block !important;\n }\n\n .d-xl-block {\n display: block !important;\n }\n\n .d-xl-grid {\n display: grid !important;\n }\n\n .d-xl-table {\n display: table !important;\n }\n\n .d-xl-table-row {\n display: table-row !important;\n }\n\n .d-xl-table-cell {\n display: table-cell !important;\n }\n\n .d-xl-flex {\n display: flex !important;\n }\n\n .d-xl-inline-flex {\n display: inline-flex !important;\n }\n\n .d-xl-none {\n display: none !important;\n }\n\n .flex-xl-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-xl-row {\n flex-direction: row !important;\n }\n\n .flex-xl-column {\n flex-direction: column !important;\n }\n\n .flex-xl-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-xl-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-xl-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-xl-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-xl-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-xl-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-xl-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-xl-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-xl-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-xl-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-xl-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-xl-center {\n justify-content: center !important;\n }\n\n .justify-content-xl-between {\n justify-content: space-between !important;\n }\n\n .justify-content-xl-around {\n justify-content: space-around !important;\n }\n\n .justify-content-xl-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-xl-start {\n align-items: flex-start !important;\n }\n\n .align-items-xl-end {\n align-items: flex-end !important;\n }\n\n .align-items-xl-center {\n align-items: center !important;\n }\n\n .align-items-xl-baseline {\n align-items: baseline !important;\n }\n\n .align-items-xl-stretch {\n align-items: stretch !important;\n }\n\n .align-content-xl-start {\n align-content: flex-start !important;\n }\n\n .align-content-xl-end {\n align-content: flex-end !important;\n }\n\n .align-content-xl-center {\n align-content: center !important;\n }\n\n .align-content-xl-between {\n align-content: space-between !important;\n }\n\n .align-content-xl-around {\n align-content: space-around !important;\n }\n\n .align-content-xl-stretch {\n align-content: stretch !important;\n }\n\n .align-self-xl-auto {\n align-self: auto !important;\n }\n\n .align-self-xl-start {\n align-self: flex-start !important;\n }\n\n .align-self-xl-end {\n align-self: flex-end !important;\n }\n\n .align-self-xl-center {\n align-self: center !important;\n }\n\n .align-self-xl-baseline {\n align-self: baseline !important;\n }\n\n .align-self-xl-stretch {\n align-self: stretch !important;\n }\n\n .order-xl-first {\n order: -1 !important;\n }\n\n .order-xl-0 {\n order: 0 !important;\n }\n\n .order-xl-1 {\n order: 1 !important;\n }\n\n .order-xl-2 {\n order: 2 !important;\n }\n\n .order-xl-3 {\n order: 3 !important;\n }\n\n .order-xl-4 {\n order: 4 !important;\n }\n\n .order-xl-5 {\n order: 5 !important;\n }\n\n .order-xl-last {\n order: 6 !important;\n }\n\n .m-xl-0 {\n margin: 0 !important;\n }\n\n .m-xl-1 {\n margin: 0.25rem !important;\n }\n\n .m-xl-2 {\n margin: 0.5rem !important;\n }\n\n .m-xl-3 {\n margin: 1rem !important;\n }\n\n .m-xl-4 {\n margin: 1.5rem !important;\n }\n\n .m-xl-5 {\n margin: 3rem !important;\n }\n\n .m-xl-auto {\n margin: auto !important;\n }\n\n .mx-xl-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-xl-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-xl-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-xl-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-xl-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-xl-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-xl-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-xl-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-xl-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-xl-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-xl-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-xl-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-xl-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-xl-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-xl-0 {\n margin-top: 0 !important;\n }\n\n .mt-xl-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-xl-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-xl-3 {\n margin-top: 1rem !important;\n }\n\n .mt-xl-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-xl-5 {\n margin-top: 3rem !important;\n }\n\n .mt-xl-auto {\n margin-top: auto !important;\n }\n\n .me-xl-0 {\n margin-right: 0 !important;\n }\n\n .me-xl-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-xl-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-xl-3 {\n margin-right: 1rem !important;\n }\n\n .me-xl-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-xl-5 {\n margin-right: 3rem !important;\n }\n\n .me-xl-auto {\n margin-right: auto !important;\n }\n\n .mb-xl-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-xl-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-xl-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-xl-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-xl-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-xl-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-xl-auto {\n margin-bottom: auto !important;\n }\n\n .ms-xl-0 {\n margin-left: 0 !important;\n }\n\n .ms-xl-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-xl-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-xl-3 {\n margin-left: 1rem !important;\n }\n\n .ms-xl-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-xl-5 {\n margin-left: 3rem !important;\n }\n\n .ms-xl-auto {\n margin-left: auto !important;\n }\n\n .p-xl-0 {\n padding: 0 !important;\n }\n\n .p-xl-1 {\n padding: 0.25rem !important;\n }\n\n .p-xl-2 {\n padding: 0.5rem !important;\n }\n\n .p-xl-3 {\n padding: 1rem !important;\n }\n\n .p-xl-4 {\n padding: 1.5rem !important;\n }\n\n .p-xl-5 {\n padding: 3rem !important;\n }\n\n .px-xl-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-xl-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-xl-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-xl-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-xl-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-xl-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-xl-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-xl-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-xl-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-xl-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-xl-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-xl-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-xl-0 {\n padding-top: 0 !important;\n }\n\n .pt-xl-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-xl-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-xl-3 {\n padding-top: 1rem !important;\n }\n\n .pt-xl-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-xl-5 {\n padding-top: 3rem !important;\n }\n\n .pe-xl-0 {\n padding-right: 0 !important;\n }\n\n .pe-xl-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-xl-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-xl-3 {\n padding-right: 1rem !important;\n }\n\n .pe-xl-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-xl-5 {\n padding-right: 3rem !important;\n }\n\n .pb-xl-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-xl-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-xl-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-xl-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-xl-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-xl-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-xl-0 {\n padding-left: 0 !important;\n }\n\n .ps-xl-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-xl-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-xl-3 {\n padding-left: 1rem !important;\n }\n\n .ps-xl-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-xl-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 1400px) {\n .d-xxl-inline {\n display: inline !important;\n }\n\n .d-xxl-inline-block {\n display: inline-block !important;\n }\n\n .d-xxl-block {\n display: block !important;\n }\n\n .d-xxl-grid {\n display: grid !important;\n }\n\n .d-xxl-table {\n display: table !important;\n }\n\n .d-xxl-table-row {\n display: table-row !important;\n }\n\n .d-xxl-table-cell {\n display: table-cell !important;\n }\n\n .d-xxl-flex {\n display: flex !important;\n }\n\n .d-xxl-inline-flex {\n display: inline-flex !important;\n }\n\n .d-xxl-none {\n display: none !important;\n }\n\n .flex-xxl-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-xxl-row {\n flex-direction: row !important;\n }\n\n .flex-xxl-column {\n flex-direction: column !important;\n }\n\n .flex-xxl-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-xxl-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-xxl-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-xxl-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-xxl-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-xxl-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-xxl-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-xxl-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-xxl-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-xxl-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-xxl-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-xxl-center {\n justify-content: center !important;\n }\n\n .justify-content-xxl-between {\n justify-content: space-between !important;\n }\n\n .justify-content-xxl-around {\n justify-content: space-around !important;\n }\n\n .justify-content-xxl-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-xxl-start {\n align-items: flex-start !important;\n }\n\n .align-items-xxl-end {\n align-items: flex-end !important;\n }\n\n .align-items-xxl-center {\n align-items: center !important;\n }\n\n .align-items-xxl-baseline {\n align-items: baseline !important;\n }\n\n .align-items-xxl-stretch {\n align-items: stretch !important;\n }\n\n .align-content-xxl-start {\n align-content: flex-start !important;\n }\n\n .align-content-xxl-end {\n align-content: flex-end !important;\n }\n\n .align-content-xxl-center {\n align-content: center !important;\n }\n\n .align-content-xxl-between {\n align-content: space-between !important;\n }\n\n .align-content-xxl-around {\n align-content: space-around !important;\n }\n\n .align-content-xxl-stretch {\n align-content: stretch !important;\n }\n\n .align-self-xxl-auto {\n align-self: auto !important;\n }\n\n .align-self-xxl-start {\n align-self: flex-start !important;\n }\n\n .align-self-xxl-end {\n align-self: flex-end !important;\n }\n\n .align-self-xxl-center {\n align-self: center !important;\n }\n\n .align-self-xxl-baseline {\n align-self: baseline !important;\n }\n\n .align-self-xxl-stretch {\n align-self: stretch !important;\n }\n\n .order-xxl-first {\n order: -1 !important;\n }\n\n .order-xxl-0 {\n order: 0 !important;\n }\n\n .order-xxl-1 {\n order: 1 !important;\n }\n\n .order-xxl-2 {\n order: 2 !important;\n }\n\n .order-xxl-3 {\n order: 3 !important;\n }\n\n .order-xxl-4 {\n order: 4 !important;\n }\n\n .order-xxl-5 {\n order: 5 !important;\n }\n\n .order-xxl-last {\n order: 6 !important;\n }\n\n .m-xxl-0 {\n margin: 0 !important;\n }\n\n .m-xxl-1 {\n margin: 0.25rem !important;\n }\n\n .m-xxl-2 {\n margin: 0.5rem !important;\n }\n\n .m-xxl-3 {\n margin: 1rem !important;\n }\n\n .m-xxl-4 {\n margin: 1.5rem !important;\n }\n\n .m-xxl-5 {\n margin: 3rem !important;\n }\n\n .m-xxl-auto {\n margin: auto !important;\n }\n\n .mx-xxl-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-xxl-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-xxl-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-xxl-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-xxl-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-xxl-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-xxl-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-xxl-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-xxl-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-xxl-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-xxl-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-xxl-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-xxl-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-xxl-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-xxl-0 {\n margin-top: 0 !important;\n }\n\n .mt-xxl-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-xxl-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-xxl-3 {\n margin-top: 1rem !important;\n }\n\n .mt-xxl-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-xxl-5 {\n margin-top: 3rem !important;\n }\n\n .mt-xxl-auto {\n margin-top: auto !important;\n }\n\n .me-xxl-0 {\n margin-right: 0 !important;\n }\n\n .me-xxl-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-xxl-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-xxl-3 {\n margin-right: 1rem !important;\n }\n\n .me-xxl-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-xxl-5 {\n margin-right: 3rem !important;\n }\n\n .me-xxl-auto {\n margin-right: auto !important;\n }\n\n .mb-xxl-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-xxl-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-xxl-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-xxl-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-xxl-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-xxl-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-xxl-auto {\n margin-bottom: auto !important;\n }\n\n .ms-xxl-0 {\n margin-left: 0 !important;\n }\n\n .ms-xxl-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-xxl-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-xxl-3 {\n margin-left: 1rem !important;\n }\n\n .ms-xxl-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-xxl-5 {\n margin-left: 3rem !important;\n }\n\n .ms-xxl-auto {\n margin-left: auto !important;\n }\n\n .p-xxl-0 {\n padding: 0 !important;\n }\n\n .p-xxl-1 {\n padding: 0.25rem !important;\n }\n\n .p-xxl-2 {\n padding: 0.5rem !important;\n }\n\n .p-xxl-3 {\n padding: 1rem !important;\n }\n\n .p-xxl-4 {\n padding: 1.5rem !important;\n }\n\n .p-xxl-5 {\n padding: 3rem !important;\n }\n\n .px-xxl-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-xxl-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-xxl-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-xxl-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-xxl-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-xxl-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-xxl-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-xxl-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-xxl-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-xxl-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-xxl-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-xxl-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-xxl-0 {\n padding-top: 0 !important;\n }\n\n .pt-xxl-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-xxl-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-xxl-3 {\n padding-top: 1rem !important;\n }\n\n .pt-xxl-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-xxl-5 {\n padding-top: 3rem !important;\n }\n\n .pe-xxl-0 {\n padding-right: 0 !important;\n }\n\n .pe-xxl-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-xxl-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-xxl-3 {\n padding-right: 1rem !important;\n }\n\n .pe-xxl-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-xxl-5 {\n padding-right: 3rem !important;\n }\n\n .pb-xxl-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-xxl-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-xxl-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-xxl-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-xxl-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-xxl-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-xxl-0 {\n padding-left: 0 !important;\n }\n\n .ps-xxl-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-xxl-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-xxl-3 {\n padding-left: 1rem !important;\n }\n\n .ps-xxl-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-xxl-5 {\n padding-left: 3rem !important;\n }\n}\n@media print {\n .d-print-inline {\n display: inline !important;\n }\n\n .d-print-inline-block {\n display: inline-block !important;\n }\n\n .d-print-block {\n display: block !important;\n }\n\n .d-print-grid {\n display: grid !important;\n }\n\n .d-print-table {\n display: table !important;\n }\n\n .d-print-table-row {\n display: table-row !important;\n }\n\n .d-print-table-cell {\n display: table-cell !important;\n }\n\n .d-print-flex {\n display: flex !important;\n }\n\n .d-print-inline-flex {\n display: inline-flex !important;\n }\n\n .d-print-none {\n display: none !important;\n }\n}\n\n/*# sourceMappingURL=bootstrap-grid.css.map */\n","// Breakpoint viewport sizes and media queries.\n//\n// Breakpoints are defined as a map of (name: minimum width), order from small to large:\n//\n// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)\n//\n// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.\n\n// Name of the next breakpoint, or null for the last breakpoint.\n//\n// >> breakpoint-next(sm)\n// md\n// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// md\n// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))\n// md\n@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {\n $n: index($breakpoint-names, $name);\n @if not $n {\n @error \"breakpoint `#{$name}` not found in `#{$breakpoints}`\";\n }\n @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);\n}\n\n// Minimum breakpoint width. Null for the smallest (first) breakpoint.\n//\n// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// 576px\n@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {\n $min: map-get($breakpoints, $name);\n @return if($min != 0, $min, null);\n}\n\n// Maximum breakpoint width.\n// The maximum value is reduced by 0.02px to work around the limitations of\n// `min-` and `max-` prefixes and viewports with fractional widths.\n// See https://www.w3.org/TR/mediaqueries-4/#mq-min-max\n// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\n// See https://bugs.webkit.org/show_bug.cgi?id=178261\n//\n// >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// 767.98px\n@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {\n $max: map-get($breakpoints, $name);\n @return if($max and $max > 0, $max - .02, null);\n}\n\n// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.\n// Useful for making responsive utilities.\n//\n// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// \"\" (Returns a blank string)\n// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// \"-sm\"\n@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {\n @return if(breakpoint-min($name, $breakpoints) == null, \"\", \"-#{$name}\");\n}\n\n// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.\n// Makes the @content apply to the given breakpoint and wider.\n@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n @if $min {\n @media (min-width: $min) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Media of at most the maximum breakpoint width. No query for the largest breakpoint.\n// Makes the @content apply to the given breakpoint and narrower.\n@mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) {\n $max: breakpoint-max($name, $breakpoints);\n @if $max {\n @media (max-width: $max) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Media that spans multiple breakpoint widths.\n// Makes the @content apply between the min and max breakpoints\n@mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($lower, $breakpoints);\n $max: breakpoint-max($upper, $breakpoints);\n\n @if $min != null and $max != null {\n @media (min-width: $min) and (max-width: $max) {\n @content;\n }\n } @else if $max == null {\n @include media-breakpoint-up($lower, $breakpoints) {\n @content;\n }\n } @else if $min == null {\n @include media-breakpoint-down($upper, $breakpoints) {\n @content;\n }\n }\n}\n\n// Media between the breakpoint's minimum and maximum widths.\n// No minimum for the smallest breakpoint, and no maximum for the largest one.\n// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.\n@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n $next: breakpoint-next($name, $breakpoints);\n $max: breakpoint-max($next);\n\n @if $min != null and $max != null {\n @media (min-width: $min) and (max-width: $max) {\n @content;\n }\n } @else if $max == null {\n @include media-breakpoint-up($name, $breakpoints) {\n @content;\n }\n } @else if $min == null {\n @include media-breakpoint-down($next, $breakpoints) {\n @content;\n }\n }\n}\n","// Variables\n//\n// Variables should follow the `$component-state-property-size` formula for\n// consistent naming. Ex: $nav-link-disabled-color and $modal-content-box-shadow-xs.\n\n// Color system\n\n// scss-docs-start gray-color-variables\n$white: #fff !default;\n$gray-100: #f8f9fa !default;\n$gray-200: #e9ecef !default;\n$gray-300: #dee2e6 !default;\n$gray-400: #ced4da !default;\n$gray-500: #adb5bd !default;\n$gray-600: #6c757d !default;\n$gray-700: #495057 !default;\n$gray-800: #343a40 !default;\n$gray-900: #212529 !default;\n$black: #000 !default;\n// scss-docs-end gray-color-variables\n\n// fusv-disable\n// scss-docs-start gray-colors-map\n$grays: (\n \"100\": $gray-100,\n \"200\": $gray-200,\n \"300\": $gray-300,\n \"400\": $gray-400,\n \"500\": $gray-500,\n \"600\": $gray-600,\n \"700\": $gray-700,\n \"800\": $gray-800,\n \"900\": $gray-900\n) !default;\n// scss-docs-end gray-colors-map\n// fusv-enable\n\n// scss-docs-start color-variables\n$blue: #0d6efd !default;\n$indigo: #6610f2 !default;\n$purple: #6f42c1 !default;\n$pink: #d63384 !default;\n$red: #dc3545 !default;\n$orange: #fd7e14 !default;\n$yellow: #ffc107 !default;\n$green: #198754 !default;\n$teal: #20c997 !default;\n$cyan: #0dcaf0 !default;\n// scss-docs-end color-variables\n\n// scss-docs-start colors-map\n$colors: (\n \"blue\": $blue,\n \"indigo\": $indigo,\n \"purple\": $purple,\n \"pink\": $pink,\n \"red\": $red,\n \"orange\": $orange,\n \"yellow\": $yellow,\n \"green\": $green,\n \"teal\": $teal,\n \"cyan\": $cyan,\n \"white\": $white,\n \"gray\": $gray-600,\n \"gray-dark\": $gray-800\n) !default;\n// scss-docs-end colors-map\n\n// scss-docs-start theme-color-variables\n$primary: $blue !default;\n$secondary: $gray-600 !default;\n$success: $green !default;\n$info: $cyan !default;\n$warning: $yellow !default;\n$danger: $red !default;\n$light: $gray-100 !default;\n$dark: $gray-900 !default;\n// scss-docs-end theme-color-variables\n\n// scss-docs-start theme-colors-map\n$theme-colors: (\n \"primary\": $primary,\n \"secondary\": $secondary,\n \"success\": $success,\n \"info\": $info,\n \"warning\": $warning,\n \"danger\": $danger,\n \"light\": $light,\n \"dark\": $dark\n) !default;\n// scss-docs-end theme-colors-map\n\n// scss-docs-start theme-colors-rgb\n$theme-colors-rgb: map-loop($theme-colors, to-rgb, \"$value\") !default;\n// scss-docs-end theme-colors-rgb\n\n// The contrast ratio to reach against white, to determine if color changes from \"light\" to \"dark\". Acceptable values for WCAG 2.0 are 3, 4.5 and 7.\n// See https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast\n$min-contrast-ratio: 4.5 !default;\n\n// Customize the light and dark text colors for use in our color contrast function.\n$color-contrast-dark: $black !default;\n$color-contrast-light: $white !default;\n\n// fusv-disable\n$blue-100: tint-color($blue, 80%) !default;\n$blue-200: tint-color($blue, 60%) !default;\n$blue-300: tint-color($blue, 40%) !default;\n$blue-400: tint-color($blue, 20%) !default;\n$blue-500: $blue !default;\n$blue-600: shade-color($blue, 20%) !default;\n$blue-700: shade-color($blue, 40%) !default;\n$blue-800: shade-color($blue, 60%) !default;\n$blue-900: shade-color($blue, 80%) !default;\n\n$indigo-100: tint-color($indigo, 80%) !default;\n$indigo-200: tint-color($indigo, 60%) !default;\n$indigo-300: tint-color($indigo, 40%) !default;\n$indigo-400: tint-color($indigo, 20%) !default;\n$indigo-500: $indigo !default;\n$indigo-600: shade-color($indigo, 20%) !default;\n$indigo-700: shade-color($indigo, 40%) !default;\n$indigo-800: shade-color($indigo, 60%) !default;\n$indigo-900: shade-color($indigo, 80%) !default;\n\n$purple-100: tint-color($purple, 80%) !default;\n$purple-200: tint-color($purple, 60%) !default;\n$purple-300: tint-color($purple, 40%) !default;\n$purple-400: tint-color($purple, 20%) !default;\n$purple-500: $purple !default;\n$purple-600: shade-color($purple, 20%) !default;\n$purple-700: shade-color($purple, 40%) !default;\n$purple-800: shade-color($purple, 60%) !default;\n$purple-900: shade-color($purple, 80%) !default;\n\n$pink-100: tint-color($pink, 80%) !default;\n$pink-200: tint-color($pink, 60%) !default;\n$pink-300: tint-color($pink, 40%) !default;\n$pink-400: tint-color($pink, 20%) !default;\n$pink-500: $pink !default;\n$pink-600: shade-color($pink, 20%) !default;\n$pink-700: shade-color($pink, 40%) !default;\n$pink-800: shade-color($pink, 60%) !default;\n$pink-900: shade-color($pink, 80%) !default;\n\n$red-100: tint-color($red, 80%) !default;\n$red-200: tint-color($red, 60%) !default;\n$red-300: tint-color($red, 40%) !default;\n$red-400: tint-color($red, 20%) !default;\n$red-500: $red !default;\n$red-600: shade-color($red, 20%) !default;\n$red-700: shade-color($red, 40%) !default;\n$red-800: shade-color($red, 60%) !default;\n$red-900: shade-color($red, 80%) !default;\n\n$orange-100: tint-color($orange, 80%) !default;\n$orange-200: tint-color($orange, 60%) !default;\n$orange-300: tint-color($orange, 40%) !default;\n$orange-400: tint-color($orange, 20%) !default;\n$orange-500: $orange !default;\n$orange-600: shade-color($orange, 20%) !default;\n$orange-700: shade-color($orange, 40%) !default;\n$orange-800: shade-color($orange, 60%) !default;\n$orange-900: shade-color($orange, 80%) !default;\n\n$yellow-100: tint-color($yellow, 80%) !default;\n$yellow-200: tint-color($yellow, 60%) !default;\n$yellow-300: tint-color($yellow, 40%) !default;\n$yellow-400: tint-color($yellow, 20%) !default;\n$yellow-500: $yellow !default;\n$yellow-600: shade-color($yellow, 20%) !default;\n$yellow-700: shade-color($yellow, 40%) !default;\n$yellow-800: shade-color($yellow, 60%) !default;\n$yellow-900: shade-color($yellow, 80%) !default;\n\n$green-100: tint-color($green, 80%) !default;\n$green-200: tint-color($green, 60%) !default;\n$green-300: tint-color($green, 40%) !default;\n$green-400: tint-color($green, 20%) !default;\n$green-500: $green !default;\n$green-600: shade-color($green, 20%) !default;\n$green-700: shade-color($green, 40%) !default;\n$green-800: shade-color($green, 60%) !default;\n$green-900: shade-color($green, 80%) !default;\n\n$teal-100: tint-color($teal, 80%) !default;\n$teal-200: tint-color($teal, 60%) !default;\n$teal-300: tint-color($teal, 40%) !default;\n$teal-400: tint-color($teal, 20%) !default;\n$teal-500: $teal !default;\n$teal-600: shade-color($teal, 20%) !default;\n$teal-700: shade-color($teal, 40%) !default;\n$teal-800: shade-color($teal, 60%) !default;\n$teal-900: shade-color($teal, 80%) !default;\n\n$cyan-100: tint-color($cyan, 80%) !default;\n$cyan-200: tint-color($cyan, 60%) !default;\n$cyan-300: tint-color($cyan, 40%) !default;\n$cyan-400: tint-color($cyan, 20%) !default;\n$cyan-500: $cyan !default;\n$cyan-600: shade-color($cyan, 20%) !default;\n$cyan-700: shade-color($cyan, 40%) !default;\n$cyan-800: shade-color($cyan, 60%) !default;\n$cyan-900: shade-color($cyan, 80%) !default;\n\n$blues: (\n \"blue-100\": $blue-100,\n \"blue-200\": $blue-200,\n \"blue-300\": $blue-300,\n \"blue-400\": $blue-400,\n \"blue-500\": $blue-500,\n \"blue-600\": $blue-600,\n \"blue-700\": $blue-700,\n \"blue-800\": $blue-800,\n \"blue-900\": $blue-900\n) !default;\n\n$indigos: (\n \"indigo-100\": $indigo-100,\n \"indigo-200\": $indigo-200,\n \"indigo-300\": $indigo-300,\n \"indigo-400\": $indigo-400,\n \"indigo-500\": $indigo-500,\n \"indigo-600\": $indigo-600,\n \"indigo-700\": $indigo-700,\n \"indigo-800\": $indigo-800,\n \"indigo-900\": $indigo-900\n) !default;\n\n$purples: (\n \"purple-100\": $purple-200,\n \"purple-200\": $purple-100,\n \"purple-300\": $purple-300,\n \"purple-400\": $purple-400,\n \"purple-500\": $purple-500,\n \"purple-600\": $purple-600,\n \"purple-700\": $purple-700,\n \"purple-800\": $purple-800,\n \"purple-900\": $purple-900\n) !default;\n\n$pinks: (\n \"pink-100\": $pink-100,\n \"pink-200\": $pink-200,\n \"pink-300\": $pink-300,\n \"pink-400\": $pink-400,\n \"pink-500\": $pink-500,\n \"pink-600\": $pink-600,\n \"pink-700\": $pink-700,\n \"pink-800\": $pink-800,\n \"pink-900\": $pink-900\n) !default;\n\n$reds: (\n \"red-100\": $red-100,\n \"red-200\": $red-200,\n \"red-300\": $red-300,\n \"red-400\": $red-400,\n \"red-500\": $red-500,\n \"red-600\": $red-600,\n \"red-700\": $red-700,\n \"red-800\": $red-800,\n \"red-900\": $red-900\n) !default;\n\n$oranges: (\n \"orange-100\": $orange-100,\n \"orange-200\": $orange-200,\n \"orange-300\": $orange-300,\n \"orange-400\": $orange-400,\n \"orange-500\": $orange-500,\n \"orange-600\": $orange-600,\n \"orange-700\": $orange-700,\n \"orange-800\": $orange-800,\n \"orange-900\": $orange-900\n) !default;\n\n$yellows: (\n \"yellow-100\": $yellow-100,\n \"yellow-200\": $yellow-200,\n \"yellow-300\": $yellow-300,\n \"yellow-400\": $yellow-400,\n \"yellow-500\": $yellow-500,\n \"yellow-600\": $yellow-600,\n \"yellow-700\": $yellow-700,\n \"yellow-800\": $yellow-800,\n \"yellow-900\": $yellow-900\n) !default;\n\n$greens: (\n \"green-100\": $green-100,\n \"green-200\": $green-200,\n \"green-300\": $green-300,\n \"green-400\": $green-400,\n \"green-500\": $green-500,\n \"green-600\": $green-600,\n \"green-700\": $green-700,\n \"green-800\": $green-800,\n \"green-900\": $green-900\n) !default;\n\n$teals: (\n \"teal-100\": $teal-100,\n \"teal-200\": $teal-200,\n \"teal-300\": $teal-300,\n \"teal-400\": $teal-400,\n \"teal-500\": $teal-500,\n \"teal-600\": $teal-600,\n \"teal-700\": $teal-700,\n \"teal-800\": $teal-800,\n \"teal-900\": $teal-900\n) !default;\n\n$cyans: (\n \"cyan-100\": $cyan-100,\n \"cyan-200\": $cyan-200,\n \"cyan-300\": $cyan-300,\n \"cyan-400\": $cyan-400,\n \"cyan-500\": $cyan-500,\n \"cyan-600\": $cyan-600,\n \"cyan-700\": $cyan-700,\n \"cyan-800\": $cyan-800,\n \"cyan-900\": $cyan-900\n) !default;\n// fusv-enable\n\n// Characters which are escaped by the escape-svg function\n$escaped-characters: (\n (\"<\", \"%3c\"),\n (\">\", \"%3e\"),\n (\"#\", \"%23\"),\n (\"(\", \"%28\"),\n (\")\", \"%29\"),\n) !default;\n\n// Options\n//\n// Quickly modify global styling by enabling or disabling optional features.\n\n$enable-caret: true !default;\n$enable-rounded: true !default;\n$enable-shadows: false !default;\n$enable-gradients: false !default;\n$enable-transitions: true !default;\n$enable-reduced-motion: true !default;\n$enable-smooth-scroll: true !default;\n$enable-grid-classes: true !default;\n$enable-cssgrid: false !default;\n$enable-button-pointers: true !default;\n$enable-rfs: true !default;\n$enable-validation-icons: true !default;\n$enable-negative-margins: false !default;\n$enable-deprecation-messages: true !default;\n$enable-important-utilities: true !default;\n\n// Prefix for :root CSS variables\n\n$variable-prefix: bs- !default;\n\n// Gradient\n//\n// The gradient which is added to components if `$enable-gradients` is `true`\n// This gradient is also added to elements with `.bg-gradient`\n// scss-docs-start variable-gradient\n$gradient: linear-gradient(180deg, rgba($white, .15), rgba($white, 0)) !default;\n// scss-docs-end variable-gradient\n\n// Spacing\n//\n// Control the default styling of most Bootstrap elements by modifying these\n// variables. Mostly focused on spacing.\n// You can add more entries to the $spacers map, should you need more variation.\n\n// scss-docs-start spacer-variables-maps\n$spacer: 1rem !default;\n$spacers: (\n 0: 0,\n 1: $spacer * .25,\n 2: $spacer * .5,\n 3: $spacer,\n 4: $spacer * 1.5,\n 5: $spacer * 3,\n) !default;\n\n$negative-spacers: if($enable-negative-margins, negativify-map($spacers), null) !default;\n// scss-docs-end spacer-variables-maps\n\n// Position\n//\n// Define the edge positioning anchors of the position utilities.\n\n// scss-docs-start position-map\n$position-values: (\n 0: 0,\n 50: 50%,\n 100: 100%\n) !default;\n// scss-docs-end position-map\n\n// Body\n//\n// Settings for the `` element.\n\n$body-bg: $white !default;\n$body-color: $gray-900 !default;\n$body-text-align: null !default;\n\n// Utilities maps\n//\n// Extends the default `$theme-colors` maps to help create our utilities.\n\n// scss-docs-start utilities-colors\n$utilities-colors: map-merge(\n $theme-colors-rgb,\n (\n \"black\": to-rgb($black),\n \"white\": to-rgb($white),\n \"body\": to-rgb($body-color)\n )\n) !default;\n// scss-docs-end utilities-colors\n\n// scss-docs-start utilities-text-colors\n$utilities-text-colors: map-loop($utilities-colors, rgba-css-var, \"$key\", \"text\") !default;\n// scss-docs-end utilities-text-colors\n\n// scss-docs-start utilities-bg-colors\n$utilities-bg-colors: map-loop($utilities-colors, rgba-css-var, \"$key\", \"bg\") !default;\n// scss-docs-end utilities-bg-colors\n\n// Links\n//\n// Style anchor elements.\n\n$link-color: $primary !default;\n$link-decoration: underline !default;\n$link-shade-percentage: 20% !default;\n$link-hover-color: shift-color($link-color, $link-shade-percentage) !default;\n$link-hover-decoration: null !default;\n\n$stretched-link-pseudo-element: after !default;\n$stretched-link-z-index: 1 !default;\n\n// Paragraphs\n//\n// Style p element.\n\n$paragraph-margin-bottom: 1rem !default;\n\n\n// Grid breakpoints\n//\n// Define the minimum dimensions at which your layout will change,\n// adapting to different screen sizes, for use in media queries.\n\n// scss-docs-start grid-breakpoints\n$grid-breakpoints: (\n xs: 0,\n sm: 576px,\n md: 768px,\n lg: 992px,\n xl: 1200px,\n xxl: 1400px\n) !default;\n// scss-docs-end grid-breakpoints\n\n@include _assert-ascending($grid-breakpoints, \"$grid-breakpoints\");\n@include _assert-starts-at-zero($grid-breakpoints, \"$grid-breakpoints\");\n\n\n// Grid containers\n//\n// Define the maximum width of `.container` for different screen sizes.\n\n// scss-docs-start container-max-widths\n$container-max-widths: (\n sm: 540px,\n md: 720px,\n lg: 960px,\n xl: 1140px,\n xxl: 1320px\n) !default;\n// scss-docs-end container-max-widths\n\n@include _assert-ascending($container-max-widths, \"$container-max-widths\");\n\n\n// Grid columns\n//\n// Set the number of columns and specify the width of the gutters.\n\n$grid-columns: 12 !default;\n$grid-gutter-width: 1.5rem !default;\n$grid-row-columns: 6 !default;\n\n$gutters: $spacers !default;\n\n// Container padding\n\n$container-padding-x: $grid-gutter-width * .5 !default;\n\n\n// Components\n//\n// Define common padding and border radius sizes and more.\n\n// scss-docs-start border-variables\n$border-width: 1px !default;\n$border-widths: (\n 1: 1px,\n 2: 2px,\n 3: 3px,\n 4: 4px,\n 5: 5px\n) !default;\n\n$border-color: $gray-300 !default;\n// scss-docs-end border-variables\n\n// scss-docs-start border-radius-variables\n$border-radius: .25rem !default;\n$border-radius-sm: .2rem !default;\n$border-radius-lg: .3rem !default;\n$border-radius-pill: 50rem !default;\n// scss-docs-end border-radius-variables\n\n// scss-docs-start box-shadow-variables\n$box-shadow: 0 .5rem 1rem rgba($black, .15) !default;\n$box-shadow-sm: 0 .125rem .25rem rgba($black, .075) !default;\n$box-shadow-lg: 0 1rem 3rem rgba($black, .175) !default;\n$box-shadow-inset: inset 0 1px 2px rgba($black, .075) !default;\n// scss-docs-end box-shadow-variables\n\n$component-active-color: $white !default;\n$component-active-bg: $primary !default;\n\n// scss-docs-start caret-variables\n$caret-width: .3em !default;\n$caret-vertical-align: $caret-width * .85 !default;\n$caret-spacing: $caret-width * .85 !default;\n// scss-docs-end caret-variables\n\n$transition-base: all .2s ease-in-out !default;\n$transition-fade: opacity .15s linear !default;\n// scss-docs-start collapse-transition\n$transition-collapse: height .35s ease !default;\n$transition-collapse-width: width .35s ease !default;\n// scss-docs-end collapse-transition\n\n// stylelint-disable function-disallowed-list\n// scss-docs-start aspect-ratios\n$aspect-ratios: (\n \"1x1\": 100%,\n \"4x3\": calc(3 / 4 * 100%),\n \"16x9\": calc(9 / 16 * 100%),\n \"21x9\": calc(9 / 21 * 100%)\n) !default;\n// scss-docs-end aspect-ratios\n// stylelint-enable function-disallowed-list\n\n// Typography\n//\n// Font, line-height, and color for body text, headings, and more.\n\n// scss-docs-start font-variables\n// stylelint-disable value-keyword-case\n$font-family-sans-serif: system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", \"Liberation Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\" !default;\n$font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace !default;\n// stylelint-enable value-keyword-case\n$font-family-base: var(--#{$variable-prefix}font-sans-serif) !default;\n$font-family-code: var(--#{$variable-prefix}font-monospace) !default;\n\n// $font-size-root affects the value of `rem`, which is used for as well font sizes, paddings, and margins\n// $font-size-base affects the font size of the body text\n$font-size-root: null !default;\n$font-size-base: 1rem !default; // Assumes the browser default, typically `16px`\n$font-size-sm: $font-size-base * .875 !default;\n$font-size-lg: $font-size-base * 1.25 !default;\n\n$font-weight-lighter: lighter !default;\n$font-weight-light: 300 !default;\n$font-weight-normal: 400 !default;\n$font-weight-bold: 700 !default;\n$font-weight-bolder: bolder !default;\n\n$font-weight-base: $font-weight-normal !default;\n\n$line-height-base: 1.5 !default;\n$line-height-sm: 1.25 !default;\n$line-height-lg: 2 !default;\n\n$h1-font-size: $font-size-base * 2.5 !default;\n$h2-font-size: $font-size-base * 2 !default;\n$h3-font-size: $font-size-base * 1.75 !default;\n$h4-font-size: $font-size-base * 1.5 !default;\n$h5-font-size: $font-size-base * 1.25 !default;\n$h6-font-size: $font-size-base !default;\n// scss-docs-end font-variables\n\n// scss-docs-start font-sizes\n$font-sizes: (\n 1: $h1-font-size,\n 2: $h2-font-size,\n 3: $h3-font-size,\n 4: $h4-font-size,\n 5: $h5-font-size,\n 6: $h6-font-size\n) !default;\n// scss-docs-end font-sizes\n\n// scss-docs-start headings-variables\n$headings-margin-bottom: $spacer * .5 !default;\n$headings-font-family: null !default;\n$headings-font-style: null !default;\n$headings-font-weight: 500 !default;\n$headings-line-height: 1.2 !default;\n$headings-color: null !default;\n// scss-docs-end headings-variables\n\n// scss-docs-start display-headings\n$display-font-sizes: (\n 1: 5rem,\n 2: 4.5rem,\n 3: 4rem,\n 4: 3.5rem,\n 5: 3rem,\n 6: 2.5rem\n) !default;\n\n$display-font-weight: 300 !default;\n$display-line-height: $headings-line-height !default;\n// scss-docs-end display-headings\n\n// scss-docs-start type-variables\n$lead-font-size: $font-size-base * 1.25 !default;\n$lead-font-weight: 300 !default;\n\n$small-font-size: .875em !default;\n\n$sub-sup-font-size: .75em !default;\n\n$text-muted: $gray-600 !default;\n\n$initialism-font-size: $small-font-size !default;\n\n$blockquote-margin-y: $spacer !default;\n$blockquote-font-size: $font-size-base * 1.25 !default;\n$blockquote-footer-color: $gray-600 !default;\n$blockquote-footer-font-size: $small-font-size !default;\n\n$hr-margin-y: $spacer !default;\n$hr-color: inherit !default;\n$hr-height: $border-width !default;\n$hr-opacity: .25 !default;\n\n$legend-margin-bottom: .5rem !default;\n$legend-font-size: 1.5rem !default;\n$legend-font-weight: null !default;\n\n$mark-padding: .2em !default;\n\n$dt-font-weight: $font-weight-bold !default;\n\n$nested-kbd-font-weight: $font-weight-bold !default;\n\n$list-inline-padding: .5rem !default;\n\n$mark-bg: #fcf8e3 !default;\n// scss-docs-end type-variables\n\n\n// Tables\n//\n// Customizes the `.table` component with basic values, each used across all table variations.\n\n// scss-docs-start table-variables\n$table-cell-padding-y: .5rem !default;\n$table-cell-padding-x: .5rem !default;\n$table-cell-padding-y-sm: .25rem !default;\n$table-cell-padding-x-sm: .25rem !default;\n\n$table-cell-vertical-align: top !default;\n\n$table-color: $body-color !default;\n$table-bg: transparent !default;\n$table-accent-bg: transparent !default;\n\n$table-th-font-weight: null !default;\n\n$table-striped-color: $table-color !default;\n$table-striped-bg-factor: .05 !default;\n$table-striped-bg: rgba($black, $table-striped-bg-factor) !default;\n\n$table-active-color: $table-color !default;\n$table-active-bg-factor: .1 !default;\n$table-active-bg: rgba($black, $table-active-bg-factor) !default;\n\n$table-hover-color: $table-color !default;\n$table-hover-bg-factor: .075 !default;\n$table-hover-bg: rgba($black, $table-hover-bg-factor) !default;\n\n$table-border-factor: .1 !default;\n$table-border-width: $border-width !default;\n$table-border-color: $border-color !default;\n\n$table-striped-order: odd !default;\n\n$table-group-separator-color: currentColor !default;\n\n$table-caption-color: $text-muted !default;\n\n$table-bg-scale: -80% !default;\n// scss-docs-end table-variables\n\n// scss-docs-start table-loop\n$table-variants: (\n \"primary\": shift-color($primary, $table-bg-scale),\n \"secondary\": shift-color($secondary, $table-bg-scale),\n \"success\": shift-color($success, $table-bg-scale),\n \"info\": shift-color($info, $table-bg-scale),\n \"warning\": shift-color($warning, $table-bg-scale),\n \"danger\": shift-color($danger, $table-bg-scale),\n \"light\": $light,\n \"dark\": $dark,\n) !default;\n// scss-docs-end table-loop\n\n\n// Buttons + Forms\n//\n// Shared variables that are reassigned to `$input-` and `$btn-` specific variables.\n\n// scss-docs-start input-btn-variables\n$input-btn-padding-y: .375rem !default;\n$input-btn-padding-x: .75rem !default;\n$input-btn-font-family: null !default;\n$input-btn-font-size: $font-size-base !default;\n$input-btn-line-height: $line-height-base !default;\n\n$input-btn-focus-width: .25rem !default;\n$input-btn-focus-color-opacity: .25 !default;\n$input-btn-focus-color: rgba($component-active-bg, $input-btn-focus-color-opacity) !default;\n$input-btn-focus-blur: 0 !default;\n$input-btn-focus-box-shadow: 0 0 $input-btn-focus-blur $input-btn-focus-width $input-btn-focus-color !default;\n\n$input-btn-padding-y-sm: .25rem !default;\n$input-btn-padding-x-sm: .5rem !default;\n$input-btn-font-size-sm: $font-size-sm !default;\n\n$input-btn-padding-y-lg: .5rem !default;\n$input-btn-padding-x-lg: 1rem !default;\n$input-btn-font-size-lg: $font-size-lg !default;\n\n$input-btn-border-width: $border-width !default;\n// scss-docs-end input-btn-variables\n\n\n// Buttons\n//\n// For each of Bootstrap's buttons, define text, background, and border color.\n\n// scss-docs-start btn-variables\n$btn-padding-y: $input-btn-padding-y !default;\n$btn-padding-x: $input-btn-padding-x !default;\n$btn-font-family: $input-btn-font-family !default;\n$btn-font-size: $input-btn-font-size !default;\n$btn-line-height: $input-btn-line-height !default;\n$btn-white-space: null !default; // Set to `nowrap` to prevent text wrapping\n\n$btn-padding-y-sm: $input-btn-padding-y-sm !default;\n$btn-padding-x-sm: $input-btn-padding-x-sm !default;\n$btn-font-size-sm: $input-btn-font-size-sm !default;\n\n$btn-padding-y-lg: $input-btn-padding-y-lg !default;\n$btn-padding-x-lg: $input-btn-padding-x-lg !default;\n$btn-font-size-lg: $input-btn-font-size-lg !default;\n\n$btn-border-width: $input-btn-border-width !default;\n\n$btn-font-weight: $font-weight-normal !default;\n$btn-box-shadow: inset 0 1px 0 rgba($white, .15), 0 1px 1px rgba($black, .075) !default;\n$btn-focus-width: $input-btn-focus-width !default;\n$btn-focus-box-shadow: $input-btn-focus-box-shadow !default;\n$btn-disabled-opacity: .65 !default;\n$btn-active-box-shadow: inset 0 3px 5px rgba($black, .125) !default;\n\n$btn-link-color: $link-color !default;\n$btn-link-hover-color: $link-hover-color !default;\n$btn-link-disabled-color: $gray-600 !default;\n\n// Allows for customizing button radius independently from global border radius\n$btn-border-radius: $border-radius !default;\n$btn-border-radius-sm: $border-radius-sm !default;\n$btn-border-radius-lg: $border-radius-lg !default;\n\n$btn-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;\n\n$btn-hover-bg-shade-amount: 15% !default;\n$btn-hover-bg-tint-amount: 15% !default;\n$btn-hover-border-shade-amount: 20% !default;\n$btn-hover-border-tint-amount: 10% !default;\n$btn-active-bg-shade-amount: 20% !default;\n$btn-active-bg-tint-amount: 20% !default;\n$btn-active-border-shade-amount: 25% !default;\n$btn-active-border-tint-amount: 10% !default;\n// scss-docs-end btn-variables\n\n\n// Forms\n\n// scss-docs-start form-text-variables\n$form-text-margin-top: .25rem !default;\n$form-text-font-size: $small-font-size !default;\n$form-text-font-style: null !default;\n$form-text-font-weight: null !default;\n$form-text-color: $text-muted !default;\n// scss-docs-end form-text-variables\n\n// scss-docs-start form-label-variables\n$form-label-margin-bottom: .5rem !default;\n$form-label-font-size: null !default;\n$form-label-font-style: null !default;\n$form-label-font-weight: null !default;\n$form-label-color: null !default;\n// scss-docs-end form-label-variables\n\n// scss-docs-start form-input-variables\n$input-padding-y: $input-btn-padding-y !default;\n$input-padding-x: $input-btn-padding-x !default;\n$input-font-family: $input-btn-font-family !default;\n$input-font-size: $input-btn-font-size !default;\n$input-font-weight: $font-weight-base !default;\n$input-line-height: $input-btn-line-height !default;\n\n$input-padding-y-sm: $input-btn-padding-y-sm !default;\n$input-padding-x-sm: $input-btn-padding-x-sm !default;\n$input-font-size-sm: $input-btn-font-size-sm !default;\n\n$input-padding-y-lg: $input-btn-padding-y-lg !default;\n$input-padding-x-lg: $input-btn-padding-x-lg !default;\n$input-font-size-lg: $input-btn-font-size-lg !default;\n\n$input-bg: $body-bg !default;\n$input-disabled-bg: $gray-200 !default;\n$input-disabled-border-color: null !default;\n\n$input-color: $body-color !default;\n$input-border-color: $gray-400 !default;\n$input-border-width: $input-btn-border-width !default;\n$input-box-shadow: $box-shadow-inset !default;\n\n$input-border-radius: $border-radius !default;\n$input-border-radius-sm: $border-radius-sm !default;\n$input-border-radius-lg: $border-radius-lg !default;\n\n$input-focus-bg: $input-bg !default;\n$input-focus-border-color: tint-color($component-active-bg, 50%) !default;\n$input-focus-color: $input-color !default;\n$input-focus-width: $input-btn-focus-width !default;\n$input-focus-box-shadow: $input-btn-focus-box-shadow !default;\n\n$input-placeholder-color: $gray-600 !default;\n$input-plaintext-color: $body-color !default;\n\n$input-height-border: $input-border-width * 2 !default;\n\n$input-height-inner: add($input-line-height * 1em, $input-padding-y * 2) !default;\n$input-height-inner-half: add($input-line-height * .5em, $input-padding-y) !default;\n$input-height-inner-quarter: add($input-line-height * .25em, $input-padding-y * .5) !default;\n\n$input-height: add($input-line-height * 1em, add($input-padding-y * 2, $input-height-border, false)) !default;\n$input-height-sm: add($input-line-height * 1em, add($input-padding-y-sm * 2, $input-height-border, false)) !default;\n$input-height-lg: add($input-line-height * 1em, add($input-padding-y-lg * 2, $input-height-border, false)) !default;\n\n$input-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;\n\n$form-color-width: 3rem !default;\n// scss-docs-end form-input-variables\n\n// scss-docs-start form-check-variables\n$form-check-input-width: 1em !default;\n$form-check-min-height: $font-size-base * $line-height-base !default;\n$form-check-padding-start: $form-check-input-width + .5em !default;\n$form-check-margin-bottom: .125rem !default;\n$form-check-label-color: null !default;\n$form-check-label-cursor: null !default;\n$form-check-transition: null !default;\n\n$form-check-input-active-filter: brightness(90%) !default;\n\n$form-check-input-bg: $input-bg !default;\n$form-check-input-border: 1px solid rgba($black, .25) !default;\n$form-check-input-border-radius: .25em !default;\n$form-check-radio-border-radius: 50% !default;\n$form-check-input-focus-border: $input-focus-border-color !default;\n$form-check-input-focus-box-shadow: $input-btn-focus-box-shadow !default;\n\n$form-check-input-checked-color: $component-active-color !default;\n$form-check-input-checked-bg-color: $component-active-bg !default;\n$form-check-input-checked-border-color: $form-check-input-checked-bg-color !default;\n$form-check-input-checked-bg-image: url(\"data:image/svg+xml,\") !default;\n$form-check-radio-checked-bg-image: url(\"data:image/svg+xml,\") !default;\n\n$form-check-input-indeterminate-color: $component-active-color !default;\n$form-check-input-indeterminate-bg-color: $component-active-bg !default;\n$form-check-input-indeterminate-border-color: $form-check-input-indeterminate-bg-color !default;\n$form-check-input-indeterminate-bg-image: url(\"data:image/svg+xml,\") !default;\n\n$form-check-input-disabled-opacity: .5 !default;\n$form-check-label-disabled-opacity: $form-check-input-disabled-opacity !default;\n$form-check-btn-check-disabled-opacity: $btn-disabled-opacity !default;\n\n$form-check-inline-margin-end: 1rem !default;\n// scss-docs-end form-check-variables\n\n// scss-docs-start form-switch-variables\n$form-switch-color: rgba(0, 0, 0, .25) !default;\n$form-switch-width: 2em !default;\n$form-switch-padding-start: $form-switch-width + .5em !default;\n$form-switch-bg-image: url(\"data:image/svg+xml,\") !default;\n$form-switch-border-radius: $form-switch-width !default;\n$form-switch-transition: background-position .15s ease-in-out !default;\n\n$form-switch-focus-color: $input-focus-border-color !default;\n$form-switch-focus-bg-image: url(\"data:image/svg+xml,\") !default;\n\n$form-switch-checked-color: $component-active-color !default;\n$form-switch-checked-bg-image: url(\"data:image/svg+xml,\") !default;\n$form-switch-checked-bg-position: right center !default;\n// scss-docs-end form-switch-variables\n\n// scss-docs-start input-group-variables\n$input-group-addon-padding-y: $input-padding-y !default;\n$input-group-addon-padding-x: $input-padding-x !default;\n$input-group-addon-font-weight: $input-font-weight !default;\n$input-group-addon-color: $input-color !default;\n$input-group-addon-bg: $gray-200 !default;\n$input-group-addon-border-color: $input-border-color !default;\n// scss-docs-end input-group-variables\n\n// scss-docs-start form-select-variables\n$form-select-padding-y: $input-padding-y !default;\n$form-select-padding-x: $input-padding-x !default;\n$form-select-font-family: $input-font-family !default;\n$form-select-font-size: $input-font-size !default;\n$form-select-indicator-padding: $form-select-padding-x * 3 !default; // Extra padding for background-image\n$form-select-font-weight: $input-font-weight !default;\n$form-select-line-height: $input-line-height !default;\n$form-select-color: $input-color !default;\n$form-select-bg: $input-bg !default;\n$form-select-disabled-color: null !default;\n$form-select-disabled-bg: $gray-200 !default;\n$form-select-disabled-border-color: $input-disabled-border-color !default;\n$form-select-bg-position: right $form-select-padding-x center !default;\n$form-select-bg-size: 16px 12px !default; // In pixels because image dimensions\n$form-select-indicator-color: $gray-800 !default;\n$form-select-indicator: url(\"data:image/svg+xml,\") !default;\n\n$form-select-feedback-icon-padding-end: $form-select-padding-x * 2.5 + $form-select-indicator-padding !default;\n$form-select-feedback-icon-position: center right $form-select-indicator-padding !default;\n$form-select-feedback-icon-size: $input-height-inner-half $input-height-inner-half !default;\n\n$form-select-border-width: $input-border-width !default;\n$form-select-border-color: $input-border-color !default;\n$form-select-border-radius: $border-radius !default;\n$form-select-box-shadow: $box-shadow-inset !default;\n\n$form-select-focus-border-color: $input-focus-border-color !default;\n$form-select-focus-width: $input-focus-width !default;\n$form-select-focus-box-shadow: 0 0 0 $form-select-focus-width $input-btn-focus-color !default;\n\n$form-select-padding-y-sm: $input-padding-y-sm !default;\n$form-select-padding-x-sm: $input-padding-x-sm !default;\n$form-select-font-size-sm: $input-font-size-sm !default;\n\n$form-select-padding-y-lg: $input-padding-y-lg !default;\n$form-select-padding-x-lg: $input-padding-x-lg !default;\n$form-select-font-size-lg: $input-font-size-lg !default;\n\n$form-select-transition: $input-transition !default;\n// scss-docs-end form-select-variables\n\n// scss-docs-start form-range-variables\n$form-range-track-width: 100% !default;\n$form-range-track-height: .5rem !default;\n$form-range-track-cursor: pointer !default;\n$form-range-track-bg: $gray-300 !default;\n$form-range-track-border-radius: 1rem !default;\n$form-range-track-box-shadow: $box-shadow-inset !default;\n\n$form-range-thumb-width: 1rem !default;\n$form-range-thumb-height: $form-range-thumb-width !default;\n$form-range-thumb-bg: $component-active-bg !default;\n$form-range-thumb-border: 0 !default;\n$form-range-thumb-border-radius: 1rem !default;\n$form-range-thumb-box-shadow: 0 .1rem .25rem rgba($black, .1) !default;\n$form-range-thumb-focus-box-shadow: 0 0 0 1px $body-bg, $input-focus-box-shadow !default;\n$form-range-thumb-focus-box-shadow-width: $input-focus-width !default; // For focus box shadow issue in Edge\n$form-range-thumb-active-bg: tint-color($component-active-bg, 70%) !default;\n$form-range-thumb-disabled-bg: $gray-500 !default;\n$form-range-thumb-transition: background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;\n// scss-docs-end form-range-variables\n\n// scss-docs-start form-file-variables\n$form-file-button-color: $input-color !default;\n$form-file-button-bg: $input-group-addon-bg !default;\n$form-file-button-hover-bg: shade-color($form-file-button-bg, 5%) !default;\n// scss-docs-end form-file-variables\n\n// scss-docs-start form-floating-variables\n$form-floating-height: add(3.5rem, $input-height-border) !default;\n$form-floating-line-height: 1.25 !default;\n$form-floating-padding-x: $input-padding-x !default;\n$form-floating-padding-y: 1rem !default;\n$form-floating-input-padding-t: 1.625rem !default;\n$form-floating-input-padding-b: .625rem !default;\n$form-floating-label-opacity: .65 !default;\n$form-floating-label-transform: scale(.85) translateY(-.5rem) translateX(.15rem) !default;\n$form-floating-transition: opacity .1s ease-in-out, transform .1s ease-in-out !default;\n// scss-docs-end form-floating-variables\n\n// Form validation\n\n// scss-docs-start form-feedback-variables\n$form-feedback-margin-top: $form-text-margin-top !default;\n$form-feedback-font-size: $form-text-font-size !default;\n$form-feedback-font-style: $form-text-font-style !default;\n$form-feedback-valid-color: $success !default;\n$form-feedback-invalid-color: $danger !default;\n\n$form-feedback-icon-valid-color: $form-feedback-valid-color !default;\n$form-feedback-icon-valid: url(\"data:image/svg+xml,\") !default;\n$form-feedback-icon-invalid-color: $form-feedback-invalid-color !default;\n$form-feedback-icon-invalid: url(\"data:image/svg+xml,\") !default;\n// scss-docs-end form-feedback-variables\n\n// scss-docs-start form-validation-states\n$form-validation-states: (\n \"valid\": (\n \"color\": $form-feedback-valid-color,\n \"icon\": $form-feedback-icon-valid\n ),\n \"invalid\": (\n \"color\": $form-feedback-invalid-color,\n \"icon\": $form-feedback-icon-invalid\n )\n) !default;\n// scss-docs-end form-validation-states\n\n// Z-index master list\n//\n// Warning: Avoid customizing these values. They're used for a bird's eye view\n// of components dependent on the z-axis and are designed to all work together.\n\n// scss-docs-start zindex-stack\n$zindex-dropdown: 1000 !default;\n$zindex-sticky: 1020 !default;\n$zindex-fixed: 1030 !default;\n$zindex-offcanvas-backdrop: 1040 !default;\n$zindex-offcanvas: 1045 !default;\n$zindex-modal-backdrop: 1050 !default;\n$zindex-modal: 1055 !default;\n$zindex-popover: 1070 !default;\n$zindex-tooltip: 1080 !default;\n// scss-docs-end zindex-stack\n\n\n// Navs\n\n// scss-docs-start nav-variables\n$nav-link-padding-y: .5rem !default;\n$nav-link-padding-x: 1rem !default;\n$nav-link-font-size: null !default;\n$nav-link-font-weight: null !default;\n$nav-link-color: $link-color !default;\n$nav-link-hover-color: $link-hover-color !default;\n$nav-link-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out !default;\n$nav-link-disabled-color: $gray-600 !default;\n\n$nav-tabs-border-color: $gray-300 !default;\n$nav-tabs-border-width: $border-width !default;\n$nav-tabs-border-radius: $border-radius !default;\n$nav-tabs-link-hover-border-color: $gray-200 $gray-200 $nav-tabs-border-color !default;\n$nav-tabs-link-active-color: $gray-700 !default;\n$nav-tabs-link-active-bg: $body-bg !default;\n$nav-tabs-link-active-border-color: $gray-300 $gray-300 $nav-tabs-link-active-bg !default;\n\n$nav-pills-border-radius: $border-radius !default;\n$nav-pills-link-active-color: $component-active-color !default;\n$nav-pills-link-active-bg: $component-active-bg !default;\n// scss-docs-end nav-variables\n\n\n// Navbar\n\n// scss-docs-start navbar-variables\n$navbar-padding-y: $spacer * .5 !default;\n$navbar-padding-x: null !default;\n\n$navbar-nav-link-padding-x: .5rem !default;\n\n$navbar-brand-font-size: $font-size-lg !default;\n// Compute the navbar-brand padding-y so the navbar-brand will have the same height as navbar-text and nav-link\n$nav-link-height: $font-size-base * $line-height-base + $nav-link-padding-y * 2 !default;\n$navbar-brand-height: $navbar-brand-font-size * $line-height-base !default;\n$navbar-brand-padding-y: ($nav-link-height - $navbar-brand-height) * .5 !default;\n$navbar-brand-margin-end: 1rem !default;\n\n$navbar-toggler-padding-y: .25rem !default;\n$navbar-toggler-padding-x: .75rem !default;\n$navbar-toggler-font-size: $font-size-lg !default;\n$navbar-toggler-border-radius: $btn-border-radius !default;\n$navbar-toggler-focus-width: $btn-focus-width !default;\n$navbar-toggler-transition: box-shadow .15s ease-in-out !default;\n// scss-docs-end navbar-variables\n\n// scss-docs-start navbar-theme-variables\n$navbar-dark-color: rgba($white, .55) !default;\n$navbar-dark-hover-color: rgba($white, .75) !default;\n$navbar-dark-active-color: $white !default;\n$navbar-dark-disabled-color: rgba($white, .25) !default;\n$navbar-dark-toggler-icon-bg: url(\"data:image/svg+xml,\") !default;\n$navbar-dark-toggler-border-color: rgba($white, .1) !default;\n\n$navbar-light-color: rgba($black, .55) !default;\n$navbar-light-hover-color: rgba($black, .7) !default;\n$navbar-light-active-color: rgba($black, .9) !default;\n$navbar-light-disabled-color: rgba($black, .3) !default;\n$navbar-light-toggler-icon-bg: url(\"data:image/svg+xml,\") !default;\n$navbar-light-toggler-border-color: rgba($black, .1) !default;\n\n$navbar-light-brand-color: $navbar-light-active-color !default;\n$navbar-light-brand-hover-color: $navbar-light-active-color !default;\n$navbar-dark-brand-color: $navbar-dark-active-color !default;\n$navbar-dark-brand-hover-color: $navbar-dark-active-color !default;\n// scss-docs-end navbar-theme-variables\n\n\n// Dropdowns\n//\n// Dropdown menu container and contents.\n\n// scss-docs-start dropdown-variables\n$dropdown-min-width: 10rem !default;\n$dropdown-padding-x: 0 !default;\n$dropdown-padding-y: .5rem !default;\n$dropdown-spacer: .125rem !default;\n$dropdown-font-size: $font-size-base !default;\n$dropdown-color: $body-color !default;\n$dropdown-bg: $white !default;\n$dropdown-border-color: rgba($black, .15) !default;\n$dropdown-border-radius: $border-radius !default;\n$dropdown-border-width: $border-width !default;\n$dropdown-inner-border-radius: subtract($dropdown-border-radius, $dropdown-border-width) !default;\n$dropdown-divider-bg: $dropdown-border-color !default;\n$dropdown-divider-margin-y: $spacer * .5 !default;\n$dropdown-box-shadow: $box-shadow !default;\n\n$dropdown-link-color: $gray-900 !default;\n$dropdown-link-hover-color: shade-color($gray-900, 10%) !default;\n$dropdown-link-hover-bg: $gray-200 !default;\n\n$dropdown-link-active-color: $component-active-color !default;\n$dropdown-link-active-bg: $component-active-bg !default;\n\n$dropdown-link-disabled-color: $gray-500 !default;\n\n$dropdown-item-padding-y: $spacer * .25 !default;\n$dropdown-item-padding-x: $spacer !default;\n\n$dropdown-header-color: $gray-600 !default;\n$dropdown-header-padding: $dropdown-padding-y $dropdown-item-padding-x !default;\n// scss-docs-end dropdown-variables\n\n// scss-docs-start dropdown-dark-variables\n$dropdown-dark-color: $gray-300 !default;\n$dropdown-dark-bg: $gray-800 !default;\n$dropdown-dark-border-color: $dropdown-border-color !default;\n$dropdown-dark-divider-bg: $dropdown-divider-bg !default;\n$dropdown-dark-box-shadow: null !default;\n$dropdown-dark-link-color: $dropdown-dark-color !default;\n$dropdown-dark-link-hover-color: $white !default;\n$dropdown-dark-link-hover-bg: rgba($white, .15) !default;\n$dropdown-dark-link-active-color: $dropdown-link-active-color !default;\n$dropdown-dark-link-active-bg: $dropdown-link-active-bg !default;\n$dropdown-dark-link-disabled-color: $gray-500 !default;\n$dropdown-dark-header-color: $gray-500 !default;\n// scss-docs-end dropdown-dark-variables\n\n\n// Pagination\n\n// scss-docs-start pagination-variables\n$pagination-padding-y: .375rem !default;\n$pagination-padding-x: .75rem !default;\n$pagination-padding-y-sm: .25rem !default;\n$pagination-padding-x-sm: .5rem !default;\n$pagination-padding-y-lg: .75rem !default;\n$pagination-padding-x-lg: 1.5rem !default;\n\n$pagination-color: $link-color !default;\n$pagination-bg: $white !default;\n$pagination-border-width: $border-width !default;\n$pagination-border-radius: $border-radius !default;\n$pagination-margin-start: -$pagination-border-width !default;\n$pagination-border-color: $gray-300 !default;\n\n$pagination-focus-color: $link-hover-color !default;\n$pagination-focus-bg: $gray-200 !default;\n$pagination-focus-box-shadow: $input-btn-focus-box-shadow !default;\n$pagination-focus-outline: 0 !default;\n\n$pagination-hover-color: $link-hover-color !default;\n$pagination-hover-bg: $gray-200 !default;\n$pagination-hover-border-color: $gray-300 !default;\n\n$pagination-active-color: $component-active-color !default;\n$pagination-active-bg: $component-active-bg !default;\n$pagination-active-border-color: $pagination-active-bg !default;\n\n$pagination-disabled-color: $gray-600 !default;\n$pagination-disabled-bg: $white !default;\n$pagination-disabled-border-color: $gray-300 !default;\n\n$pagination-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;\n\n$pagination-border-radius-sm: $border-radius-sm !default;\n$pagination-border-radius-lg: $border-radius-lg !default;\n// scss-docs-end pagination-variables\n\n\n// Placeholders\n\n// scss-docs-start placeholders\n$placeholder-opacity-max: .5 !default;\n$placeholder-opacity-min: .2 !default;\n// scss-docs-end placeholders\n\n// Cards\n\n// scss-docs-start card-variables\n$card-spacer-y: $spacer !default;\n$card-spacer-x: $spacer !default;\n$card-title-spacer-y: $spacer * .5 !default;\n$card-border-width: $border-width !default;\n$card-border-color: rgba($black, .125) !default;\n$card-border-radius: $border-radius !default;\n$card-box-shadow: null !default;\n$card-inner-border-radius: subtract($card-border-radius, $card-border-width) !default;\n$card-cap-padding-y: $card-spacer-y * .5 !default;\n$card-cap-padding-x: $card-spacer-x !default;\n$card-cap-bg: rgba($black, .03) !default;\n$card-cap-color: null !default;\n$card-height: null !default;\n$card-color: null !default;\n$card-bg: $white !default;\n$card-img-overlay-padding: $spacer !default;\n$card-group-margin: $grid-gutter-width * .5 !default;\n// scss-docs-end card-variables\n\n// Accordion\n\n// scss-docs-start accordion-variables\n$accordion-padding-y: 1rem !default;\n$accordion-padding-x: 1.25rem !default;\n$accordion-color: $body-color !default;\n$accordion-bg: $body-bg !default;\n$accordion-border-width: $border-width !default;\n$accordion-border-color: rgba($black, .125) !default;\n$accordion-border-radius: $border-radius !default;\n$accordion-inner-border-radius: subtract($accordion-border-radius, $accordion-border-width) !default;\n\n$accordion-body-padding-y: $accordion-padding-y !default;\n$accordion-body-padding-x: $accordion-padding-x !default;\n\n$accordion-button-padding-y: $accordion-padding-y !default;\n$accordion-button-padding-x: $accordion-padding-x !default;\n$accordion-button-color: $accordion-color !default;\n$accordion-button-bg: $accordion-bg !default;\n$accordion-transition: $btn-transition, border-radius .15s ease !default;\n$accordion-button-active-bg: tint-color($component-active-bg, 90%) !default;\n$accordion-button-active-color: shade-color($primary, 10%) !default;\n\n$accordion-button-focus-border-color: $input-focus-border-color !default;\n$accordion-button-focus-box-shadow: $btn-focus-box-shadow !default;\n\n$accordion-icon-width: 1.25rem !default;\n$accordion-icon-color: $accordion-button-color !default;\n$accordion-icon-active-color: $accordion-button-active-color !default;\n$accordion-icon-transition: transform .2s ease-in-out !default;\n$accordion-icon-transform: rotate(-180deg) !default;\n\n$accordion-button-icon: url(\"data:image/svg+xml,\") !default;\n$accordion-button-active-icon: url(\"data:image/svg+xml,\") !default;\n// scss-docs-end accordion-variables\n\n// Tooltips\n\n// scss-docs-start tooltip-variables\n$tooltip-font-size: $font-size-sm !default;\n$tooltip-max-width: 200px !default;\n$tooltip-color: $white !default;\n$tooltip-bg: $black !default;\n$tooltip-border-radius: $border-radius !default;\n$tooltip-opacity: .9 !default;\n$tooltip-padding-y: $spacer * .25 !default;\n$tooltip-padding-x: $spacer * .5 !default;\n$tooltip-margin: 0 !default;\n\n$tooltip-arrow-width: .8rem !default;\n$tooltip-arrow-height: .4rem !default;\n$tooltip-arrow-color: $tooltip-bg !default;\n// scss-docs-end tooltip-variables\n\n// Form tooltips must come after regular tooltips\n// scss-docs-start tooltip-feedback-variables\n$form-feedback-tooltip-padding-y: $tooltip-padding-y !default;\n$form-feedback-tooltip-padding-x: $tooltip-padding-x !default;\n$form-feedback-tooltip-font-size: $tooltip-font-size !default;\n$form-feedback-tooltip-line-height: null !default;\n$form-feedback-tooltip-opacity: $tooltip-opacity !default;\n$form-feedback-tooltip-border-radius: $tooltip-border-radius !default;\n// scss-docs-end tooltip-feedback-variables\n\n\n// Popovers\n\n// scss-docs-start popover-variables\n$popover-font-size: $font-size-sm !default;\n$popover-bg: $white !default;\n$popover-max-width: 276px !default;\n$popover-border-width: $border-width !default;\n$popover-border-color: rgba($black, .2) !default;\n$popover-border-radius: $border-radius-lg !default;\n$popover-inner-border-radius: subtract($popover-border-radius, $popover-border-width) !default;\n$popover-box-shadow: $box-shadow !default;\n\n$popover-header-bg: shade-color($popover-bg, 6%) !default;\n$popover-header-color: $headings-color !default;\n$popover-header-padding-y: .5rem !default;\n$popover-header-padding-x: $spacer !default;\n\n$popover-body-color: $body-color !default;\n$popover-body-padding-y: $spacer !default;\n$popover-body-padding-x: $spacer !default;\n\n$popover-arrow-width: 1rem !default;\n$popover-arrow-height: .5rem !default;\n$popover-arrow-color: $popover-bg !default;\n\n$popover-arrow-outer-color: fade-in($popover-border-color, .05) !default;\n// scss-docs-end popover-variables\n\n\n// Toasts\n\n// scss-docs-start toast-variables\n$toast-max-width: 350px !default;\n$toast-padding-x: .75rem !default;\n$toast-padding-y: .5rem !default;\n$toast-font-size: .875rem !default;\n$toast-color: null !default;\n$toast-background-color: rgba($white, .85) !default;\n$toast-border-width: 1px !default;\n$toast-border-color: rgba(0, 0, 0, .1) !default;\n$toast-border-radius: $border-radius !default;\n$toast-box-shadow: $box-shadow !default;\n$toast-spacing: $container-padding-x !default;\n\n$toast-header-color: $gray-600 !default;\n$toast-header-background-color: rgba($white, .85) !default;\n$toast-header-border-color: rgba(0, 0, 0, .05) !default;\n// scss-docs-end toast-variables\n\n\n// Badges\n\n// scss-docs-start badge-variables\n$badge-font-size: .75em !default;\n$badge-font-weight: $font-weight-bold !default;\n$badge-color: $white !default;\n$badge-padding-y: .35em !default;\n$badge-padding-x: .65em !default;\n$badge-border-radius: $border-radius !default;\n// scss-docs-end badge-variables\n\n\n// Modals\n\n// scss-docs-start modal-variables\n$modal-inner-padding: $spacer !default;\n\n$modal-footer-margin-between: .5rem !default;\n\n$modal-dialog-margin: .5rem !default;\n$modal-dialog-margin-y-sm-up: 1.75rem !default;\n\n$modal-title-line-height: $line-height-base !default;\n\n$modal-content-color: null !default;\n$modal-content-bg: $white !default;\n$modal-content-border-color: rgba($black, .2) !default;\n$modal-content-border-width: $border-width !default;\n$modal-content-border-radius: $border-radius-lg !default;\n$modal-content-inner-border-radius: subtract($modal-content-border-radius, $modal-content-border-width) !default;\n$modal-content-box-shadow-xs: $box-shadow-sm !default;\n$modal-content-box-shadow-sm-up: $box-shadow !default;\n\n$modal-backdrop-bg: $black !default;\n$modal-backdrop-opacity: .5 !default;\n$modal-header-border-color: $border-color !default;\n$modal-footer-border-color: $modal-header-border-color !default;\n$modal-header-border-width: $modal-content-border-width !default;\n$modal-footer-border-width: $modal-header-border-width !default;\n$modal-header-padding-y: $modal-inner-padding !default;\n$modal-header-padding-x: $modal-inner-padding !default;\n$modal-header-padding: $modal-header-padding-y $modal-header-padding-x !default; // Keep this for backwards compatibility\n\n$modal-sm: 300px !default;\n$modal-md: 500px !default;\n$modal-lg: 800px !default;\n$modal-xl: 1140px !default;\n\n$modal-fade-transform: translate(0, -50px) !default;\n$modal-show-transform: none !default;\n$modal-transition: transform .3s ease-out !default;\n$modal-scale-transform: scale(1.02) !default;\n// scss-docs-end modal-variables\n\n\n// Alerts\n//\n// Define alert colors, border radius, and padding.\n\n// scss-docs-start alert-variables\n$alert-padding-y: $spacer !default;\n$alert-padding-x: $spacer !default;\n$alert-margin-bottom: 1rem !default;\n$alert-border-radius: $border-radius !default;\n$alert-link-font-weight: $font-weight-bold !default;\n$alert-border-width: $border-width !default;\n$alert-bg-scale: -80% !default;\n$alert-border-scale: -70% !default;\n$alert-color-scale: 40% !default;\n$alert-dismissible-padding-r: $alert-padding-x * 3 !default; // 3x covers width of x plus default padding on either side\n// scss-docs-end alert-variables\n\n\n// Progress bars\n\n// scss-docs-start progress-variables\n$progress-height: 1rem !default;\n$progress-font-size: $font-size-base * .75 !default;\n$progress-bg: $gray-200 !default;\n$progress-border-radius: $border-radius !default;\n$progress-box-shadow: $box-shadow-inset !default;\n$progress-bar-color: $white !default;\n$progress-bar-bg: $primary !default;\n$progress-bar-animation-timing: 1s linear infinite !default;\n$progress-bar-transition: width .6s ease !default;\n// scss-docs-end progress-variables\n\n\n// List group\n\n// scss-docs-start list-group-variables\n$list-group-color: $gray-900 !default;\n$list-group-bg: $white !default;\n$list-group-border-color: rgba($black, .125) !default;\n$list-group-border-width: $border-width !default;\n$list-group-border-radius: $border-radius !default;\n\n$list-group-item-padding-y: $spacer * .5 !default;\n$list-group-item-padding-x: $spacer !default;\n$list-group-item-bg-scale: -80% !default;\n$list-group-item-color-scale: 40% !default;\n\n$list-group-hover-bg: $gray-100 !default;\n$list-group-active-color: $component-active-color !default;\n$list-group-active-bg: $component-active-bg !default;\n$list-group-active-border-color: $list-group-active-bg !default;\n\n$list-group-disabled-color: $gray-600 !default;\n$list-group-disabled-bg: $list-group-bg !default;\n\n$list-group-action-color: $gray-700 !default;\n$list-group-action-hover-color: $list-group-action-color !default;\n\n$list-group-action-active-color: $body-color !default;\n$list-group-action-active-bg: $gray-200 !default;\n// scss-docs-end list-group-variables\n\n\n// Image thumbnails\n\n// scss-docs-start thumbnail-variables\n$thumbnail-padding: .25rem !default;\n$thumbnail-bg: $body-bg !default;\n$thumbnail-border-width: $border-width !default;\n$thumbnail-border-color: $gray-300 !default;\n$thumbnail-border-radius: $border-radius !default;\n$thumbnail-box-shadow: $box-shadow-sm !default;\n// scss-docs-end thumbnail-variables\n\n\n// Figures\n\n// scss-docs-start figure-variables\n$figure-caption-font-size: $small-font-size !default;\n$figure-caption-color: $gray-600 !default;\n// scss-docs-end figure-variables\n\n\n// Breadcrumbs\n\n// scss-docs-start breadcrumb-variables\n$breadcrumb-font-size: null !default;\n$breadcrumb-padding-y: 0 !default;\n$breadcrumb-padding-x: 0 !default;\n$breadcrumb-item-padding-x: .5rem !default;\n$breadcrumb-margin-bottom: 1rem !default;\n$breadcrumb-bg: null !default;\n$breadcrumb-divider-color: $gray-600 !default;\n$breadcrumb-active-color: $gray-600 !default;\n$breadcrumb-divider: quote(\"/\") !default;\n$breadcrumb-divider-flipped: $breadcrumb-divider !default;\n$breadcrumb-border-radius: null !default;\n// scss-docs-end breadcrumb-variables\n\n// Carousel\n\n// scss-docs-start carousel-variables\n$carousel-control-color: $white !default;\n$carousel-control-width: 15% !default;\n$carousel-control-opacity: .5 !default;\n$carousel-control-hover-opacity: .9 !default;\n$carousel-control-transition: opacity .15s ease !default;\n\n$carousel-indicator-width: 30px !default;\n$carousel-indicator-height: 3px !default;\n$carousel-indicator-hit-area-height: 10px !default;\n$carousel-indicator-spacer: 3px !default;\n$carousel-indicator-opacity: .5 !default;\n$carousel-indicator-active-bg: $white !default;\n$carousel-indicator-active-opacity: 1 !default;\n$carousel-indicator-transition: opacity .6s ease !default;\n\n$carousel-caption-width: 70% !default;\n$carousel-caption-color: $white !default;\n$carousel-caption-padding-y: 1.25rem !default;\n$carousel-caption-spacer: 1.25rem !default;\n\n$carousel-control-icon-width: 2rem !default;\n\n$carousel-control-prev-icon-bg: url(\"data:image/svg+xml,\") !default;\n$carousel-control-next-icon-bg: url(\"data:image/svg+xml,\") !default;\n\n$carousel-transition-duration: .6s !default;\n$carousel-transition: transform $carousel-transition-duration ease-in-out !default; // Define transform transition first if using multiple transitions (e.g., `transform 2s ease, opacity .5s ease-out`)\n\n$carousel-dark-indicator-active-bg: $black !default;\n$carousel-dark-caption-color: $black !default;\n$carousel-dark-control-icon-filter: invert(1) grayscale(100) !default;\n// scss-docs-end carousel-variables\n\n\n// Spinners\n\n// scss-docs-start spinner-variables\n$spinner-width: 2rem !default;\n$spinner-height: $spinner-width !default;\n$spinner-vertical-align: -.125em !default;\n$spinner-border-width: .25em !default;\n$spinner-animation-speed: .75s !default;\n\n$spinner-width-sm: 1rem !default;\n$spinner-height-sm: $spinner-width-sm !default;\n$spinner-border-width-sm: .2em !default;\n// scss-docs-end spinner-variables\n\n\n// Close\n\n// scss-docs-start close-variables\n$btn-close-width: 1em !default;\n$btn-close-height: $btn-close-width !default;\n$btn-close-padding-x: .25em !default;\n$btn-close-padding-y: $btn-close-padding-x !default;\n$btn-close-color: $black !default;\n$btn-close-bg: url(\"data:image/svg+xml,\") !default;\n$btn-close-focus-shadow: $input-btn-focus-box-shadow !default;\n$btn-close-opacity: .5 !default;\n$btn-close-hover-opacity: .75 !default;\n$btn-close-focus-opacity: 1 !default;\n$btn-close-disabled-opacity: .25 !default;\n$btn-close-white-filter: invert(1) grayscale(100%) brightness(200%) !default;\n// scss-docs-end close-variables\n\n\n// Offcanvas\n\n// scss-docs-start offcanvas-variables\n$offcanvas-padding-y: $modal-inner-padding !default;\n$offcanvas-padding-x: $modal-inner-padding !default;\n$offcanvas-horizontal-width: 400px !default;\n$offcanvas-vertical-height: 30vh !default;\n$offcanvas-transition-duration: .3s !default;\n$offcanvas-border-color: $modal-content-border-color !default;\n$offcanvas-border-width: $modal-content-border-width !default;\n$offcanvas-title-line-height: $modal-title-line-height !default;\n$offcanvas-bg-color: $modal-content-bg !default;\n$offcanvas-color: $modal-content-color !default;\n$offcanvas-box-shadow: $modal-content-box-shadow-xs !default;\n$offcanvas-backdrop-bg: $modal-backdrop-bg !default;\n$offcanvas-backdrop-opacity: $modal-backdrop-opacity !default;\n// scss-docs-end offcanvas-variables\n\n// Code\n\n$code-font-size: $small-font-size !default;\n$code-color: $pink !default;\n\n$kbd-padding-y: .2rem !default;\n$kbd-padding-x: .4rem !default;\n$kbd-font-size: $code-font-size !default;\n$kbd-color: $white !default;\n$kbd-bg: $gray-900 !default;\n\n$pre-color: null !default;\n","// Row\n//\n// Rows contain your columns.\n\n@if $enable-grid-classes {\n .row {\n @include make-row();\n\n > * {\n @include make-col-ready();\n }\n }\n}\n\n@if $enable-cssgrid {\n .grid {\n display: grid;\n grid-template-rows: repeat(var(--#{$variable-prefix}rows, 1), 1fr);\n grid-template-columns: repeat(var(--#{$variable-prefix}columns, #{$grid-columns}), 1fr);\n gap: var(--#{$variable-prefix}gap, #{$grid-gutter-width});\n\n @include make-cssgrid();\n }\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n@if $enable-grid-classes {\n @include make-grid-columns();\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n@mixin make-row($gutter: $grid-gutter-width) {\n --#{$variable-prefix}gutter-x: #{$gutter};\n --#{$variable-prefix}gutter-y: 0;\n display: flex;\n flex-wrap: wrap;\n margin-top: calc(var(--#{$variable-prefix}gutter-y) * -1); // stylelint-disable-line function-disallowed-list\n margin-right: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list\n margin-left: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list\n}\n\n@mixin make-col-ready($gutter: $grid-gutter-width) {\n // Add box sizing if only the grid is loaded\n box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);\n // Prevent columns from becoming too narrow when at smaller grid tiers by\n // always setting `width: 100%;`. This works because we set the width\n // later on to override this initial width.\n flex-shrink: 0;\n width: 100%;\n max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid\n padding-right: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n padding-left: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n margin-top: var(--#{$variable-prefix}gutter-y);\n}\n\n@mixin make-col($size: false, $columns: $grid-columns) {\n @if $size {\n flex: 0 0 auto;\n width: percentage(divide($size, $columns));\n\n } @else {\n flex: 1 1 0;\n max-width: 100%;\n }\n}\n\n@mixin make-col-auto() {\n flex: 0 0 auto;\n width: auto;\n}\n\n@mixin make-col-offset($size, $columns: $grid-columns) {\n $num: divide($size, $columns);\n margin-left: if($num == 0, 0, percentage($num));\n}\n\n// Row columns\n//\n// Specify on a parent element(e.g., .row) to force immediate children into NN\n// numberof columns. Supports wrapping to new lines, but does not do a Masonry\n// style grid.\n@mixin row-cols($count) {\n > * {\n flex: 0 0 auto;\n width: divide(100%, $count);\n }\n}\n\n// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `$grid-columns`.\n\n@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {\n @each $breakpoint in map-keys($breakpoints) {\n $infix: breakpoint-infix($breakpoint, $breakpoints);\n\n @include media-breakpoint-up($breakpoint, $breakpoints) {\n // Provide basic `.col-{bp}` classes for equal-width flexbox columns\n .col#{$infix} {\n flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4\n }\n\n .row-cols#{$infix}-auto > * {\n @include make-col-auto();\n }\n\n @if $grid-row-columns > 0 {\n @for $i from 1 through $grid-row-columns {\n .row-cols#{$infix}-#{$i} {\n @include row-cols($i);\n }\n }\n }\n\n .col#{$infix}-auto {\n @include make-col-auto();\n }\n\n @if $columns > 0 {\n @for $i from 1 through $columns {\n .col#{$infix}-#{$i} {\n @include make-col($i, $columns);\n }\n }\n\n // `$columns - 1` because offsetting by the width of an entire row isn't possible\n @for $i from 0 through ($columns - 1) {\n @if not ($infix == \"\" and $i == 0) { // Avoid emitting useless .offset-0\n .offset#{$infix}-#{$i} {\n @include make-col-offset($i, $columns);\n }\n }\n }\n }\n\n // Gutters\n //\n // Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.\n @each $key, $value in $gutters {\n .g#{$infix}-#{$key},\n .gx#{$infix}-#{$key} {\n --#{$variable-prefix}gutter-x: #{$value};\n }\n\n .g#{$infix}-#{$key},\n .gy#{$infix}-#{$key} {\n --#{$variable-prefix}gutter-y: #{$value};\n }\n }\n }\n }\n}\n\n@mixin make-cssgrid($columns: $grid-columns, $breakpoints: $grid-breakpoints) {\n @each $breakpoint in map-keys($breakpoints) {\n $infix: breakpoint-infix($breakpoint, $breakpoints);\n\n @include media-breakpoint-up($breakpoint, $breakpoints) {\n @if $columns > 0 {\n @for $i from 1 through $columns {\n .g-col#{$infix}-#{$i} {\n grid-column: auto / span $i;\n }\n }\n\n // Start with `1` because `0` is and invalid value.\n // Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible.\n @for $i from 1 through ($columns - 1) {\n .g-start#{$infix}-#{$i} {\n grid-column-start: $i;\n }\n }\n }\n }\n }\n}\n","// Utility generator\n// Used to generate utilities & print utilities\n@mixin generate-utility($utility, $infix, $is-rfs-media-query: false) {\n $values: map-get($utility, values);\n\n // If the values are a list or string, convert it into a map\n @if type-of($values) == \"string\" or type-of(nth($values, 1)) != \"list\" {\n $values: zip($values, $values);\n }\n\n @each $key, $value in $values {\n $properties: map-get($utility, property);\n\n // Multiple properties are possible, for example with vertical or horizontal margins or paddings\n @if type-of($properties) == \"string\" {\n $properties: append((), $properties);\n }\n\n // Use custom class if present\n $property-class: if(map-has-key($utility, class), map-get($utility, class), nth($properties, 1));\n $property-class: if($property-class == null, \"\", $property-class);\n\n // State params to generate pseudo-classes\n $state: if(map-has-key($utility, state), map-get($utility, state), ());\n\n $infix: if($property-class == \"\" and str-slice($infix, 1, 1) == \"-\", str-slice($infix, 2), $infix);\n\n // Don't prefix if value key is null (eg. with shadow class)\n $property-class-modifier: if($key, if($property-class == \"\" and $infix == \"\", \"\", \"-\") + $key, \"\");\n\n @if map-get($utility, rfs) {\n // Inside the media query\n @if $is-rfs-media-query {\n $val: rfs-value($value);\n\n // Do not render anything if fluid and non fluid values are the same\n $value: if($val == rfs-fluid-value($value), null, $val);\n }\n @else {\n $value: rfs-fluid-value($value);\n }\n }\n\n $is-css-var: map-get($utility, css-var);\n $is-local-vars: map-get($utility, local-vars);\n $is-rtl: map-get($utility, rtl);\n\n @if $value != null {\n @if $is-rtl == false {\n /* rtl:begin:remove */\n }\n\n @if $is-css-var {\n .#{$property-class + $infix + $property-class-modifier} {\n --#{$variable-prefix}#{$property-class}: #{$value};\n }\n\n @each $pseudo in $state {\n .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {\n --#{$variable-prefix}#{$property-class}: #{$value};\n }\n }\n } @else {\n .#{$property-class + $infix + $property-class-modifier} {\n @each $property in $properties {\n @if $is-local-vars {\n @each $local-var, $value in $is-local-vars {\n --#{$variable-prefix}#{$local-var}: #{$value};\n }\n }\n #{$property}: $value if($enable-important-utilities, !important, null);\n }\n }\n\n @each $pseudo in $state {\n .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {\n @each $property in $properties {\n #{$property}: $value if($enable-important-utilities, !important, null);\n }\n }\n }\n }\n\n @if $is-rtl == false {\n /* rtl:end:remove */\n }\n }\n }\n}\n","// Loop over each breakpoint\n@each $breakpoint in map-keys($grid-breakpoints) {\n\n // Generate media query if needed\n @include media-breakpoint-up($breakpoint) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n // Loop over each utility property\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Only proceed if responsive media queries are enabled or if it's the base media query\n @if type-of($utility) == \"map\" and (map-get($utility, responsive) or $infix == \"\") {\n @include generate-utility($utility, $infix);\n }\n }\n }\n}\n\n// RFS rescaling\n@media (min-width: $rfs-mq-value) {\n @each $breakpoint in map-keys($grid-breakpoints) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n @if (map-get($grid-breakpoints, $breakpoint) < $rfs-breakpoint) {\n // Loop over each utility property\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Only proceed if responsive media queries are enabled or if it's the base media query\n @if type-of($utility) == \"map\" and map-get($utility, rfs) and (map-get($utility, responsive) or $infix == \"\") {\n @include generate-utility($utility, $infix, true);\n }\n }\n }\n }\n}\n\n\n// Print utilities\n@media print {\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Then check if the utility needs print styles\n @if type-of($utility) == \"map\" and map-get($utility, print) == true {\n @include generate-utility($utility, \"-print\");\n }\n }\n}\n"]} \ No newline at end of file diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css new file mode 100644 index 0000000..3160359 --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css @@ -0,0 +1,7 @@ +/*! + * Bootstrap Grid v5.1.0 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors + * Copyright 2011-2021 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{width:100%;padding-right:var(--bs-gutter-x,.75rem);padding-left:var(--bs-gutter-x,.75rem);margin-right:auto;margin-left:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}@media (min-width:1400px){.container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{max-width:1320px}}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(var(--bs-gutter-y) * -1);margin-right:calc(var(--bs-gutter-x) * -.5);margin-left:calc(var(--bs-gutter-x) * -.5)}.row>*{box-sizing:border-box;flex-shrink:0;width:100%;max-width:100%;padding-right:calc(var(--bs-gutter-x) * .5);padding-left:calc(var(--bs-gutter-x) * .5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.33333333%}.col-2{flex:0 0 auto;width:16.66666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.33333333%}.col-5{flex:0 0 auto;width:41.66666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.33333333%}.col-8{flex:0 0 auto;width:66.66666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.33333333%}.col-11{flex:0 0 auto;width:91.66666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-left:8.33333333%}.offset-2{margin-left:16.66666667%}.offset-3{margin-left:25%}.offset-4{margin-left:33.33333333%}.offset-5{margin-left:41.66666667%}.offset-6{margin-left:50%}.offset-7{margin-left:58.33333333%}.offset-8{margin-left:66.66666667%}.offset-9{margin-left:75%}.offset-10{margin-left:83.33333333%}.offset-11{margin-left:91.66666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width:576px){.col-sm{flex:1 0 0%}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.33333333%}.col-sm-2{flex:0 0 auto;width:16.66666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.33333333%}.col-sm-5{flex:0 0 auto;width:41.66666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.33333333%}.col-sm-8{flex:0 0 auto;width:66.66666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.33333333%}.col-sm-11{flex:0 0 auto;width:91.66666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-left:0}.offset-sm-1{margin-left:8.33333333%}.offset-sm-2{margin-left:16.66666667%}.offset-sm-3{margin-left:25%}.offset-sm-4{margin-left:33.33333333%}.offset-sm-5{margin-left:41.66666667%}.offset-sm-6{margin-left:50%}.offset-sm-7{margin-left:58.33333333%}.offset-sm-8{margin-left:66.66666667%}.offset-sm-9{margin-left:75%}.offset-sm-10{margin-left:83.33333333%}.offset-sm-11{margin-left:91.66666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width:768px){.col-md{flex:1 0 0%}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.33333333%}.col-md-2{flex:0 0 auto;width:16.66666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.33333333%}.col-md-5{flex:0 0 auto;width:41.66666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.33333333%}.col-md-8{flex:0 0 auto;width:66.66666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.33333333%}.col-md-11{flex:0 0 auto;width:91.66666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-left:0}.offset-md-1{margin-left:8.33333333%}.offset-md-2{margin-left:16.66666667%}.offset-md-3{margin-left:25%}.offset-md-4{margin-left:33.33333333%}.offset-md-5{margin-left:41.66666667%}.offset-md-6{margin-left:50%}.offset-md-7{margin-left:58.33333333%}.offset-md-8{margin-left:66.66666667%}.offset-md-9{margin-left:75%}.offset-md-10{margin-left:83.33333333%}.offset-md-11{margin-left:91.66666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width:992px){.col-lg{flex:1 0 0%}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.33333333%}.col-lg-2{flex:0 0 auto;width:16.66666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.33333333%}.col-lg-5{flex:0 0 auto;width:41.66666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.33333333%}.col-lg-8{flex:0 0 auto;width:66.66666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.33333333%}.col-lg-11{flex:0 0 auto;width:91.66666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-left:0}.offset-lg-1{margin-left:8.33333333%}.offset-lg-2{margin-left:16.66666667%}.offset-lg-3{margin-left:25%}.offset-lg-4{margin-left:33.33333333%}.offset-lg-5{margin-left:41.66666667%}.offset-lg-6{margin-left:50%}.offset-lg-7{margin-left:58.33333333%}.offset-lg-8{margin-left:66.66666667%}.offset-lg-9{margin-left:75%}.offset-lg-10{margin-left:83.33333333%}.offset-lg-11{margin-left:91.66666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width:1200px){.col-xl{flex:1 0 0%}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.33333333%}.col-xl-2{flex:0 0 auto;width:16.66666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.33333333%}.col-xl-5{flex:0 0 auto;width:41.66666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.33333333%}.col-xl-8{flex:0 0 auto;width:66.66666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.33333333%}.col-xl-11{flex:0 0 auto;width:91.66666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-left:0}.offset-xl-1{margin-left:8.33333333%}.offset-xl-2{margin-left:16.66666667%}.offset-xl-3{margin-left:25%}.offset-xl-4{margin-left:33.33333333%}.offset-xl-5{margin-left:41.66666667%}.offset-xl-6{margin-left:50%}.offset-xl-7{margin-left:58.33333333%}.offset-xl-8{margin-left:66.66666667%}.offset-xl-9{margin-left:75%}.offset-xl-10{margin-left:83.33333333%}.offset-xl-11{margin-left:91.66666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width:1400px){.col-xxl{flex:1 0 0%}.row-cols-xxl-auto>*{flex:0 0 auto;width:auto}.row-cols-xxl-1>*{flex:0 0 auto;width:100%}.row-cols-xxl-2>*{flex:0 0 auto;width:50%}.row-cols-xxl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xxl-4>*{flex:0 0 auto;width:25%}.row-cols-xxl-5>*{flex:0 0 auto;width:20%}.row-cols-xxl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-1{flex:0 0 auto;width:8.33333333%}.col-xxl-2{flex:0 0 auto;width:16.66666667%}.col-xxl-3{flex:0 0 auto;width:25%}.col-xxl-4{flex:0 0 auto;width:33.33333333%}.col-xxl-5{flex:0 0 auto;width:41.66666667%}.col-xxl-6{flex:0 0 auto;width:50%}.col-xxl-7{flex:0 0 auto;width:58.33333333%}.col-xxl-8{flex:0 0 auto;width:66.66666667%}.col-xxl-9{flex:0 0 auto;width:75%}.col-xxl-10{flex:0 0 auto;width:83.33333333%}.col-xxl-11{flex:0 0 auto;width:91.66666667%}.col-xxl-12{flex:0 0 auto;width:100%}.offset-xxl-0{margin-left:0}.offset-xxl-1{margin-left:8.33333333%}.offset-xxl-2{margin-left:16.66666667%}.offset-xxl-3{margin-left:25%}.offset-xxl-4{margin-left:33.33333333%}.offset-xxl-5{margin-left:41.66666667%}.offset-xxl-6{margin-left:50%}.offset-xxl-7{margin-left:58.33333333%}.offset-xxl-8{margin-left:66.66666667%}.offset-xxl-9{margin-left:75%}.offset-xxl-10{margin-left:83.33333333%}.offset-xxl-11{margin-left:91.66666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.justify-content-evenly{justify-content:space-evenly!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}.order-first{order:-1!important}.order-0{order:0!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.order-4{order:4!important}.order-5{order:5!important}.order-last{order:6!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-auto{margin:auto!important}.mx-0{margin-right:0!important;margin-left:0!important}.mx-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-3{margin-right:1rem!important;margin-left:1rem!important}.mx-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-5{margin-right:3rem!important;margin-left:3rem!important}.mx-auto{margin-right:auto!important;margin-left:auto!important}.my-0{margin-top:0!important;margin-bottom:0!important}.my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-auto{margin-top:auto!important}.me-0{margin-right:0!important}.me-1{margin-right:.25rem!important}.me-2{margin-right:.5rem!important}.me-3{margin-right:1rem!important}.me-4{margin-right:1.5rem!important}.me-5{margin-right:3rem!important}.me-auto{margin-right:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-left:0!important}.ms-1{margin-left:.25rem!important}.ms-2{margin-left:.5rem!important}.ms-3{margin-left:1rem!important}.ms-4{margin-left:1.5rem!important}.ms-5{margin-left:3rem!important}.ms-auto{margin-left:auto!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.px-0{padding-right:0!important;padding-left:0!important}.px-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-3{padding-right:1rem!important;padding-left:1rem!important}.px-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-5{padding-right:3rem!important;padding-left:3rem!important}.py-0{padding-top:0!important;padding-bottom:0!important}.py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-0{padding-top:0!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pe-0{padding-right:0!important}.pe-1{padding-right:.25rem!important}.pe-2{padding-right:.5rem!important}.pe-3{padding-right:1rem!important}.pe-4{padding-right:1.5rem!important}.pe-5{padding-right:3rem!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.pb-5{padding-bottom:3rem!important}.ps-0{padding-left:0!important}.ps-1{padding-left:.25rem!important}.ps-2{padding-left:.5rem!important}.ps-3{padding-left:1rem!important}.ps-4{padding-left:1.5rem!important}.ps-5{padding-left:3rem!important}@media (min-width:576px){.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-grid{display:grid!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}.d-sm-none{display:none!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.justify-content-sm-evenly{justify-content:space-evenly!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}.order-sm-first{order:-1!important}.order-sm-0{order:0!important}.order-sm-1{order:1!important}.order-sm-2{order:2!important}.order-sm-3{order:3!important}.order-sm-4{order:4!important}.order-sm-5{order:5!important}.order-sm-last{order:6!important}.m-sm-0{margin:0!important}.m-sm-1{margin:.25rem!important}.m-sm-2{margin:.5rem!important}.m-sm-3{margin:1rem!important}.m-sm-4{margin:1.5rem!important}.m-sm-5{margin:3rem!important}.m-sm-auto{margin:auto!important}.mx-sm-0{margin-right:0!important;margin-left:0!important}.mx-sm-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-sm-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-sm-3{margin-right:1rem!important;margin-left:1rem!important}.mx-sm-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-sm-5{margin-right:3rem!important;margin-left:3rem!important}.mx-sm-auto{margin-right:auto!important;margin-left:auto!important}.my-sm-0{margin-top:0!important;margin-bottom:0!important}.my-sm-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-sm-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-sm-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-sm-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-sm-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-sm-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-sm-0{margin-top:0!important}.mt-sm-1{margin-top:.25rem!important}.mt-sm-2{margin-top:.5rem!important}.mt-sm-3{margin-top:1rem!important}.mt-sm-4{margin-top:1.5rem!important}.mt-sm-5{margin-top:3rem!important}.mt-sm-auto{margin-top:auto!important}.me-sm-0{margin-right:0!important}.me-sm-1{margin-right:.25rem!important}.me-sm-2{margin-right:.5rem!important}.me-sm-3{margin-right:1rem!important}.me-sm-4{margin-right:1.5rem!important}.me-sm-5{margin-right:3rem!important}.me-sm-auto{margin-right:auto!important}.mb-sm-0{margin-bottom:0!important}.mb-sm-1{margin-bottom:.25rem!important}.mb-sm-2{margin-bottom:.5rem!important}.mb-sm-3{margin-bottom:1rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.mb-sm-5{margin-bottom:3rem!important}.mb-sm-auto{margin-bottom:auto!important}.ms-sm-0{margin-left:0!important}.ms-sm-1{margin-left:.25rem!important}.ms-sm-2{margin-left:.5rem!important}.ms-sm-3{margin-left:1rem!important}.ms-sm-4{margin-left:1.5rem!important}.ms-sm-5{margin-left:3rem!important}.ms-sm-auto{margin-left:auto!important}.p-sm-0{padding:0!important}.p-sm-1{padding:.25rem!important}.p-sm-2{padding:.5rem!important}.p-sm-3{padding:1rem!important}.p-sm-4{padding:1.5rem!important}.p-sm-5{padding:3rem!important}.px-sm-0{padding-right:0!important;padding-left:0!important}.px-sm-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-sm-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-sm-3{padding-right:1rem!important;padding-left:1rem!important}.px-sm-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-sm-5{padding-right:3rem!important;padding-left:3rem!important}.py-sm-0{padding-top:0!important;padding-bottom:0!important}.py-sm-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-sm-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-sm-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-sm-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-sm-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-sm-0{padding-top:0!important}.pt-sm-1{padding-top:.25rem!important}.pt-sm-2{padding-top:.5rem!important}.pt-sm-3{padding-top:1rem!important}.pt-sm-4{padding-top:1.5rem!important}.pt-sm-5{padding-top:3rem!important}.pe-sm-0{padding-right:0!important}.pe-sm-1{padding-right:.25rem!important}.pe-sm-2{padding-right:.5rem!important}.pe-sm-3{padding-right:1rem!important}.pe-sm-4{padding-right:1.5rem!important}.pe-sm-5{padding-right:3rem!important}.pb-sm-0{padding-bottom:0!important}.pb-sm-1{padding-bottom:.25rem!important}.pb-sm-2{padding-bottom:.5rem!important}.pb-sm-3{padding-bottom:1rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pb-sm-5{padding-bottom:3rem!important}.ps-sm-0{padding-left:0!important}.ps-sm-1{padding-left:.25rem!important}.ps-sm-2{padding-left:.5rem!important}.ps-sm-3{padding-left:1rem!important}.ps-sm-4{padding-left:1.5rem!important}.ps-sm-5{padding-left:3rem!important}}@media (min-width:768px){.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-grid{display:grid!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}.d-md-none{display:none!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.justify-content-md-evenly{justify-content:space-evenly!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}.order-md-first{order:-1!important}.order-md-0{order:0!important}.order-md-1{order:1!important}.order-md-2{order:2!important}.order-md-3{order:3!important}.order-md-4{order:4!important}.order-md-5{order:5!important}.order-md-last{order:6!important}.m-md-0{margin:0!important}.m-md-1{margin:.25rem!important}.m-md-2{margin:.5rem!important}.m-md-3{margin:1rem!important}.m-md-4{margin:1.5rem!important}.m-md-5{margin:3rem!important}.m-md-auto{margin:auto!important}.mx-md-0{margin-right:0!important;margin-left:0!important}.mx-md-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-md-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-md-3{margin-right:1rem!important;margin-left:1rem!important}.mx-md-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-md-5{margin-right:3rem!important;margin-left:3rem!important}.mx-md-auto{margin-right:auto!important;margin-left:auto!important}.my-md-0{margin-top:0!important;margin-bottom:0!important}.my-md-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-md-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-md-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-md-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-md-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-md-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-md-0{margin-top:0!important}.mt-md-1{margin-top:.25rem!important}.mt-md-2{margin-top:.5rem!important}.mt-md-3{margin-top:1rem!important}.mt-md-4{margin-top:1.5rem!important}.mt-md-5{margin-top:3rem!important}.mt-md-auto{margin-top:auto!important}.me-md-0{margin-right:0!important}.me-md-1{margin-right:.25rem!important}.me-md-2{margin-right:.5rem!important}.me-md-3{margin-right:1rem!important}.me-md-4{margin-right:1.5rem!important}.me-md-5{margin-right:3rem!important}.me-md-auto{margin-right:auto!important}.mb-md-0{margin-bottom:0!important}.mb-md-1{margin-bottom:.25rem!important}.mb-md-2{margin-bottom:.5rem!important}.mb-md-3{margin-bottom:1rem!important}.mb-md-4{margin-bottom:1.5rem!important}.mb-md-5{margin-bottom:3rem!important}.mb-md-auto{margin-bottom:auto!important}.ms-md-0{margin-left:0!important}.ms-md-1{margin-left:.25rem!important}.ms-md-2{margin-left:.5rem!important}.ms-md-3{margin-left:1rem!important}.ms-md-4{margin-left:1.5rem!important}.ms-md-5{margin-left:3rem!important}.ms-md-auto{margin-left:auto!important}.p-md-0{padding:0!important}.p-md-1{padding:.25rem!important}.p-md-2{padding:.5rem!important}.p-md-3{padding:1rem!important}.p-md-4{padding:1.5rem!important}.p-md-5{padding:3rem!important}.px-md-0{padding-right:0!important;padding-left:0!important}.px-md-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-md-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-md-3{padding-right:1rem!important;padding-left:1rem!important}.px-md-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-md-5{padding-right:3rem!important;padding-left:3rem!important}.py-md-0{padding-top:0!important;padding-bottom:0!important}.py-md-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-md-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-md-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-md-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-md-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-md-0{padding-top:0!important}.pt-md-1{padding-top:.25rem!important}.pt-md-2{padding-top:.5rem!important}.pt-md-3{padding-top:1rem!important}.pt-md-4{padding-top:1.5rem!important}.pt-md-5{padding-top:3rem!important}.pe-md-0{padding-right:0!important}.pe-md-1{padding-right:.25rem!important}.pe-md-2{padding-right:.5rem!important}.pe-md-3{padding-right:1rem!important}.pe-md-4{padding-right:1.5rem!important}.pe-md-5{padding-right:3rem!important}.pb-md-0{padding-bottom:0!important}.pb-md-1{padding-bottom:.25rem!important}.pb-md-2{padding-bottom:.5rem!important}.pb-md-3{padding-bottom:1rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pb-md-5{padding-bottom:3rem!important}.ps-md-0{padding-left:0!important}.ps-md-1{padding-left:.25rem!important}.ps-md-2{padding-left:.5rem!important}.ps-md-3{padding-left:1rem!important}.ps-md-4{padding-left:1.5rem!important}.ps-md-5{padding-left:3rem!important}}@media (min-width:992px){.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-grid{display:grid!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}.d-lg-none{display:none!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.justify-content-lg-evenly{justify-content:space-evenly!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}.order-lg-first{order:-1!important}.order-lg-0{order:0!important}.order-lg-1{order:1!important}.order-lg-2{order:2!important}.order-lg-3{order:3!important}.order-lg-4{order:4!important}.order-lg-5{order:5!important}.order-lg-last{order:6!important}.m-lg-0{margin:0!important}.m-lg-1{margin:.25rem!important}.m-lg-2{margin:.5rem!important}.m-lg-3{margin:1rem!important}.m-lg-4{margin:1.5rem!important}.m-lg-5{margin:3rem!important}.m-lg-auto{margin:auto!important}.mx-lg-0{margin-right:0!important;margin-left:0!important}.mx-lg-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-lg-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-lg-3{margin-right:1rem!important;margin-left:1rem!important}.mx-lg-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-lg-5{margin-right:3rem!important;margin-left:3rem!important}.mx-lg-auto{margin-right:auto!important;margin-left:auto!important}.my-lg-0{margin-top:0!important;margin-bottom:0!important}.my-lg-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-lg-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-lg-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-lg-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-lg-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-lg-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-lg-0{margin-top:0!important}.mt-lg-1{margin-top:.25rem!important}.mt-lg-2{margin-top:.5rem!important}.mt-lg-3{margin-top:1rem!important}.mt-lg-4{margin-top:1.5rem!important}.mt-lg-5{margin-top:3rem!important}.mt-lg-auto{margin-top:auto!important}.me-lg-0{margin-right:0!important}.me-lg-1{margin-right:.25rem!important}.me-lg-2{margin-right:.5rem!important}.me-lg-3{margin-right:1rem!important}.me-lg-4{margin-right:1.5rem!important}.me-lg-5{margin-right:3rem!important}.me-lg-auto{margin-right:auto!important}.mb-lg-0{margin-bottom:0!important}.mb-lg-1{margin-bottom:.25rem!important}.mb-lg-2{margin-bottom:.5rem!important}.mb-lg-3{margin-bottom:1rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.mb-lg-5{margin-bottom:3rem!important}.mb-lg-auto{margin-bottom:auto!important}.ms-lg-0{margin-left:0!important}.ms-lg-1{margin-left:.25rem!important}.ms-lg-2{margin-left:.5rem!important}.ms-lg-3{margin-left:1rem!important}.ms-lg-4{margin-left:1.5rem!important}.ms-lg-5{margin-left:3rem!important}.ms-lg-auto{margin-left:auto!important}.p-lg-0{padding:0!important}.p-lg-1{padding:.25rem!important}.p-lg-2{padding:.5rem!important}.p-lg-3{padding:1rem!important}.p-lg-4{padding:1.5rem!important}.p-lg-5{padding:3rem!important}.px-lg-0{padding-right:0!important;padding-left:0!important}.px-lg-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-lg-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-lg-3{padding-right:1rem!important;padding-left:1rem!important}.px-lg-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-lg-5{padding-right:3rem!important;padding-left:3rem!important}.py-lg-0{padding-top:0!important;padding-bottom:0!important}.py-lg-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-lg-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-lg-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-lg-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-lg-0{padding-top:0!important}.pt-lg-1{padding-top:.25rem!important}.pt-lg-2{padding-top:.5rem!important}.pt-lg-3{padding-top:1rem!important}.pt-lg-4{padding-top:1.5rem!important}.pt-lg-5{padding-top:3rem!important}.pe-lg-0{padding-right:0!important}.pe-lg-1{padding-right:.25rem!important}.pe-lg-2{padding-right:.5rem!important}.pe-lg-3{padding-right:1rem!important}.pe-lg-4{padding-right:1.5rem!important}.pe-lg-5{padding-right:3rem!important}.pb-lg-0{padding-bottom:0!important}.pb-lg-1{padding-bottom:.25rem!important}.pb-lg-2{padding-bottom:.5rem!important}.pb-lg-3{padding-bottom:1rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pb-lg-5{padding-bottom:3rem!important}.ps-lg-0{padding-left:0!important}.ps-lg-1{padding-left:.25rem!important}.ps-lg-2{padding-left:.5rem!important}.ps-lg-3{padding-left:1rem!important}.ps-lg-4{padding-left:1.5rem!important}.ps-lg-5{padding-left:3rem!important}}@media (min-width:1200px){.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-grid{display:grid!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}.d-xl-none{display:none!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.justify-content-xl-evenly{justify-content:space-evenly!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}.order-xl-first{order:-1!important}.order-xl-0{order:0!important}.order-xl-1{order:1!important}.order-xl-2{order:2!important}.order-xl-3{order:3!important}.order-xl-4{order:4!important}.order-xl-5{order:5!important}.order-xl-last{order:6!important}.m-xl-0{margin:0!important}.m-xl-1{margin:.25rem!important}.m-xl-2{margin:.5rem!important}.m-xl-3{margin:1rem!important}.m-xl-4{margin:1.5rem!important}.m-xl-5{margin:3rem!important}.m-xl-auto{margin:auto!important}.mx-xl-0{margin-right:0!important;margin-left:0!important}.mx-xl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xl-auto{margin-right:auto!important;margin-left:auto!important}.my-xl-0{margin-top:0!important;margin-bottom:0!important}.my-xl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xl-0{margin-top:0!important}.mt-xl-1{margin-top:.25rem!important}.mt-xl-2{margin-top:.5rem!important}.mt-xl-3{margin-top:1rem!important}.mt-xl-4{margin-top:1.5rem!important}.mt-xl-5{margin-top:3rem!important}.mt-xl-auto{margin-top:auto!important}.me-xl-0{margin-right:0!important}.me-xl-1{margin-right:.25rem!important}.me-xl-2{margin-right:.5rem!important}.me-xl-3{margin-right:1rem!important}.me-xl-4{margin-right:1.5rem!important}.me-xl-5{margin-right:3rem!important}.me-xl-auto{margin-right:auto!important}.mb-xl-0{margin-bottom:0!important}.mb-xl-1{margin-bottom:.25rem!important}.mb-xl-2{margin-bottom:.5rem!important}.mb-xl-3{margin-bottom:1rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.mb-xl-5{margin-bottom:3rem!important}.mb-xl-auto{margin-bottom:auto!important}.ms-xl-0{margin-left:0!important}.ms-xl-1{margin-left:.25rem!important}.ms-xl-2{margin-left:.5rem!important}.ms-xl-3{margin-left:1rem!important}.ms-xl-4{margin-left:1.5rem!important}.ms-xl-5{margin-left:3rem!important}.ms-xl-auto{margin-left:auto!important}.p-xl-0{padding:0!important}.p-xl-1{padding:.25rem!important}.p-xl-2{padding:.5rem!important}.p-xl-3{padding:1rem!important}.p-xl-4{padding:1.5rem!important}.p-xl-5{padding:3rem!important}.px-xl-0{padding-right:0!important;padding-left:0!important}.px-xl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xl-0{padding-top:0!important;padding-bottom:0!important}.py-xl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xl-0{padding-top:0!important}.pt-xl-1{padding-top:.25rem!important}.pt-xl-2{padding-top:.5rem!important}.pt-xl-3{padding-top:1rem!important}.pt-xl-4{padding-top:1.5rem!important}.pt-xl-5{padding-top:3rem!important}.pe-xl-0{padding-right:0!important}.pe-xl-1{padding-right:.25rem!important}.pe-xl-2{padding-right:.5rem!important}.pe-xl-3{padding-right:1rem!important}.pe-xl-4{padding-right:1.5rem!important}.pe-xl-5{padding-right:3rem!important}.pb-xl-0{padding-bottom:0!important}.pb-xl-1{padding-bottom:.25rem!important}.pb-xl-2{padding-bottom:.5rem!important}.pb-xl-3{padding-bottom:1rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pb-xl-5{padding-bottom:3rem!important}.ps-xl-0{padding-left:0!important}.ps-xl-1{padding-left:.25rem!important}.ps-xl-2{padding-left:.5rem!important}.ps-xl-3{padding-left:1rem!important}.ps-xl-4{padding-left:1.5rem!important}.ps-xl-5{padding-left:3rem!important}}@media (min-width:1400px){.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-grid{display:grid!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}.d-xxl-none{display:none!important}.flex-xxl-fill{flex:1 1 auto!important}.flex-xxl-row{flex-direction:row!important}.flex-xxl-column{flex-direction:column!important}.flex-xxl-row-reverse{flex-direction:row-reverse!important}.flex-xxl-column-reverse{flex-direction:column-reverse!important}.flex-xxl-grow-0{flex-grow:0!important}.flex-xxl-grow-1{flex-grow:1!important}.flex-xxl-shrink-0{flex-shrink:0!important}.flex-xxl-shrink-1{flex-shrink:1!important}.flex-xxl-wrap{flex-wrap:wrap!important}.flex-xxl-nowrap{flex-wrap:nowrap!important}.flex-xxl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xxl-start{justify-content:flex-start!important}.justify-content-xxl-end{justify-content:flex-end!important}.justify-content-xxl-center{justify-content:center!important}.justify-content-xxl-between{justify-content:space-between!important}.justify-content-xxl-around{justify-content:space-around!important}.justify-content-xxl-evenly{justify-content:space-evenly!important}.align-items-xxl-start{align-items:flex-start!important}.align-items-xxl-end{align-items:flex-end!important}.align-items-xxl-center{align-items:center!important}.align-items-xxl-baseline{align-items:baseline!important}.align-items-xxl-stretch{align-items:stretch!important}.align-content-xxl-start{align-content:flex-start!important}.align-content-xxl-end{align-content:flex-end!important}.align-content-xxl-center{align-content:center!important}.align-content-xxl-between{align-content:space-between!important}.align-content-xxl-around{align-content:space-around!important}.align-content-xxl-stretch{align-content:stretch!important}.align-self-xxl-auto{align-self:auto!important}.align-self-xxl-start{align-self:flex-start!important}.align-self-xxl-end{align-self:flex-end!important}.align-self-xxl-center{align-self:center!important}.align-self-xxl-baseline{align-self:baseline!important}.align-self-xxl-stretch{align-self:stretch!important}.order-xxl-first{order:-1!important}.order-xxl-0{order:0!important}.order-xxl-1{order:1!important}.order-xxl-2{order:2!important}.order-xxl-3{order:3!important}.order-xxl-4{order:4!important}.order-xxl-5{order:5!important}.order-xxl-last{order:6!important}.m-xxl-0{margin:0!important}.m-xxl-1{margin:.25rem!important}.m-xxl-2{margin:.5rem!important}.m-xxl-3{margin:1rem!important}.m-xxl-4{margin:1.5rem!important}.m-xxl-5{margin:3rem!important}.m-xxl-auto{margin:auto!important}.mx-xxl-0{margin-right:0!important;margin-left:0!important}.mx-xxl-1{margin-right:.25rem!important;margin-left:.25rem!important}.mx-xxl-2{margin-right:.5rem!important;margin-left:.5rem!important}.mx-xxl-3{margin-right:1rem!important;margin-left:1rem!important}.mx-xxl-4{margin-right:1.5rem!important;margin-left:1.5rem!important}.mx-xxl-5{margin-right:3rem!important;margin-left:3rem!important}.mx-xxl-auto{margin-right:auto!important;margin-left:auto!important}.my-xxl-0{margin-top:0!important;margin-bottom:0!important}.my-xxl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xxl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xxl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xxl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xxl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xxl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xxl-0{margin-top:0!important}.mt-xxl-1{margin-top:.25rem!important}.mt-xxl-2{margin-top:.5rem!important}.mt-xxl-3{margin-top:1rem!important}.mt-xxl-4{margin-top:1.5rem!important}.mt-xxl-5{margin-top:3rem!important}.mt-xxl-auto{margin-top:auto!important}.me-xxl-0{margin-right:0!important}.me-xxl-1{margin-right:.25rem!important}.me-xxl-2{margin-right:.5rem!important}.me-xxl-3{margin-right:1rem!important}.me-xxl-4{margin-right:1.5rem!important}.me-xxl-5{margin-right:3rem!important}.me-xxl-auto{margin-right:auto!important}.mb-xxl-0{margin-bottom:0!important}.mb-xxl-1{margin-bottom:.25rem!important}.mb-xxl-2{margin-bottom:.5rem!important}.mb-xxl-3{margin-bottom:1rem!important}.mb-xxl-4{margin-bottom:1.5rem!important}.mb-xxl-5{margin-bottom:3rem!important}.mb-xxl-auto{margin-bottom:auto!important}.ms-xxl-0{margin-left:0!important}.ms-xxl-1{margin-left:.25rem!important}.ms-xxl-2{margin-left:.5rem!important}.ms-xxl-3{margin-left:1rem!important}.ms-xxl-4{margin-left:1.5rem!important}.ms-xxl-5{margin-left:3rem!important}.ms-xxl-auto{margin-left:auto!important}.p-xxl-0{padding:0!important}.p-xxl-1{padding:.25rem!important}.p-xxl-2{padding:.5rem!important}.p-xxl-3{padding:1rem!important}.p-xxl-4{padding:1.5rem!important}.p-xxl-5{padding:3rem!important}.px-xxl-0{padding-right:0!important;padding-left:0!important}.px-xxl-1{padding-right:.25rem!important;padding-left:.25rem!important}.px-xxl-2{padding-right:.5rem!important;padding-left:.5rem!important}.px-xxl-3{padding-right:1rem!important;padding-left:1rem!important}.px-xxl-4{padding-right:1.5rem!important;padding-left:1.5rem!important}.px-xxl-5{padding-right:3rem!important;padding-left:3rem!important}.py-xxl-0{padding-top:0!important;padding-bottom:0!important}.py-xxl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xxl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xxl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xxl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xxl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xxl-0{padding-top:0!important}.pt-xxl-1{padding-top:.25rem!important}.pt-xxl-2{padding-top:.5rem!important}.pt-xxl-3{padding-top:1rem!important}.pt-xxl-4{padding-top:1.5rem!important}.pt-xxl-5{padding-top:3rem!important}.pe-xxl-0{padding-right:0!important}.pe-xxl-1{padding-right:.25rem!important}.pe-xxl-2{padding-right:.5rem!important}.pe-xxl-3{padding-right:1rem!important}.pe-xxl-4{padding-right:1.5rem!important}.pe-xxl-5{padding-right:3rem!important}.pb-xxl-0{padding-bottom:0!important}.pb-xxl-1{padding-bottom:.25rem!important}.pb-xxl-2{padding-bottom:.5rem!important}.pb-xxl-3{padding-bottom:1rem!important}.pb-xxl-4{padding-bottom:1.5rem!important}.pb-xxl-5{padding-bottom:3rem!important}.ps-xxl-0{padding-left:0!important}.ps-xxl-1{padding-left:.25rem!important}.ps-xxl-2{padding-left:.5rem!important}.ps-xxl-3{padding-left:1rem!important}.ps-xxl-4{padding-left:1.5rem!important}.ps-xxl-5{padding-left:3rem!important}}@media print{.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-grid{display:grid!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}.d-print-none{display:none!important}} +/*# sourceMappingURL=bootstrap-grid.min.css.map */ \ No newline at end of file diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map new file mode 100644 index 0000000..4f745de --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../scss/bootstrap-grid.scss","../../scss/_containers.scss","dist/css/bootstrap-grid.css","../../scss/mixins/_container.scss","../../scss/mixins/_breakpoints.scss","../../scss/_grid.scss","../../scss/mixins/_grid.scss","../../scss/mixins/_utilities.scss","../../scss/utilities/_api.scss"],"names":[],"mappings":"AAAA;;;;;ACME,WCCF,iBAGA,cACA,cACA,cAHA,cADA,eCLE,MAAA,KACA,cAAA,0BACA,aAAA,0BACA,aAAA,KACA,YAAA,KCwDE,yBH5CE,WAAA,cACE,UAAA,OG2CJ,yBH5CE,WAAA,cAAA,cACE,UAAA,OG2CJ,yBH5CE,WAAA,cAAA,cAAA,cACE,UAAA,OG2CJ,0BH5CE,WAAA,cAAA,cAAA,cAAA,cACE,UAAA,QG2CJ,0BH5CE,WAAA,cAAA,cAAA,cAAA,cAAA,eACE,UAAA,QIfN,KCAA,cAAA,OACA,cAAA,EACA,QAAA,KACA,UAAA,KACA,WAAA,8BACA,aAAA,+BACA,YAAA,+BDHE,OCQF,WAAA,WAIA,YAAA,EACA,MAAA,KACA,UAAA,KACA,cAAA,8BACA,aAAA,8BACA,WAAA,mBA+CI,KACE,KAAA,EAAA,EAAA,GAGF,iBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,cACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,UAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,QAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,QAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,QAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,UAxDV,YAAA,YAwDU,UAxDV,YAAA,aAwDU,UAxDV,YAAA,IAwDU,UAxDV,YAAA,aAwDU,UAxDV,YAAA,aAwDU,UAxDV,YAAA,IAwDU,UAxDV,YAAA,aAwDU,UAxDV,YAAA,aAwDU,UAxDV,YAAA,IAwDU,WAxDV,YAAA,aAwDU,WAxDV,YAAA,aAmEM,KJoGR,MIlGU,cAAA,EAGF,KJoGR,MIlGU,cAAA,EAPF,KJ8GR,MI5GU,cAAA,QAGF,KJ8GR,MI5GU,cAAA,QAPF,KJwHR,MItHU,cAAA,OAGF,KJwHR,MItHU,cAAA,OAPF,KJkIR,MIhIU,cAAA,KAGF,KJkIR,MIhIU,cAAA,KAPF,KJ4IR,MI1IU,cAAA,OAGF,KJ4IR,MI1IU,cAAA,OAPF,KJsJR,MIpJU,cAAA,KAGF,KJsJR,MIpJU,cAAA,KFzDN,yBESE,QACE,KAAA,EAAA,EAAA,GAGF,oBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,aAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,aAxDV,YAAA,EAwDU,aAxDV,YAAA,YAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,aAmEM,QJyTR,SIvTU,cAAA,EAGF,QJyTR,SIvTU,cAAA,EAPF,QJmUR,SIjUU,cAAA,QAGF,QJmUR,SIjUU,cAAA,QAPF,QJ6UR,SI3UU,cAAA,OAGF,QJ6UR,SI3UU,cAAA,OAPF,QJuVR,SIrVU,cAAA,KAGF,QJuVR,SIrVU,cAAA,KAPF,QJiWR,SI/VU,cAAA,OAGF,QJiWR,SI/VU,cAAA,OAPF,QJ2WR,SIzWU,cAAA,KAGF,QJ2WR,SIzWU,cAAA,MFzDN,yBESE,QACE,KAAA,EAAA,EAAA,GAGF,oBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,aAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,aAxDV,YAAA,EAwDU,aAxDV,YAAA,YAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,aAmEM,QJ8gBR,SI5gBU,cAAA,EAGF,QJ8gBR,SI5gBU,cAAA,EAPF,QJwhBR,SIthBU,cAAA,QAGF,QJwhBR,SIthBU,cAAA,QAPF,QJkiBR,SIhiBU,cAAA,OAGF,QJkiBR,SIhiBU,cAAA,OAPF,QJ4iBR,SI1iBU,cAAA,KAGF,QJ4iBR,SI1iBU,cAAA,KAPF,QJsjBR,SIpjBU,cAAA,OAGF,QJsjBR,SIpjBU,cAAA,OAPF,QJgkBR,SI9jBU,cAAA,KAGF,QJgkBR,SI9jBU,cAAA,MFzDN,yBESE,QACE,KAAA,EAAA,EAAA,GAGF,oBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,aAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,aAxDV,YAAA,EAwDU,aAxDV,YAAA,YAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,aAmEM,QJmuBR,SIjuBU,cAAA,EAGF,QJmuBR,SIjuBU,cAAA,EAPF,QJ6uBR,SI3uBU,cAAA,QAGF,QJ6uBR,SI3uBU,cAAA,QAPF,QJuvBR,SIrvBU,cAAA,OAGF,QJuvBR,SIrvBU,cAAA,OAPF,QJiwBR,SI/vBU,cAAA,KAGF,QJiwBR,SI/vBU,cAAA,KAPF,QJ2wBR,SIzwBU,cAAA,OAGF,QJ2wBR,SIzwBU,cAAA,OAPF,QJqxBR,SInxBU,cAAA,KAGF,QJqxBR,SInxBU,cAAA,MFzDN,0BESE,QACE,KAAA,EAAA,EAAA,GAGF,oBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,aAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,aAxDV,YAAA,EAwDU,aAxDV,YAAA,YAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,aAwDU,aAxDV,YAAA,IAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,aAmEM,QJw7BR,SIt7BU,cAAA,EAGF,QJw7BR,SIt7BU,cAAA,EAPF,QJk8BR,SIh8BU,cAAA,QAGF,QJk8BR,SIh8BU,cAAA,QAPF,QJ48BR,SI18BU,cAAA,OAGF,QJ48BR,SI18BU,cAAA,OAPF,QJs9BR,SIp9BU,cAAA,KAGF,QJs9BR,SIp9BU,cAAA,KAPF,QJg+BR,SI99BU,cAAA,OAGF,QJg+BR,SI99BU,cAAA,OAPF,QJ0+BR,SIx+BU,cAAA,KAGF,QJ0+BR,SIx+BU,cAAA,MFzDN,0BESE,SACE,KAAA,EAAA,EAAA,GAGF,qBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,cAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,YAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,YAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,YAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,cAxDV,YAAA,EAwDU,cAxDV,YAAA,YAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,IAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,IAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,aAwDU,cAxDV,YAAA,IAwDU,eAxDV,YAAA,aAwDU,eAxDV,YAAA,aAmEM,SJ6oCR,UI3oCU,cAAA,EAGF,SJ6oCR,UI3oCU,cAAA,EAPF,SJupCR,UIrpCU,cAAA,QAGF,SJupCR,UIrpCU,cAAA,QAPF,SJiqCR,UI/pCU,cAAA,OAGF,SJiqCR,UI/pCU,cAAA,OAPF,SJ2qCR,UIzqCU,cAAA,KAGF,SJ2qCR,UIzqCU,cAAA,KAPF,SJqrCR,UInrCU,cAAA,OAGF,SJqrCR,UInrCU,cAAA,OAPF,SJ+rCR,UI7rCU,cAAA,KAGF,SJ+rCR,UI7rCU,cAAA,MCzDF,UAOI,QAAA,iBAPJ,gBAOI,QAAA,uBAPJ,SAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,SAOI,QAAA,gBAPJ,aAOI,QAAA,oBAPJ,cAOI,QAAA,qBAPJ,QAOI,QAAA,eAPJ,eAOI,QAAA,sBAPJ,QAOI,QAAA,eAPJ,WAOI,KAAA,EAAA,EAAA,eAPJ,UAOI,eAAA,cAPJ,aAOI,eAAA,iBAPJ,kBAOI,eAAA,sBAPJ,qBAOI,eAAA,yBAPJ,aAOI,UAAA,YAPJ,aAOI,UAAA,YAPJ,eAOI,YAAA,YAPJ,eAOI,YAAA,YAPJ,WAOI,UAAA,eAPJ,aAOI,UAAA,iBAPJ,mBAOI,UAAA,uBAPJ,uBAOI,gBAAA,qBAPJ,qBAOI,gBAAA,mBAPJ,wBAOI,gBAAA,iBAPJ,yBAOI,gBAAA,wBAPJ,wBAOI,gBAAA,uBAPJ,wBAOI,gBAAA,uBAPJ,mBAOI,YAAA,qBAPJ,iBAOI,YAAA,mBAPJ,oBAOI,YAAA,iBAPJ,sBAOI,YAAA,mBAPJ,qBAOI,YAAA,kBAPJ,qBAOI,cAAA,qBAPJ,mBAOI,cAAA,mBAPJ,sBAOI,cAAA,iBAPJ,uBAOI,cAAA,wBAPJ,sBAOI,cAAA,uBAPJ,uBAOI,cAAA,kBAPJ,iBAOI,WAAA,eAPJ,kBAOI,WAAA,qBAPJ,gBAOI,WAAA,mBAPJ,mBAOI,WAAA,iBAPJ,qBAOI,WAAA,mBAPJ,oBAOI,WAAA,kBAPJ,aAOI,MAAA,aAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,KAOI,OAAA,YAPJ,KAOI,OAAA,iBAPJ,KAOI,OAAA,gBAPJ,KAOI,OAAA,eAPJ,KAOI,OAAA,iBAPJ,KAOI,OAAA,eAPJ,QAOI,OAAA,eAPJ,MAOI,aAAA,YAAA,YAAA,YAPJ,MAOI,aAAA,iBAAA,YAAA,iBAPJ,MAOI,aAAA,gBAAA,YAAA,gBAPJ,MAOI,aAAA,eAAA,YAAA,eAPJ,MAOI,aAAA,iBAAA,YAAA,iBAPJ,MAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,MAOI,WAAA,YAAA,cAAA,YAPJ,MAOI,WAAA,iBAAA,cAAA,iBAPJ,MAOI,WAAA,gBAAA,cAAA,gBAPJ,MAOI,WAAA,eAAA,cAAA,eAPJ,MAOI,WAAA,iBAAA,cAAA,iBAPJ,MAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,MAOI,WAAA,YAPJ,MAOI,WAAA,iBAPJ,MAOI,WAAA,gBAPJ,MAOI,WAAA,eAPJ,MAOI,WAAA,iBAPJ,MAOI,WAAA,eAPJ,SAOI,WAAA,eAPJ,MAOI,aAAA,YAPJ,MAOI,aAAA,iBAPJ,MAOI,aAAA,gBAPJ,MAOI,aAAA,eAPJ,MAOI,aAAA,iBAPJ,MAOI,aAAA,eAPJ,SAOI,aAAA,eAPJ,MAOI,cAAA,YAPJ,MAOI,cAAA,iBAPJ,MAOI,cAAA,gBAPJ,MAOI,cAAA,eAPJ,MAOI,cAAA,iBAPJ,MAOI,cAAA,eAPJ,SAOI,cAAA,eAPJ,MAOI,YAAA,YAPJ,MAOI,YAAA,iBAPJ,MAOI,YAAA,gBAPJ,MAOI,YAAA,eAPJ,MAOI,YAAA,iBAPJ,MAOI,YAAA,eAPJ,SAOI,YAAA,eAPJ,KAOI,QAAA,YAPJ,KAOI,QAAA,iBAPJ,KAOI,QAAA,gBAPJ,KAOI,QAAA,eAPJ,KAOI,QAAA,iBAPJ,KAOI,QAAA,eAPJ,MAOI,cAAA,YAAA,aAAA,YAPJ,MAOI,cAAA,iBAAA,aAAA,iBAPJ,MAOI,cAAA,gBAAA,aAAA,gBAPJ,MAOI,cAAA,eAAA,aAAA,eAPJ,MAOI,cAAA,iBAAA,aAAA,iBAPJ,MAOI,cAAA,eAAA,aAAA,eAPJ,MAOI,YAAA,YAAA,eAAA,YAPJ,MAOI,YAAA,iBAAA,eAAA,iBAPJ,MAOI,YAAA,gBAAA,eAAA,gBAPJ,MAOI,YAAA,eAAA,eAAA,eAPJ,MAOI,YAAA,iBAAA,eAAA,iBAPJ,MAOI,YAAA,eAAA,eAAA,eAPJ,MAOI,YAAA,YAPJ,MAOI,YAAA,iBAPJ,MAOI,YAAA,gBAPJ,MAOI,YAAA,eAPJ,MAOI,YAAA,iBAPJ,MAOI,YAAA,eAPJ,MAOI,cAAA,YAPJ,MAOI,cAAA,iBAPJ,MAOI,cAAA,gBAPJ,MAOI,cAAA,eAPJ,MAOI,cAAA,iBAPJ,MAOI,cAAA,eAPJ,MAOI,eAAA,YAPJ,MAOI,eAAA,iBAPJ,MAOI,eAAA,gBAPJ,MAOI,eAAA,eAPJ,MAOI,eAAA,iBAPJ,MAOI,eAAA,eAPJ,MAOI,aAAA,YAPJ,MAOI,aAAA,iBAPJ,MAOI,aAAA,gBAPJ,MAOI,aAAA,eAPJ,MAOI,aAAA,iBAPJ,MAOI,aAAA,eHPR,yBGAI,aAOI,QAAA,iBAPJ,mBAOI,QAAA,uBAPJ,YAOI,QAAA,gBAPJ,WAOI,QAAA,eAPJ,YAOI,QAAA,gBAPJ,gBAOI,QAAA,oBAPJ,iBAOI,QAAA,qBAPJ,WAOI,QAAA,eAPJ,kBAOI,QAAA,sBAPJ,WAOI,QAAA,eAPJ,cAOI,KAAA,EAAA,EAAA,eAPJ,aAOI,eAAA,cAPJ,gBAOI,eAAA,iBAPJ,qBAOI,eAAA,sBAPJ,wBAOI,eAAA,yBAPJ,gBAOI,UAAA,YAPJ,gBAOI,UAAA,YAPJ,kBAOI,YAAA,YAPJ,kBAOI,YAAA,YAPJ,cAOI,UAAA,eAPJ,gBAOI,UAAA,iBAPJ,sBAOI,UAAA,uBAPJ,0BAOI,gBAAA,qBAPJ,wBAOI,gBAAA,mBAPJ,2BAOI,gBAAA,iBAPJ,4BAOI,gBAAA,wBAPJ,2BAOI,gBAAA,uBAPJ,2BAOI,gBAAA,uBAPJ,sBAOI,YAAA,qBAPJ,oBAOI,YAAA,mBAPJ,uBAOI,YAAA,iBAPJ,yBAOI,YAAA,mBAPJ,wBAOI,YAAA,kBAPJ,wBAOI,cAAA,qBAPJ,sBAOI,cAAA,mBAPJ,yBAOI,cAAA,iBAPJ,0BAOI,cAAA,wBAPJ,yBAOI,cAAA,uBAPJ,0BAOI,cAAA,kBAPJ,oBAOI,WAAA,eAPJ,qBAOI,WAAA,qBAPJ,mBAOI,WAAA,mBAPJ,sBAOI,WAAA,iBAPJ,wBAOI,WAAA,mBAPJ,uBAOI,WAAA,kBAPJ,gBAOI,MAAA,aAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,eAOI,MAAA,YAPJ,QAOI,OAAA,YAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,gBAPJ,QAOI,OAAA,eAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,eAPJ,WAOI,OAAA,eAPJ,SAOI,aAAA,YAAA,YAAA,YAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,gBAAA,YAAA,gBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,YAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,WAAA,YAAA,cAAA,YAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,gBAAA,cAAA,gBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,YAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,YAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,gBAPJ,SAOI,WAAA,eAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,eAPJ,YAOI,WAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,YAOI,aAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,YAOI,cAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,YAOI,YAAA,eAPJ,QAOI,QAAA,YAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,eAPJ,SAOI,cAAA,YAAA,aAAA,YAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,gBAAA,aAAA,gBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,YAAA,eAAA,YAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,gBAAA,eAAA,gBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,SAOI,eAAA,YAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,gBAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBHPR,yBGAI,aAOI,QAAA,iBAPJ,mBAOI,QAAA,uBAPJ,YAOI,QAAA,gBAPJ,WAOI,QAAA,eAPJ,YAOI,QAAA,gBAPJ,gBAOI,QAAA,oBAPJ,iBAOI,QAAA,qBAPJ,WAOI,QAAA,eAPJ,kBAOI,QAAA,sBAPJ,WAOI,QAAA,eAPJ,cAOI,KAAA,EAAA,EAAA,eAPJ,aAOI,eAAA,cAPJ,gBAOI,eAAA,iBAPJ,qBAOI,eAAA,sBAPJ,wBAOI,eAAA,yBAPJ,gBAOI,UAAA,YAPJ,gBAOI,UAAA,YAPJ,kBAOI,YAAA,YAPJ,kBAOI,YAAA,YAPJ,cAOI,UAAA,eAPJ,gBAOI,UAAA,iBAPJ,sBAOI,UAAA,uBAPJ,0BAOI,gBAAA,qBAPJ,wBAOI,gBAAA,mBAPJ,2BAOI,gBAAA,iBAPJ,4BAOI,gBAAA,wBAPJ,2BAOI,gBAAA,uBAPJ,2BAOI,gBAAA,uBAPJ,sBAOI,YAAA,qBAPJ,oBAOI,YAAA,mBAPJ,uBAOI,YAAA,iBAPJ,yBAOI,YAAA,mBAPJ,wBAOI,YAAA,kBAPJ,wBAOI,cAAA,qBAPJ,sBAOI,cAAA,mBAPJ,yBAOI,cAAA,iBAPJ,0BAOI,cAAA,wBAPJ,yBAOI,cAAA,uBAPJ,0BAOI,cAAA,kBAPJ,oBAOI,WAAA,eAPJ,qBAOI,WAAA,qBAPJ,mBAOI,WAAA,mBAPJ,sBAOI,WAAA,iBAPJ,wBAOI,WAAA,mBAPJ,uBAOI,WAAA,kBAPJ,gBAOI,MAAA,aAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,eAOI,MAAA,YAPJ,QAOI,OAAA,YAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,gBAPJ,QAOI,OAAA,eAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,eAPJ,WAOI,OAAA,eAPJ,SAOI,aAAA,YAAA,YAAA,YAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,gBAAA,YAAA,gBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,YAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,WAAA,YAAA,cAAA,YAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,gBAAA,cAAA,gBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,YAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,YAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,gBAPJ,SAOI,WAAA,eAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,eAPJ,YAOI,WAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,YAOI,aAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,YAOI,cAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,YAOI,YAAA,eAPJ,QAOI,QAAA,YAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,eAPJ,SAOI,cAAA,YAAA,aAAA,YAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,gBAAA,aAAA,gBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,YAAA,eAAA,YAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,gBAAA,eAAA,gBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,SAOI,eAAA,YAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,gBAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBHPR,yBGAI,aAOI,QAAA,iBAPJ,mBAOI,QAAA,uBAPJ,YAOI,QAAA,gBAPJ,WAOI,QAAA,eAPJ,YAOI,QAAA,gBAPJ,gBAOI,QAAA,oBAPJ,iBAOI,QAAA,qBAPJ,WAOI,QAAA,eAPJ,kBAOI,QAAA,sBAPJ,WAOI,QAAA,eAPJ,cAOI,KAAA,EAAA,EAAA,eAPJ,aAOI,eAAA,cAPJ,gBAOI,eAAA,iBAPJ,qBAOI,eAAA,sBAPJ,wBAOI,eAAA,yBAPJ,gBAOI,UAAA,YAPJ,gBAOI,UAAA,YAPJ,kBAOI,YAAA,YAPJ,kBAOI,YAAA,YAPJ,cAOI,UAAA,eAPJ,gBAOI,UAAA,iBAPJ,sBAOI,UAAA,uBAPJ,0BAOI,gBAAA,qBAPJ,wBAOI,gBAAA,mBAPJ,2BAOI,gBAAA,iBAPJ,4BAOI,gBAAA,wBAPJ,2BAOI,gBAAA,uBAPJ,2BAOI,gBAAA,uBAPJ,sBAOI,YAAA,qBAPJ,oBAOI,YAAA,mBAPJ,uBAOI,YAAA,iBAPJ,yBAOI,YAAA,mBAPJ,wBAOI,YAAA,kBAPJ,wBAOI,cAAA,qBAPJ,sBAOI,cAAA,mBAPJ,yBAOI,cAAA,iBAPJ,0BAOI,cAAA,wBAPJ,yBAOI,cAAA,uBAPJ,0BAOI,cAAA,kBAPJ,oBAOI,WAAA,eAPJ,qBAOI,WAAA,qBAPJ,mBAOI,WAAA,mBAPJ,sBAOI,WAAA,iBAPJ,wBAOI,WAAA,mBAPJ,uBAOI,WAAA,kBAPJ,gBAOI,MAAA,aAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,eAOI,MAAA,YAPJ,QAOI,OAAA,YAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,gBAPJ,QAOI,OAAA,eAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,eAPJ,WAOI,OAAA,eAPJ,SAOI,aAAA,YAAA,YAAA,YAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,gBAAA,YAAA,gBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,YAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,WAAA,YAAA,cAAA,YAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,gBAAA,cAAA,gBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,YAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,YAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,gBAPJ,SAOI,WAAA,eAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,eAPJ,YAOI,WAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,YAOI,aAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,YAOI,cAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,YAOI,YAAA,eAPJ,QAOI,QAAA,YAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,eAPJ,SAOI,cAAA,YAAA,aAAA,YAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,gBAAA,aAAA,gBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,YAAA,eAAA,YAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,gBAAA,eAAA,gBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,SAOI,eAAA,YAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,gBAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBHPR,0BGAI,aAOI,QAAA,iBAPJ,mBAOI,QAAA,uBAPJ,YAOI,QAAA,gBAPJ,WAOI,QAAA,eAPJ,YAOI,QAAA,gBAPJ,gBAOI,QAAA,oBAPJ,iBAOI,QAAA,qBAPJ,WAOI,QAAA,eAPJ,kBAOI,QAAA,sBAPJ,WAOI,QAAA,eAPJ,cAOI,KAAA,EAAA,EAAA,eAPJ,aAOI,eAAA,cAPJ,gBAOI,eAAA,iBAPJ,qBAOI,eAAA,sBAPJ,wBAOI,eAAA,yBAPJ,gBAOI,UAAA,YAPJ,gBAOI,UAAA,YAPJ,kBAOI,YAAA,YAPJ,kBAOI,YAAA,YAPJ,cAOI,UAAA,eAPJ,gBAOI,UAAA,iBAPJ,sBAOI,UAAA,uBAPJ,0BAOI,gBAAA,qBAPJ,wBAOI,gBAAA,mBAPJ,2BAOI,gBAAA,iBAPJ,4BAOI,gBAAA,wBAPJ,2BAOI,gBAAA,uBAPJ,2BAOI,gBAAA,uBAPJ,sBAOI,YAAA,qBAPJ,oBAOI,YAAA,mBAPJ,uBAOI,YAAA,iBAPJ,yBAOI,YAAA,mBAPJ,wBAOI,YAAA,kBAPJ,wBAOI,cAAA,qBAPJ,sBAOI,cAAA,mBAPJ,yBAOI,cAAA,iBAPJ,0BAOI,cAAA,wBAPJ,yBAOI,cAAA,uBAPJ,0BAOI,cAAA,kBAPJ,oBAOI,WAAA,eAPJ,qBAOI,WAAA,qBAPJ,mBAOI,WAAA,mBAPJ,sBAOI,WAAA,iBAPJ,wBAOI,WAAA,mBAPJ,uBAOI,WAAA,kBAPJ,gBAOI,MAAA,aAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,eAOI,MAAA,YAPJ,QAOI,OAAA,YAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,gBAPJ,QAOI,OAAA,eAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,eAPJ,WAOI,OAAA,eAPJ,SAOI,aAAA,YAAA,YAAA,YAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,gBAAA,YAAA,gBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,aAAA,iBAAA,YAAA,iBAPJ,SAOI,aAAA,eAAA,YAAA,eAPJ,YAOI,aAAA,eAAA,YAAA,eAPJ,SAOI,WAAA,YAAA,cAAA,YAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,gBAAA,cAAA,gBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,YAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,YAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,gBAPJ,SAOI,WAAA,eAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,eAPJ,YAOI,WAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,YAOI,aAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,YAOI,cAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,YAOI,YAAA,eAPJ,QAOI,QAAA,YAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,eAPJ,SAOI,cAAA,YAAA,aAAA,YAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,gBAAA,aAAA,gBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,cAAA,iBAAA,aAAA,iBAPJ,SAOI,cAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,YAAA,eAAA,YAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,gBAAA,eAAA,gBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,SAOI,eAAA,YAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,gBAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBHPR,0BGAI,cAOI,QAAA,iBAPJ,oBAOI,QAAA,uBAPJ,aAOI,QAAA,gBAPJ,YAOI,QAAA,eAPJ,aAOI,QAAA,gBAPJ,iBAOI,QAAA,oBAPJ,kBAOI,QAAA,qBAPJ,YAOI,QAAA,eAPJ,mBAOI,QAAA,sBAPJ,YAOI,QAAA,eAPJ,eAOI,KAAA,EAAA,EAAA,eAPJ,cAOI,eAAA,cAPJ,iBAOI,eAAA,iBAPJ,sBAOI,eAAA,sBAPJ,yBAOI,eAAA,yBAPJ,iBAOI,UAAA,YAPJ,iBAOI,UAAA,YAPJ,mBAOI,YAAA,YAPJ,mBAOI,YAAA,YAPJ,eAOI,UAAA,eAPJ,iBAOI,UAAA,iBAPJ,uBAOI,UAAA,uBAPJ,2BAOI,gBAAA,qBAPJ,yBAOI,gBAAA,mBAPJ,4BAOI,gBAAA,iBAPJ,6BAOI,gBAAA,wBAPJ,4BAOI,gBAAA,uBAPJ,4BAOI,gBAAA,uBAPJ,uBAOI,YAAA,qBAPJ,qBAOI,YAAA,mBAPJ,wBAOI,YAAA,iBAPJ,0BAOI,YAAA,mBAPJ,yBAOI,YAAA,kBAPJ,yBAOI,cAAA,qBAPJ,uBAOI,cAAA,mBAPJ,0BAOI,cAAA,iBAPJ,2BAOI,cAAA,wBAPJ,0BAOI,cAAA,uBAPJ,2BAOI,cAAA,kBAPJ,qBAOI,WAAA,eAPJ,sBAOI,WAAA,qBAPJ,oBAOI,WAAA,mBAPJ,uBAOI,WAAA,iBAPJ,yBAOI,WAAA,mBAPJ,wBAOI,WAAA,kBAPJ,iBAOI,MAAA,aAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,gBAOI,MAAA,YAPJ,SAOI,OAAA,YAPJ,SAOI,OAAA,iBAPJ,SAOI,OAAA,gBAPJ,SAOI,OAAA,eAPJ,SAOI,OAAA,iBAPJ,SAOI,OAAA,eAPJ,YAOI,OAAA,eAPJ,UAOI,aAAA,YAAA,YAAA,YAPJ,UAOI,aAAA,iBAAA,YAAA,iBAPJ,UAOI,aAAA,gBAAA,YAAA,gBAPJ,UAOI,aAAA,eAAA,YAAA,eAPJ,UAOI,aAAA,iBAAA,YAAA,iBAPJ,UAOI,aAAA,eAAA,YAAA,eAPJ,aAOI,aAAA,eAAA,YAAA,eAPJ,UAOI,WAAA,YAAA,cAAA,YAPJ,UAOI,WAAA,iBAAA,cAAA,iBAPJ,UAOI,WAAA,gBAAA,cAAA,gBAPJ,UAOI,WAAA,eAAA,cAAA,eAPJ,UAOI,WAAA,iBAAA,cAAA,iBAPJ,UAOI,WAAA,eAAA,cAAA,eAPJ,aAOI,WAAA,eAAA,cAAA,eAPJ,UAOI,WAAA,YAPJ,UAOI,WAAA,iBAPJ,UAOI,WAAA,gBAPJ,UAOI,WAAA,eAPJ,UAOI,WAAA,iBAPJ,UAOI,WAAA,eAPJ,aAOI,WAAA,eAPJ,UAOI,aAAA,YAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,gBAPJ,UAOI,aAAA,eAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,eAPJ,aAOI,aAAA,eAPJ,UAOI,cAAA,YAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,gBAPJ,UAOI,cAAA,eAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,eAPJ,aAOI,cAAA,eAPJ,UAOI,YAAA,YAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,gBAPJ,UAOI,YAAA,eAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,eAPJ,aAOI,YAAA,eAPJ,SAOI,QAAA,YAPJ,SAOI,QAAA,iBAPJ,SAOI,QAAA,gBAPJ,SAOI,QAAA,eAPJ,SAOI,QAAA,iBAPJ,SAOI,QAAA,eAPJ,UAOI,cAAA,YAAA,aAAA,YAPJ,UAOI,cAAA,iBAAA,aAAA,iBAPJ,UAOI,cAAA,gBAAA,aAAA,gBAPJ,UAOI,cAAA,eAAA,aAAA,eAPJ,UAOI,cAAA,iBAAA,aAAA,iBAPJ,UAOI,cAAA,eAAA,aAAA,eAPJ,UAOI,YAAA,YAAA,eAAA,YAPJ,UAOI,YAAA,iBAAA,eAAA,iBAPJ,UAOI,YAAA,gBAAA,eAAA,gBAPJ,UAOI,YAAA,eAAA,eAAA,eAPJ,UAOI,YAAA,iBAAA,eAAA,iBAPJ,UAOI,YAAA,eAAA,eAAA,eAPJ,UAOI,YAAA,YAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,gBAPJ,UAOI,YAAA,eAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,eAPJ,UAOI,cAAA,YAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,gBAPJ,UAOI,cAAA,eAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,eAPJ,UAOI,eAAA,YAPJ,UAOI,eAAA,iBAPJ,UAOI,eAAA,gBAPJ,UAOI,eAAA,eAPJ,UAOI,eAAA,iBAPJ,UAOI,eAAA,eAPJ,UAOI,aAAA,YAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,gBAPJ,UAOI,aAAA,eAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,gBChCZ,aDyBQ,gBAOI,QAAA,iBAPJ,sBAOI,QAAA,uBAPJ,eAOI,QAAA,gBAPJ,cAOI,QAAA,eAPJ,eAOI,QAAA,gBAPJ,mBAOI,QAAA,oBAPJ,oBAOI,QAAA,qBAPJ,cAOI,QAAA,eAPJ,qBAOI,QAAA,sBAPJ,cAOI,QAAA","sourcesContent":["/*!\n * Bootstrap Grid v5.1.0 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n\n$include-column-box-sizing: true !default;\n\n@import \"functions\";\n@import \"variables\";\n\n@import \"mixins/lists\";\n@import \"mixins/breakpoints\";\n@import \"mixins/container\";\n@import \"mixins/grid\";\n@import \"mixins/utilities\";\n\n@import \"vendor/rfs\";\n\n@import \"containers\";\n@import \"grid\";\n\n@import \"utilities\";\n// Only use the utilities we need\n// stylelint-disable-next-line scss/dollar-variable-default\n$utilities: map-get-multiple(\n $utilities,\n (\n \"display\",\n \"order\",\n \"flex\",\n \"flex-direction\",\n \"flex-grow\",\n \"flex-shrink\",\n \"flex-wrap\",\n \"justify-content\",\n \"align-items\",\n \"align-content\",\n \"align-self\",\n \"margin\",\n \"margin-x\",\n \"margin-y\",\n \"margin-top\",\n \"margin-end\",\n \"margin-bottom\",\n \"margin-start\",\n \"negative-margin\",\n \"negative-margin-x\",\n \"negative-margin-y\",\n \"negative-margin-top\",\n \"negative-margin-end\",\n \"negative-margin-bottom\",\n \"negative-margin-start\",\n \"padding\",\n \"padding-x\",\n \"padding-y\",\n \"padding-top\",\n \"padding-end\",\n \"padding-bottom\",\n \"padding-start\",\n )\n);\n\n@import \"utilities/api\";\n","// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n@if $enable-grid-classes {\n // Single container class with breakpoint max-widths\n .container,\n // 100% wide container at all breakpoints\n .container-fluid {\n @include make-container();\n }\n\n // Responsive containers that are 100% wide until a breakpoint\n @each $breakpoint, $container-max-width in $container-max-widths {\n .container-#{$breakpoint} {\n @extend .container-fluid;\n }\n\n @include media-breakpoint-up($breakpoint, $grid-breakpoints) {\n %responsive-container-#{$breakpoint} {\n max-width: $container-max-width;\n }\n\n // Extend each breakpoint which is smaller or equal to the current breakpoint\n $extend-breakpoint: true;\n\n @each $name, $width in $grid-breakpoints {\n @if ($extend-breakpoint) {\n .container#{breakpoint-infix($name, $grid-breakpoints)} {\n @extend %responsive-container-#{$breakpoint};\n }\n\n // Once the current breakpoint is reached, stop extending\n @if ($breakpoint == $name) {\n $extend-breakpoint: false;\n }\n }\n }\n }\n }\n}\n","/*!\n * Bootstrap Grid v5.1.0 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n.container,\n.container-fluid,\n.container-xxl,\n.container-xl,\n.container-lg,\n.container-md,\n.container-sm {\n width: 100%;\n padding-right: var(--bs-gutter-x, 0.75rem);\n padding-left: var(--bs-gutter-x, 0.75rem);\n margin-right: auto;\n margin-left: auto;\n}\n\n@media (min-width: 576px) {\n .container-sm, .container {\n max-width: 540px;\n }\n}\n@media (min-width: 768px) {\n .container-md, .container-sm, .container {\n max-width: 720px;\n }\n}\n@media (min-width: 992px) {\n .container-lg, .container-md, .container-sm, .container {\n max-width: 960px;\n }\n}\n@media (min-width: 1200px) {\n .container-xl, .container-lg, .container-md, .container-sm, .container {\n max-width: 1140px;\n }\n}\n@media (min-width: 1400px) {\n .container-xxl, .container-xl, .container-lg, .container-md, .container-sm, .container {\n max-width: 1320px;\n }\n}\n.row {\n --bs-gutter-x: 1.5rem;\n --bs-gutter-y: 0;\n display: flex;\n flex-wrap: wrap;\n margin-top: calc(var(--bs-gutter-y) * -1);\n margin-right: calc(var(--bs-gutter-x) * -.5);\n margin-left: calc(var(--bs-gutter-x) * -.5);\n}\n.row > * {\n box-sizing: border-box;\n flex-shrink: 0;\n width: 100%;\n max-width: 100%;\n padding-right: calc(var(--bs-gutter-x) * .5);\n padding-left: calc(var(--bs-gutter-x) * .5);\n margin-top: var(--bs-gutter-y);\n}\n\n.col {\n flex: 1 0 0%;\n}\n\n.row-cols-auto > * {\n flex: 0 0 auto;\n width: auto;\n}\n\n.row-cols-1 > * {\n flex: 0 0 auto;\n width: 100%;\n}\n\n.row-cols-2 > * {\n flex: 0 0 auto;\n width: 50%;\n}\n\n.row-cols-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n}\n\n.row-cols-4 > * {\n flex: 0 0 auto;\n width: 25%;\n}\n\n.row-cols-5 > * {\n flex: 0 0 auto;\n width: 20%;\n}\n\n.row-cols-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n}\n\n.col-auto {\n flex: 0 0 auto;\n width: auto;\n}\n\n.col-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n}\n\n.col-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n}\n\n.col-3 {\n flex: 0 0 auto;\n width: 25%;\n}\n\n.col-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n}\n\n.col-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n}\n\n.col-6 {\n flex: 0 0 auto;\n width: 50%;\n}\n\n.col-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n}\n\n.col-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n}\n\n.col-9 {\n flex: 0 0 auto;\n width: 75%;\n}\n\n.col-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n}\n\n.col-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n}\n\n.col-12 {\n flex: 0 0 auto;\n width: 100%;\n}\n\n.offset-1 {\n margin-left: 8.33333333%;\n}\n\n.offset-2 {\n margin-left: 16.66666667%;\n}\n\n.offset-3 {\n margin-left: 25%;\n}\n\n.offset-4 {\n margin-left: 33.33333333%;\n}\n\n.offset-5 {\n margin-left: 41.66666667%;\n}\n\n.offset-6 {\n margin-left: 50%;\n}\n\n.offset-7 {\n margin-left: 58.33333333%;\n}\n\n.offset-8 {\n margin-left: 66.66666667%;\n}\n\n.offset-9 {\n margin-left: 75%;\n}\n\n.offset-10 {\n margin-left: 83.33333333%;\n}\n\n.offset-11 {\n margin-left: 91.66666667%;\n}\n\n.g-0,\n.gx-0 {\n --bs-gutter-x: 0;\n}\n\n.g-0,\n.gy-0 {\n --bs-gutter-y: 0;\n}\n\n.g-1,\n.gx-1 {\n --bs-gutter-x: 0.25rem;\n}\n\n.g-1,\n.gy-1 {\n --bs-gutter-y: 0.25rem;\n}\n\n.g-2,\n.gx-2 {\n --bs-gutter-x: 0.5rem;\n}\n\n.g-2,\n.gy-2 {\n --bs-gutter-y: 0.5rem;\n}\n\n.g-3,\n.gx-3 {\n --bs-gutter-x: 1rem;\n}\n\n.g-3,\n.gy-3 {\n --bs-gutter-y: 1rem;\n}\n\n.g-4,\n.gx-4 {\n --bs-gutter-x: 1.5rem;\n}\n\n.g-4,\n.gy-4 {\n --bs-gutter-y: 1.5rem;\n}\n\n.g-5,\n.gx-5 {\n --bs-gutter-x: 3rem;\n}\n\n.g-5,\n.gy-5 {\n --bs-gutter-y: 3rem;\n}\n\n@media (min-width: 576px) {\n .col-sm {\n flex: 1 0 0%;\n }\n\n .row-cols-sm-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-sm-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-sm-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-sm-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-sm-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-sm-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-sm-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-sm-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-sm-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-sm-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-sm-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-sm-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-sm-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-sm-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-sm-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-sm-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-sm-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-sm-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-sm-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-sm-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-sm-0 {\n margin-left: 0;\n }\n\n .offset-sm-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-sm-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-sm-3 {\n margin-left: 25%;\n }\n\n .offset-sm-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-sm-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-sm-6 {\n margin-left: 50%;\n }\n\n .offset-sm-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-sm-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-sm-9 {\n margin-left: 75%;\n }\n\n .offset-sm-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-sm-11 {\n margin-left: 91.66666667%;\n }\n\n .g-sm-0,\n.gx-sm-0 {\n --bs-gutter-x: 0;\n }\n\n .g-sm-0,\n.gy-sm-0 {\n --bs-gutter-y: 0;\n }\n\n .g-sm-1,\n.gx-sm-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-sm-1,\n.gy-sm-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-sm-2,\n.gx-sm-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-sm-2,\n.gy-sm-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-sm-3,\n.gx-sm-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-sm-3,\n.gy-sm-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-sm-4,\n.gx-sm-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-sm-4,\n.gy-sm-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-sm-5,\n.gx-sm-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-sm-5,\n.gy-sm-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 768px) {\n .col-md {\n flex: 1 0 0%;\n }\n\n .row-cols-md-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-md-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-md-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-md-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-md-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-md-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-md-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-md-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-md-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-md-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-md-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-md-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-md-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-md-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-md-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-md-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-md-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-md-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-md-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-md-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-md-0 {\n margin-left: 0;\n }\n\n .offset-md-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-md-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-md-3 {\n margin-left: 25%;\n }\n\n .offset-md-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-md-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-md-6 {\n margin-left: 50%;\n }\n\n .offset-md-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-md-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-md-9 {\n margin-left: 75%;\n }\n\n .offset-md-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-md-11 {\n margin-left: 91.66666667%;\n }\n\n .g-md-0,\n.gx-md-0 {\n --bs-gutter-x: 0;\n }\n\n .g-md-0,\n.gy-md-0 {\n --bs-gutter-y: 0;\n }\n\n .g-md-1,\n.gx-md-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-md-1,\n.gy-md-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-md-2,\n.gx-md-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-md-2,\n.gy-md-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-md-3,\n.gx-md-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-md-3,\n.gy-md-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-md-4,\n.gx-md-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-md-4,\n.gy-md-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-md-5,\n.gx-md-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-md-5,\n.gy-md-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 992px) {\n .col-lg {\n flex: 1 0 0%;\n }\n\n .row-cols-lg-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-lg-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-lg-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-lg-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-lg-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-lg-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-lg-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-lg-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-lg-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-lg-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-lg-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-lg-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-lg-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-lg-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-lg-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-lg-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-lg-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-lg-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-lg-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-lg-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-lg-0 {\n margin-left: 0;\n }\n\n .offset-lg-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-lg-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-lg-3 {\n margin-left: 25%;\n }\n\n .offset-lg-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-lg-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-lg-6 {\n margin-left: 50%;\n }\n\n .offset-lg-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-lg-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-lg-9 {\n margin-left: 75%;\n }\n\n .offset-lg-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-lg-11 {\n margin-left: 91.66666667%;\n }\n\n .g-lg-0,\n.gx-lg-0 {\n --bs-gutter-x: 0;\n }\n\n .g-lg-0,\n.gy-lg-0 {\n --bs-gutter-y: 0;\n }\n\n .g-lg-1,\n.gx-lg-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-lg-1,\n.gy-lg-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-lg-2,\n.gx-lg-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-lg-2,\n.gy-lg-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-lg-3,\n.gx-lg-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-lg-3,\n.gy-lg-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-lg-4,\n.gx-lg-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-lg-4,\n.gy-lg-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-lg-5,\n.gx-lg-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-lg-5,\n.gy-lg-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 1200px) {\n .col-xl {\n flex: 1 0 0%;\n }\n\n .row-cols-xl-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-xl-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-xl-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-xl-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-xl-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-xl-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-xl-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-xl-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-xl-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-xl-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-xl-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-xl-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-xl-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-xl-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-xl-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-xl-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-xl-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-xl-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-xl-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-xl-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-xl-0 {\n margin-left: 0;\n }\n\n .offset-xl-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-xl-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-xl-3 {\n margin-left: 25%;\n }\n\n .offset-xl-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-xl-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-xl-6 {\n margin-left: 50%;\n }\n\n .offset-xl-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-xl-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-xl-9 {\n margin-left: 75%;\n }\n\n .offset-xl-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-xl-11 {\n margin-left: 91.66666667%;\n }\n\n .g-xl-0,\n.gx-xl-0 {\n --bs-gutter-x: 0;\n }\n\n .g-xl-0,\n.gy-xl-0 {\n --bs-gutter-y: 0;\n }\n\n .g-xl-1,\n.gx-xl-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-xl-1,\n.gy-xl-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-xl-2,\n.gx-xl-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-xl-2,\n.gy-xl-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-xl-3,\n.gx-xl-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-xl-3,\n.gy-xl-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-xl-4,\n.gx-xl-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-xl-4,\n.gy-xl-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-xl-5,\n.gx-xl-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-xl-5,\n.gy-xl-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 1400px) {\n .col-xxl {\n flex: 1 0 0%;\n }\n\n .row-cols-xxl-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-xxl-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-xxl-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-xxl-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-xxl-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-xxl-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-xxl-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-xxl-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-xxl-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-xxl-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-xxl-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-xxl-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-xxl-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-xxl-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-xxl-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-xxl-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-xxl-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-xxl-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-xxl-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-xxl-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-xxl-0 {\n margin-left: 0;\n }\n\n .offset-xxl-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-xxl-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-xxl-3 {\n margin-left: 25%;\n }\n\n .offset-xxl-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-xxl-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-xxl-6 {\n margin-left: 50%;\n }\n\n .offset-xxl-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-xxl-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-xxl-9 {\n margin-left: 75%;\n }\n\n .offset-xxl-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-xxl-11 {\n margin-left: 91.66666667%;\n }\n\n .g-xxl-0,\n.gx-xxl-0 {\n --bs-gutter-x: 0;\n }\n\n .g-xxl-0,\n.gy-xxl-0 {\n --bs-gutter-y: 0;\n }\n\n .g-xxl-1,\n.gx-xxl-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-xxl-1,\n.gy-xxl-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-xxl-2,\n.gx-xxl-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-xxl-2,\n.gy-xxl-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-xxl-3,\n.gx-xxl-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-xxl-3,\n.gy-xxl-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-xxl-4,\n.gx-xxl-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-xxl-4,\n.gy-xxl-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-xxl-5,\n.gx-xxl-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-xxl-5,\n.gy-xxl-5 {\n --bs-gutter-y: 3rem;\n }\n}\n.d-inline {\n display: inline !important;\n}\n\n.d-inline-block {\n display: inline-block !important;\n}\n\n.d-block {\n display: block !important;\n}\n\n.d-grid {\n display: grid !important;\n}\n\n.d-table {\n display: table !important;\n}\n\n.d-table-row {\n display: table-row !important;\n}\n\n.d-table-cell {\n display: table-cell !important;\n}\n\n.d-flex {\n display: flex !important;\n}\n\n.d-inline-flex {\n display: inline-flex !important;\n}\n\n.d-none {\n display: none !important;\n}\n\n.flex-fill {\n flex: 1 1 auto !important;\n}\n\n.flex-row {\n flex-direction: row !important;\n}\n\n.flex-column {\n flex-direction: column !important;\n}\n\n.flex-row-reverse {\n flex-direction: row-reverse !important;\n}\n\n.flex-column-reverse {\n flex-direction: column-reverse !important;\n}\n\n.flex-grow-0 {\n flex-grow: 0 !important;\n}\n\n.flex-grow-1 {\n flex-grow: 1 !important;\n}\n\n.flex-shrink-0 {\n flex-shrink: 0 !important;\n}\n\n.flex-shrink-1 {\n flex-shrink: 1 !important;\n}\n\n.flex-wrap {\n flex-wrap: wrap !important;\n}\n\n.flex-nowrap {\n flex-wrap: nowrap !important;\n}\n\n.flex-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n}\n\n.justify-content-start {\n justify-content: flex-start !important;\n}\n\n.justify-content-end {\n justify-content: flex-end !important;\n}\n\n.justify-content-center {\n justify-content: center !important;\n}\n\n.justify-content-between {\n justify-content: space-between !important;\n}\n\n.justify-content-around {\n justify-content: space-around !important;\n}\n\n.justify-content-evenly {\n justify-content: space-evenly !important;\n}\n\n.align-items-start {\n align-items: flex-start !important;\n}\n\n.align-items-end {\n align-items: flex-end !important;\n}\n\n.align-items-center {\n align-items: center !important;\n}\n\n.align-items-baseline {\n align-items: baseline !important;\n}\n\n.align-items-stretch {\n align-items: stretch !important;\n}\n\n.align-content-start {\n align-content: flex-start !important;\n}\n\n.align-content-end {\n align-content: flex-end !important;\n}\n\n.align-content-center {\n align-content: center !important;\n}\n\n.align-content-between {\n align-content: space-between !important;\n}\n\n.align-content-around {\n align-content: space-around !important;\n}\n\n.align-content-stretch {\n align-content: stretch !important;\n}\n\n.align-self-auto {\n align-self: auto !important;\n}\n\n.align-self-start {\n align-self: flex-start !important;\n}\n\n.align-self-end {\n align-self: flex-end !important;\n}\n\n.align-self-center {\n align-self: center !important;\n}\n\n.align-self-baseline {\n align-self: baseline !important;\n}\n\n.align-self-stretch {\n align-self: stretch !important;\n}\n\n.order-first {\n order: -1 !important;\n}\n\n.order-0 {\n order: 0 !important;\n}\n\n.order-1 {\n order: 1 !important;\n}\n\n.order-2 {\n order: 2 !important;\n}\n\n.order-3 {\n order: 3 !important;\n}\n\n.order-4 {\n order: 4 !important;\n}\n\n.order-5 {\n order: 5 !important;\n}\n\n.order-last {\n order: 6 !important;\n}\n\n.m-0 {\n margin: 0 !important;\n}\n\n.m-1 {\n margin: 0.25rem !important;\n}\n\n.m-2 {\n margin: 0.5rem !important;\n}\n\n.m-3 {\n margin: 1rem !important;\n}\n\n.m-4 {\n margin: 1.5rem !important;\n}\n\n.m-5 {\n margin: 3rem !important;\n}\n\n.m-auto {\n margin: auto !important;\n}\n\n.mx-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n}\n\n.mx-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n}\n\n.mx-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n}\n\n.mx-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n}\n\n.mx-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n}\n\n.mx-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n}\n\n.mx-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n}\n\n.my-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n}\n\n.my-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n}\n\n.my-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n}\n\n.my-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n}\n\n.my-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n}\n\n.my-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n}\n\n.my-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n}\n\n.mt-0 {\n margin-top: 0 !important;\n}\n\n.mt-1 {\n margin-top: 0.25rem !important;\n}\n\n.mt-2 {\n margin-top: 0.5rem !important;\n}\n\n.mt-3 {\n margin-top: 1rem !important;\n}\n\n.mt-4 {\n margin-top: 1.5rem !important;\n}\n\n.mt-5 {\n margin-top: 3rem !important;\n}\n\n.mt-auto {\n margin-top: auto !important;\n}\n\n.me-0 {\n margin-right: 0 !important;\n}\n\n.me-1 {\n margin-right: 0.25rem !important;\n}\n\n.me-2 {\n margin-right: 0.5rem !important;\n}\n\n.me-3 {\n margin-right: 1rem !important;\n}\n\n.me-4 {\n margin-right: 1.5rem !important;\n}\n\n.me-5 {\n margin-right: 3rem !important;\n}\n\n.me-auto {\n margin-right: auto !important;\n}\n\n.mb-0 {\n margin-bottom: 0 !important;\n}\n\n.mb-1 {\n margin-bottom: 0.25rem !important;\n}\n\n.mb-2 {\n margin-bottom: 0.5rem !important;\n}\n\n.mb-3 {\n margin-bottom: 1rem !important;\n}\n\n.mb-4 {\n margin-bottom: 1.5rem !important;\n}\n\n.mb-5 {\n margin-bottom: 3rem !important;\n}\n\n.mb-auto {\n margin-bottom: auto !important;\n}\n\n.ms-0 {\n margin-left: 0 !important;\n}\n\n.ms-1 {\n margin-left: 0.25rem !important;\n}\n\n.ms-2 {\n margin-left: 0.5rem !important;\n}\n\n.ms-3 {\n margin-left: 1rem !important;\n}\n\n.ms-4 {\n margin-left: 1.5rem !important;\n}\n\n.ms-5 {\n margin-left: 3rem !important;\n}\n\n.ms-auto {\n margin-left: auto !important;\n}\n\n.p-0 {\n padding: 0 !important;\n}\n\n.p-1 {\n padding: 0.25rem !important;\n}\n\n.p-2 {\n padding: 0.5rem !important;\n}\n\n.p-3 {\n padding: 1rem !important;\n}\n\n.p-4 {\n padding: 1.5rem !important;\n}\n\n.p-5 {\n padding: 3rem !important;\n}\n\n.px-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n}\n\n.px-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n}\n\n.px-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n}\n\n.px-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n}\n\n.px-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n}\n\n.px-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n}\n\n.py-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n}\n\n.py-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n}\n\n.py-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n}\n\n.py-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n}\n\n.py-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n}\n\n.py-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n}\n\n.pt-0 {\n padding-top: 0 !important;\n}\n\n.pt-1 {\n padding-top: 0.25rem !important;\n}\n\n.pt-2 {\n padding-top: 0.5rem !important;\n}\n\n.pt-3 {\n padding-top: 1rem !important;\n}\n\n.pt-4 {\n padding-top: 1.5rem !important;\n}\n\n.pt-5 {\n padding-top: 3rem !important;\n}\n\n.pe-0 {\n padding-right: 0 !important;\n}\n\n.pe-1 {\n padding-right: 0.25rem !important;\n}\n\n.pe-2 {\n padding-right: 0.5rem !important;\n}\n\n.pe-3 {\n padding-right: 1rem !important;\n}\n\n.pe-4 {\n padding-right: 1.5rem !important;\n}\n\n.pe-5 {\n padding-right: 3rem !important;\n}\n\n.pb-0 {\n padding-bottom: 0 !important;\n}\n\n.pb-1 {\n padding-bottom: 0.25rem !important;\n}\n\n.pb-2 {\n padding-bottom: 0.5rem !important;\n}\n\n.pb-3 {\n padding-bottom: 1rem !important;\n}\n\n.pb-4 {\n padding-bottom: 1.5rem !important;\n}\n\n.pb-5 {\n padding-bottom: 3rem !important;\n}\n\n.ps-0 {\n padding-left: 0 !important;\n}\n\n.ps-1 {\n padding-left: 0.25rem !important;\n}\n\n.ps-2 {\n padding-left: 0.5rem !important;\n}\n\n.ps-3 {\n padding-left: 1rem !important;\n}\n\n.ps-4 {\n padding-left: 1.5rem !important;\n}\n\n.ps-5 {\n padding-left: 3rem !important;\n}\n\n@media (min-width: 576px) {\n .d-sm-inline {\n display: inline !important;\n }\n\n .d-sm-inline-block {\n display: inline-block !important;\n }\n\n .d-sm-block {\n display: block !important;\n }\n\n .d-sm-grid {\n display: grid !important;\n }\n\n .d-sm-table {\n display: table !important;\n }\n\n .d-sm-table-row {\n display: table-row !important;\n }\n\n .d-sm-table-cell {\n display: table-cell !important;\n }\n\n .d-sm-flex {\n display: flex !important;\n }\n\n .d-sm-inline-flex {\n display: inline-flex !important;\n }\n\n .d-sm-none {\n display: none !important;\n }\n\n .flex-sm-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-sm-row {\n flex-direction: row !important;\n }\n\n .flex-sm-column {\n flex-direction: column !important;\n }\n\n .flex-sm-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-sm-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-sm-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-sm-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-sm-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-sm-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-sm-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-sm-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-sm-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-sm-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-sm-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-sm-center {\n justify-content: center !important;\n }\n\n .justify-content-sm-between {\n justify-content: space-between !important;\n }\n\n .justify-content-sm-around {\n justify-content: space-around !important;\n }\n\n .justify-content-sm-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-sm-start {\n align-items: flex-start !important;\n }\n\n .align-items-sm-end {\n align-items: flex-end !important;\n }\n\n .align-items-sm-center {\n align-items: center !important;\n }\n\n .align-items-sm-baseline {\n align-items: baseline !important;\n }\n\n .align-items-sm-stretch {\n align-items: stretch !important;\n }\n\n .align-content-sm-start {\n align-content: flex-start !important;\n }\n\n .align-content-sm-end {\n align-content: flex-end !important;\n }\n\n .align-content-sm-center {\n align-content: center !important;\n }\n\n .align-content-sm-between {\n align-content: space-between !important;\n }\n\n .align-content-sm-around {\n align-content: space-around !important;\n }\n\n .align-content-sm-stretch {\n align-content: stretch !important;\n }\n\n .align-self-sm-auto {\n align-self: auto !important;\n }\n\n .align-self-sm-start {\n align-self: flex-start !important;\n }\n\n .align-self-sm-end {\n align-self: flex-end !important;\n }\n\n .align-self-sm-center {\n align-self: center !important;\n }\n\n .align-self-sm-baseline {\n align-self: baseline !important;\n }\n\n .align-self-sm-stretch {\n align-self: stretch !important;\n }\n\n .order-sm-first {\n order: -1 !important;\n }\n\n .order-sm-0 {\n order: 0 !important;\n }\n\n .order-sm-1 {\n order: 1 !important;\n }\n\n .order-sm-2 {\n order: 2 !important;\n }\n\n .order-sm-3 {\n order: 3 !important;\n }\n\n .order-sm-4 {\n order: 4 !important;\n }\n\n .order-sm-5 {\n order: 5 !important;\n }\n\n .order-sm-last {\n order: 6 !important;\n }\n\n .m-sm-0 {\n margin: 0 !important;\n }\n\n .m-sm-1 {\n margin: 0.25rem !important;\n }\n\n .m-sm-2 {\n margin: 0.5rem !important;\n }\n\n .m-sm-3 {\n margin: 1rem !important;\n }\n\n .m-sm-4 {\n margin: 1.5rem !important;\n }\n\n .m-sm-5 {\n margin: 3rem !important;\n }\n\n .m-sm-auto {\n margin: auto !important;\n }\n\n .mx-sm-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-sm-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-sm-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-sm-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-sm-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-sm-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-sm-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-sm-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-sm-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-sm-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-sm-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-sm-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-sm-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-sm-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-sm-0 {\n margin-top: 0 !important;\n }\n\n .mt-sm-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-sm-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-sm-3 {\n margin-top: 1rem !important;\n }\n\n .mt-sm-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-sm-5 {\n margin-top: 3rem !important;\n }\n\n .mt-sm-auto {\n margin-top: auto !important;\n }\n\n .me-sm-0 {\n margin-right: 0 !important;\n }\n\n .me-sm-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-sm-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-sm-3 {\n margin-right: 1rem !important;\n }\n\n .me-sm-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-sm-5 {\n margin-right: 3rem !important;\n }\n\n .me-sm-auto {\n margin-right: auto !important;\n }\n\n .mb-sm-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-sm-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-sm-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-sm-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-sm-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-sm-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-sm-auto {\n margin-bottom: auto !important;\n }\n\n .ms-sm-0 {\n margin-left: 0 !important;\n }\n\n .ms-sm-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-sm-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-sm-3 {\n margin-left: 1rem !important;\n }\n\n .ms-sm-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-sm-5 {\n margin-left: 3rem !important;\n }\n\n .ms-sm-auto {\n margin-left: auto !important;\n }\n\n .p-sm-0 {\n padding: 0 !important;\n }\n\n .p-sm-1 {\n padding: 0.25rem !important;\n }\n\n .p-sm-2 {\n padding: 0.5rem !important;\n }\n\n .p-sm-3 {\n padding: 1rem !important;\n }\n\n .p-sm-4 {\n padding: 1.5rem !important;\n }\n\n .p-sm-5 {\n padding: 3rem !important;\n }\n\n .px-sm-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-sm-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-sm-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-sm-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-sm-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-sm-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-sm-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-sm-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-sm-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-sm-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-sm-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-sm-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-sm-0 {\n padding-top: 0 !important;\n }\n\n .pt-sm-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-sm-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-sm-3 {\n padding-top: 1rem !important;\n }\n\n .pt-sm-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-sm-5 {\n padding-top: 3rem !important;\n }\n\n .pe-sm-0 {\n padding-right: 0 !important;\n }\n\n .pe-sm-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-sm-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-sm-3 {\n padding-right: 1rem !important;\n }\n\n .pe-sm-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-sm-5 {\n padding-right: 3rem !important;\n }\n\n .pb-sm-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-sm-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-sm-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-sm-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-sm-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-sm-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-sm-0 {\n padding-left: 0 !important;\n }\n\n .ps-sm-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-sm-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-sm-3 {\n padding-left: 1rem !important;\n }\n\n .ps-sm-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-sm-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 768px) {\n .d-md-inline {\n display: inline !important;\n }\n\n .d-md-inline-block {\n display: inline-block !important;\n }\n\n .d-md-block {\n display: block !important;\n }\n\n .d-md-grid {\n display: grid !important;\n }\n\n .d-md-table {\n display: table !important;\n }\n\n .d-md-table-row {\n display: table-row !important;\n }\n\n .d-md-table-cell {\n display: table-cell !important;\n }\n\n .d-md-flex {\n display: flex !important;\n }\n\n .d-md-inline-flex {\n display: inline-flex !important;\n }\n\n .d-md-none {\n display: none !important;\n }\n\n .flex-md-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-md-row {\n flex-direction: row !important;\n }\n\n .flex-md-column {\n flex-direction: column !important;\n }\n\n .flex-md-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-md-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-md-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-md-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-md-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-md-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-md-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-md-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-md-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-md-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-md-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-md-center {\n justify-content: center !important;\n }\n\n .justify-content-md-between {\n justify-content: space-between !important;\n }\n\n .justify-content-md-around {\n justify-content: space-around !important;\n }\n\n .justify-content-md-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-md-start {\n align-items: flex-start !important;\n }\n\n .align-items-md-end {\n align-items: flex-end !important;\n }\n\n .align-items-md-center {\n align-items: center !important;\n }\n\n .align-items-md-baseline {\n align-items: baseline !important;\n }\n\n .align-items-md-stretch {\n align-items: stretch !important;\n }\n\n .align-content-md-start {\n align-content: flex-start !important;\n }\n\n .align-content-md-end {\n align-content: flex-end !important;\n }\n\n .align-content-md-center {\n align-content: center !important;\n }\n\n .align-content-md-between {\n align-content: space-between !important;\n }\n\n .align-content-md-around {\n align-content: space-around !important;\n }\n\n .align-content-md-stretch {\n align-content: stretch !important;\n }\n\n .align-self-md-auto {\n align-self: auto !important;\n }\n\n .align-self-md-start {\n align-self: flex-start !important;\n }\n\n .align-self-md-end {\n align-self: flex-end !important;\n }\n\n .align-self-md-center {\n align-self: center !important;\n }\n\n .align-self-md-baseline {\n align-self: baseline !important;\n }\n\n .align-self-md-stretch {\n align-self: stretch !important;\n }\n\n .order-md-first {\n order: -1 !important;\n }\n\n .order-md-0 {\n order: 0 !important;\n }\n\n .order-md-1 {\n order: 1 !important;\n }\n\n .order-md-2 {\n order: 2 !important;\n }\n\n .order-md-3 {\n order: 3 !important;\n }\n\n .order-md-4 {\n order: 4 !important;\n }\n\n .order-md-5 {\n order: 5 !important;\n }\n\n .order-md-last {\n order: 6 !important;\n }\n\n .m-md-0 {\n margin: 0 !important;\n }\n\n .m-md-1 {\n margin: 0.25rem !important;\n }\n\n .m-md-2 {\n margin: 0.5rem !important;\n }\n\n .m-md-3 {\n margin: 1rem !important;\n }\n\n .m-md-4 {\n margin: 1.5rem !important;\n }\n\n .m-md-5 {\n margin: 3rem !important;\n }\n\n .m-md-auto {\n margin: auto !important;\n }\n\n .mx-md-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-md-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-md-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-md-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-md-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-md-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-md-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-md-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-md-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-md-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-md-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-md-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-md-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-md-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-md-0 {\n margin-top: 0 !important;\n }\n\n .mt-md-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-md-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-md-3 {\n margin-top: 1rem !important;\n }\n\n .mt-md-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-md-5 {\n margin-top: 3rem !important;\n }\n\n .mt-md-auto {\n margin-top: auto !important;\n }\n\n .me-md-0 {\n margin-right: 0 !important;\n }\n\n .me-md-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-md-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-md-3 {\n margin-right: 1rem !important;\n }\n\n .me-md-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-md-5 {\n margin-right: 3rem !important;\n }\n\n .me-md-auto {\n margin-right: auto !important;\n }\n\n .mb-md-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-md-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-md-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-md-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-md-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-md-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-md-auto {\n margin-bottom: auto !important;\n }\n\n .ms-md-0 {\n margin-left: 0 !important;\n }\n\n .ms-md-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-md-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-md-3 {\n margin-left: 1rem !important;\n }\n\n .ms-md-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-md-5 {\n margin-left: 3rem !important;\n }\n\n .ms-md-auto {\n margin-left: auto !important;\n }\n\n .p-md-0 {\n padding: 0 !important;\n }\n\n .p-md-1 {\n padding: 0.25rem !important;\n }\n\n .p-md-2 {\n padding: 0.5rem !important;\n }\n\n .p-md-3 {\n padding: 1rem !important;\n }\n\n .p-md-4 {\n padding: 1.5rem !important;\n }\n\n .p-md-5 {\n padding: 3rem !important;\n }\n\n .px-md-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-md-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-md-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-md-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-md-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-md-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-md-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-md-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-md-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-md-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-md-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-md-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-md-0 {\n padding-top: 0 !important;\n }\n\n .pt-md-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-md-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-md-3 {\n padding-top: 1rem !important;\n }\n\n .pt-md-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-md-5 {\n padding-top: 3rem !important;\n }\n\n .pe-md-0 {\n padding-right: 0 !important;\n }\n\n .pe-md-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-md-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-md-3 {\n padding-right: 1rem !important;\n }\n\n .pe-md-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-md-5 {\n padding-right: 3rem !important;\n }\n\n .pb-md-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-md-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-md-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-md-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-md-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-md-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-md-0 {\n padding-left: 0 !important;\n }\n\n .ps-md-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-md-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-md-3 {\n padding-left: 1rem !important;\n }\n\n .ps-md-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-md-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 992px) {\n .d-lg-inline {\n display: inline !important;\n }\n\n .d-lg-inline-block {\n display: inline-block !important;\n }\n\n .d-lg-block {\n display: block !important;\n }\n\n .d-lg-grid {\n display: grid !important;\n }\n\n .d-lg-table {\n display: table !important;\n }\n\n .d-lg-table-row {\n display: table-row !important;\n }\n\n .d-lg-table-cell {\n display: table-cell !important;\n }\n\n .d-lg-flex {\n display: flex !important;\n }\n\n .d-lg-inline-flex {\n display: inline-flex !important;\n }\n\n .d-lg-none {\n display: none !important;\n }\n\n .flex-lg-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-lg-row {\n flex-direction: row !important;\n }\n\n .flex-lg-column {\n flex-direction: column !important;\n }\n\n .flex-lg-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-lg-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-lg-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-lg-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-lg-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-lg-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-lg-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-lg-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-lg-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-lg-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-lg-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-lg-center {\n justify-content: center !important;\n }\n\n .justify-content-lg-between {\n justify-content: space-between !important;\n }\n\n .justify-content-lg-around {\n justify-content: space-around !important;\n }\n\n .justify-content-lg-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-lg-start {\n align-items: flex-start !important;\n }\n\n .align-items-lg-end {\n align-items: flex-end !important;\n }\n\n .align-items-lg-center {\n align-items: center !important;\n }\n\n .align-items-lg-baseline {\n align-items: baseline !important;\n }\n\n .align-items-lg-stretch {\n align-items: stretch !important;\n }\n\n .align-content-lg-start {\n align-content: flex-start !important;\n }\n\n .align-content-lg-end {\n align-content: flex-end !important;\n }\n\n .align-content-lg-center {\n align-content: center !important;\n }\n\n .align-content-lg-between {\n align-content: space-between !important;\n }\n\n .align-content-lg-around {\n align-content: space-around !important;\n }\n\n .align-content-lg-stretch {\n align-content: stretch !important;\n }\n\n .align-self-lg-auto {\n align-self: auto !important;\n }\n\n .align-self-lg-start {\n align-self: flex-start !important;\n }\n\n .align-self-lg-end {\n align-self: flex-end !important;\n }\n\n .align-self-lg-center {\n align-self: center !important;\n }\n\n .align-self-lg-baseline {\n align-self: baseline !important;\n }\n\n .align-self-lg-stretch {\n align-self: stretch !important;\n }\n\n .order-lg-first {\n order: -1 !important;\n }\n\n .order-lg-0 {\n order: 0 !important;\n }\n\n .order-lg-1 {\n order: 1 !important;\n }\n\n .order-lg-2 {\n order: 2 !important;\n }\n\n .order-lg-3 {\n order: 3 !important;\n }\n\n .order-lg-4 {\n order: 4 !important;\n }\n\n .order-lg-5 {\n order: 5 !important;\n }\n\n .order-lg-last {\n order: 6 !important;\n }\n\n .m-lg-0 {\n margin: 0 !important;\n }\n\n .m-lg-1 {\n margin: 0.25rem !important;\n }\n\n .m-lg-2 {\n margin: 0.5rem !important;\n }\n\n .m-lg-3 {\n margin: 1rem !important;\n }\n\n .m-lg-4 {\n margin: 1.5rem !important;\n }\n\n .m-lg-5 {\n margin: 3rem !important;\n }\n\n .m-lg-auto {\n margin: auto !important;\n }\n\n .mx-lg-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-lg-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-lg-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-lg-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-lg-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-lg-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-lg-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-lg-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-lg-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-lg-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-lg-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-lg-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-lg-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-lg-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-lg-0 {\n margin-top: 0 !important;\n }\n\n .mt-lg-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-lg-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-lg-3 {\n margin-top: 1rem !important;\n }\n\n .mt-lg-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-lg-5 {\n margin-top: 3rem !important;\n }\n\n .mt-lg-auto {\n margin-top: auto !important;\n }\n\n .me-lg-0 {\n margin-right: 0 !important;\n }\n\n .me-lg-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-lg-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-lg-3 {\n margin-right: 1rem !important;\n }\n\n .me-lg-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-lg-5 {\n margin-right: 3rem !important;\n }\n\n .me-lg-auto {\n margin-right: auto !important;\n }\n\n .mb-lg-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-lg-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-lg-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-lg-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-lg-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-lg-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-lg-auto {\n margin-bottom: auto !important;\n }\n\n .ms-lg-0 {\n margin-left: 0 !important;\n }\n\n .ms-lg-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-lg-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-lg-3 {\n margin-left: 1rem !important;\n }\n\n .ms-lg-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-lg-5 {\n margin-left: 3rem !important;\n }\n\n .ms-lg-auto {\n margin-left: auto !important;\n }\n\n .p-lg-0 {\n padding: 0 !important;\n }\n\n .p-lg-1 {\n padding: 0.25rem !important;\n }\n\n .p-lg-2 {\n padding: 0.5rem !important;\n }\n\n .p-lg-3 {\n padding: 1rem !important;\n }\n\n .p-lg-4 {\n padding: 1.5rem !important;\n }\n\n .p-lg-5 {\n padding: 3rem !important;\n }\n\n .px-lg-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-lg-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-lg-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-lg-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-lg-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-lg-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-lg-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-lg-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-lg-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-lg-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-lg-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-lg-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-lg-0 {\n padding-top: 0 !important;\n }\n\n .pt-lg-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-lg-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-lg-3 {\n padding-top: 1rem !important;\n }\n\n .pt-lg-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-lg-5 {\n padding-top: 3rem !important;\n }\n\n .pe-lg-0 {\n padding-right: 0 !important;\n }\n\n .pe-lg-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-lg-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-lg-3 {\n padding-right: 1rem !important;\n }\n\n .pe-lg-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-lg-5 {\n padding-right: 3rem !important;\n }\n\n .pb-lg-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-lg-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-lg-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-lg-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-lg-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-lg-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-lg-0 {\n padding-left: 0 !important;\n }\n\n .ps-lg-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-lg-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-lg-3 {\n padding-left: 1rem !important;\n }\n\n .ps-lg-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-lg-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 1200px) {\n .d-xl-inline {\n display: inline !important;\n }\n\n .d-xl-inline-block {\n display: inline-block !important;\n }\n\n .d-xl-block {\n display: block !important;\n }\n\n .d-xl-grid {\n display: grid !important;\n }\n\n .d-xl-table {\n display: table !important;\n }\n\n .d-xl-table-row {\n display: table-row !important;\n }\n\n .d-xl-table-cell {\n display: table-cell !important;\n }\n\n .d-xl-flex {\n display: flex !important;\n }\n\n .d-xl-inline-flex {\n display: inline-flex !important;\n }\n\n .d-xl-none {\n display: none !important;\n }\n\n .flex-xl-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-xl-row {\n flex-direction: row !important;\n }\n\n .flex-xl-column {\n flex-direction: column !important;\n }\n\n .flex-xl-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-xl-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-xl-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-xl-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-xl-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-xl-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-xl-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-xl-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-xl-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-xl-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-xl-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-xl-center {\n justify-content: center !important;\n }\n\n .justify-content-xl-between {\n justify-content: space-between !important;\n }\n\n .justify-content-xl-around {\n justify-content: space-around !important;\n }\n\n .justify-content-xl-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-xl-start {\n align-items: flex-start !important;\n }\n\n .align-items-xl-end {\n align-items: flex-end !important;\n }\n\n .align-items-xl-center {\n align-items: center !important;\n }\n\n .align-items-xl-baseline {\n align-items: baseline !important;\n }\n\n .align-items-xl-stretch {\n align-items: stretch !important;\n }\n\n .align-content-xl-start {\n align-content: flex-start !important;\n }\n\n .align-content-xl-end {\n align-content: flex-end !important;\n }\n\n .align-content-xl-center {\n align-content: center !important;\n }\n\n .align-content-xl-between {\n align-content: space-between !important;\n }\n\n .align-content-xl-around {\n align-content: space-around !important;\n }\n\n .align-content-xl-stretch {\n align-content: stretch !important;\n }\n\n .align-self-xl-auto {\n align-self: auto !important;\n }\n\n .align-self-xl-start {\n align-self: flex-start !important;\n }\n\n .align-self-xl-end {\n align-self: flex-end !important;\n }\n\n .align-self-xl-center {\n align-self: center !important;\n }\n\n .align-self-xl-baseline {\n align-self: baseline !important;\n }\n\n .align-self-xl-stretch {\n align-self: stretch !important;\n }\n\n .order-xl-first {\n order: -1 !important;\n }\n\n .order-xl-0 {\n order: 0 !important;\n }\n\n .order-xl-1 {\n order: 1 !important;\n }\n\n .order-xl-2 {\n order: 2 !important;\n }\n\n .order-xl-3 {\n order: 3 !important;\n }\n\n .order-xl-4 {\n order: 4 !important;\n }\n\n .order-xl-5 {\n order: 5 !important;\n }\n\n .order-xl-last {\n order: 6 !important;\n }\n\n .m-xl-0 {\n margin: 0 !important;\n }\n\n .m-xl-1 {\n margin: 0.25rem !important;\n }\n\n .m-xl-2 {\n margin: 0.5rem !important;\n }\n\n .m-xl-3 {\n margin: 1rem !important;\n }\n\n .m-xl-4 {\n margin: 1.5rem !important;\n }\n\n .m-xl-5 {\n margin: 3rem !important;\n }\n\n .m-xl-auto {\n margin: auto !important;\n }\n\n .mx-xl-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-xl-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-xl-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-xl-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-xl-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-xl-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-xl-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-xl-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-xl-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-xl-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-xl-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-xl-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-xl-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-xl-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-xl-0 {\n margin-top: 0 !important;\n }\n\n .mt-xl-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-xl-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-xl-3 {\n margin-top: 1rem !important;\n }\n\n .mt-xl-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-xl-5 {\n margin-top: 3rem !important;\n }\n\n .mt-xl-auto {\n margin-top: auto !important;\n }\n\n .me-xl-0 {\n margin-right: 0 !important;\n }\n\n .me-xl-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-xl-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-xl-3 {\n margin-right: 1rem !important;\n }\n\n .me-xl-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-xl-5 {\n margin-right: 3rem !important;\n }\n\n .me-xl-auto {\n margin-right: auto !important;\n }\n\n .mb-xl-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-xl-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-xl-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-xl-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-xl-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-xl-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-xl-auto {\n margin-bottom: auto !important;\n }\n\n .ms-xl-0 {\n margin-left: 0 !important;\n }\n\n .ms-xl-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-xl-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-xl-3 {\n margin-left: 1rem !important;\n }\n\n .ms-xl-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-xl-5 {\n margin-left: 3rem !important;\n }\n\n .ms-xl-auto {\n margin-left: auto !important;\n }\n\n .p-xl-0 {\n padding: 0 !important;\n }\n\n .p-xl-1 {\n padding: 0.25rem !important;\n }\n\n .p-xl-2 {\n padding: 0.5rem !important;\n }\n\n .p-xl-3 {\n padding: 1rem !important;\n }\n\n .p-xl-4 {\n padding: 1.5rem !important;\n }\n\n .p-xl-5 {\n padding: 3rem !important;\n }\n\n .px-xl-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-xl-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-xl-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-xl-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-xl-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-xl-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-xl-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-xl-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-xl-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-xl-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-xl-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-xl-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-xl-0 {\n padding-top: 0 !important;\n }\n\n .pt-xl-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-xl-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-xl-3 {\n padding-top: 1rem !important;\n }\n\n .pt-xl-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-xl-5 {\n padding-top: 3rem !important;\n }\n\n .pe-xl-0 {\n padding-right: 0 !important;\n }\n\n .pe-xl-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-xl-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-xl-3 {\n padding-right: 1rem !important;\n }\n\n .pe-xl-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-xl-5 {\n padding-right: 3rem !important;\n }\n\n .pb-xl-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-xl-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-xl-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-xl-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-xl-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-xl-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-xl-0 {\n padding-left: 0 !important;\n }\n\n .ps-xl-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-xl-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-xl-3 {\n padding-left: 1rem !important;\n }\n\n .ps-xl-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-xl-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 1400px) {\n .d-xxl-inline {\n display: inline !important;\n }\n\n .d-xxl-inline-block {\n display: inline-block !important;\n }\n\n .d-xxl-block {\n display: block !important;\n }\n\n .d-xxl-grid {\n display: grid !important;\n }\n\n .d-xxl-table {\n display: table !important;\n }\n\n .d-xxl-table-row {\n display: table-row !important;\n }\n\n .d-xxl-table-cell {\n display: table-cell !important;\n }\n\n .d-xxl-flex {\n display: flex !important;\n }\n\n .d-xxl-inline-flex {\n display: inline-flex !important;\n }\n\n .d-xxl-none {\n display: none !important;\n }\n\n .flex-xxl-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-xxl-row {\n flex-direction: row !important;\n }\n\n .flex-xxl-column {\n flex-direction: column !important;\n }\n\n .flex-xxl-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-xxl-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-xxl-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-xxl-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-xxl-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-xxl-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-xxl-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-xxl-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-xxl-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-xxl-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-xxl-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-xxl-center {\n justify-content: center !important;\n }\n\n .justify-content-xxl-between {\n justify-content: space-between !important;\n }\n\n .justify-content-xxl-around {\n justify-content: space-around !important;\n }\n\n .justify-content-xxl-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-xxl-start {\n align-items: flex-start !important;\n }\n\n .align-items-xxl-end {\n align-items: flex-end !important;\n }\n\n .align-items-xxl-center {\n align-items: center !important;\n }\n\n .align-items-xxl-baseline {\n align-items: baseline !important;\n }\n\n .align-items-xxl-stretch {\n align-items: stretch !important;\n }\n\n .align-content-xxl-start {\n align-content: flex-start !important;\n }\n\n .align-content-xxl-end {\n align-content: flex-end !important;\n }\n\n .align-content-xxl-center {\n align-content: center !important;\n }\n\n .align-content-xxl-between {\n align-content: space-between !important;\n }\n\n .align-content-xxl-around {\n align-content: space-around !important;\n }\n\n .align-content-xxl-stretch {\n align-content: stretch !important;\n }\n\n .align-self-xxl-auto {\n align-self: auto !important;\n }\n\n .align-self-xxl-start {\n align-self: flex-start !important;\n }\n\n .align-self-xxl-end {\n align-self: flex-end !important;\n }\n\n .align-self-xxl-center {\n align-self: center !important;\n }\n\n .align-self-xxl-baseline {\n align-self: baseline !important;\n }\n\n .align-self-xxl-stretch {\n align-self: stretch !important;\n }\n\n .order-xxl-first {\n order: -1 !important;\n }\n\n .order-xxl-0 {\n order: 0 !important;\n }\n\n .order-xxl-1 {\n order: 1 !important;\n }\n\n .order-xxl-2 {\n order: 2 !important;\n }\n\n .order-xxl-3 {\n order: 3 !important;\n }\n\n .order-xxl-4 {\n order: 4 !important;\n }\n\n .order-xxl-5 {\n order: 5 !important;\n }\n\n .order-xxl-last {\n order: 6 !important;\n }\n\n .m-xxl-0 {\n margin: 0 !important;\n }\n\n .m-xxl-1 {\n margin: 0.25rem !important;\n }\n\n .m-xxl-2 {\n margin: 0.5rem !important;\n }\n\n .m-xxl-3 {\n margin: 1rem !important;\n }\n\n .m-xxl-4 {\n margin: 1.5rem !important;\n }\n\n .m-xxl-5 {\n margin: 3rem !important;\n }\n\n .m-xxl-auto {\n margin: auto !important;\n }\n\n .mx-xxl-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-xxl-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-xxl-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-xxl-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-xxl-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-xxl-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-xxl-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-xxl-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-xxl-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-xxl-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-xxl-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-xxl-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-xxl-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-xxl-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-xxl-0 {\n margin-top: 0 !important;\n }\n\n .mt-xxl-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-xxl-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-xxl-3 {\n margin-top: 1rem !important;\n }\n\n .mt-xxl-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-xxl-5 {\n margin-top: 3rem !important;\n }\n\n .mt-xxl-auto {\n margin-top: auto !important;\n }\n\n .me-xxl-0 {\n margin-right: 0 !important;\n }\n\n .me-xxl-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-xxl-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-xxl-3 {\n margin-right: 1rem !important;\n }\n\n .me-xxl-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-xxl-5 {\n margin-right: 3rem !important;\n }\n\n .me-xxl-auto {\n margin-right: auto !important;\n }\n\n .mb-xxl-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-xxl-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-xxl-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-xxl-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-xxl-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-xxl-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-xxl-auto {\n margin-bottom: auto !important;\n }\n\n .ms-xxl-0 {\n margin-left: 0 !important;\n }\n\n .ms-xxl-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-xxl-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-xxl-3 {\n margin-left: 1rem !important;\n }\n\n .ms-xxl-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-xxl-5 {\n margin-left: 3rem !important;\n }\n\n .ms-xxl-auto {\n margin-left: auto !important;\n }\n\n .p-xxl-0 {\n padding: 0 !important;\n }\n\n .p-xxl-1 {\n padding: 0.25rem !important;\n }\n\n .p-xxl-2 {\n padding: 0.5rem !important;\n }\n\n .p-xxl-3 {\n padding: 1rem !important;\n }\n\n .p-xxl-4 {\n padding: 1.5rem !important;\n }\n\n .p-xxl-5 {\n padding: 3rem !important;\n }\n\n .px-xxl-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-xxl-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-xxl-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-xxl-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-xxl-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-xxl-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-xxl-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-xxl-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-xxl-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-xxl-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-xxl-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-xxl-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-xxl-0 {\n padding-top: 0 !important;\n }\n\n .pt-xxl-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-xxl-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-xxl-3 {\n padding-top: 1rem !important;\n }\n\n .pt-xxl-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-xxl-5 {\n padding-top: 3rem !important;\n }\n\n .pe-xxl-0 {\n padding-right: 0 !important;\n }\n\n .pe-xxl-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-xxl-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-xxl-3 {\n padding-right: 1rem !important;\n }\n\n .pe-xxl-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-xxl-5 {\n padding-right: 3rem !important;\n }\n\n .pb-xxl-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-xxl-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-xxl-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-xxl-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-xxl-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-xxl-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-xxl-0 {\n padding-left: 0 !important;\n }\n\n .ps-xxl-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-xxl-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-xxl-3 {\n padding-left: 1rem !important;\n }\n\n .ps-xxl-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-xxl-5 {\n padding-left: 3rem !important;\n }\n}\n@media print {\n .d-print-inline {\n display: inline !important;\n }\n\n .d-print-inline-block {\n display: inline-block !important;\n }\n\n .d-print-block {\n display: block !important;\n }\n\n .d-print-grid {\n display: grid !important;\n }\n\n .d-print-table {\n display: table !important;\n }\n\n .d-print-table-row {\n display: table-row !important;\n }\n\n .d-print-table-cell {\n display: table-cell !important;\n }\n\n .d-print-flex {\n display: flex !important;\n }\n\n .d-print-inline-flex {\n display: inline-flex !important;\n }\n\n .d-print-none {\n display: none !important;\n }\n}\n\n/*# sourceMappingURL=bootstrap-grid.css.map */","// Container mixins\n\n@mixin make-container($gutter: $container-padding-x) {\n width: 100%;\n padding-right: var(--#{$variable-prefix}gutter-x, #{$gutter});\n padding-left: var(--#{$variable-prefix}gutter-x, #{$gutter});\n margin-right: auto;\n margin-left: auto;\n}\n","// Breakpoint viewport sizes and media queries.\n//\n// Breakpoints are defined as a map of (name: minimum width), order from small to large:\n//\n// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)\n//\n// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.\n\n// Name of the next breakpoint, or null for the last breakpoint.\n//\n// >> breakpoint-next(sm)\n// md\n// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// md\n// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))\n// md\n@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {\n $n: index($breakpoint-names, $name);\n @if not $n {\n @error \"breakpoint `#{$name}` not found in `#{$breakpoints}`\";\n }\n @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);\n}\n\n// Minimum breakpoint width. Null for the smallest (first) breakpoint.\n//\n// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// 576px\n@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {\n $min: map-get($breakpoints, $name);\n @return if($min != 0, $min, null);\n}\n\n// Maximum breakpoint width.\n// The maximum value is reduced by 0.02px to work around the limitations of\n// `min-` and `max-` prefixes and viewports with fractional widths.\n// See https://www.w3.org/TR/mediaqueries-4/#mq-min-max\n// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\n// See https://bugs.webkit.org/show_bug.cgi?id=178261\n//\n// >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// 767.98px\n@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {\n $max: map-get($breakpoints, $name);\n @return if($max and $max > 0, $max - .02, null);\n}\n\n// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.\n// Useful for making responsive utilities.\n//\n// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// \"\" (Returns a blank string)\n// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// \"-sm\"\n@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {\n @return if(breakpoint-min($name, $breakpoints) == null, \"\", \"-#{$name}\");\n}\n\n// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.\n// Makes the @content apply to the given breakpoint and wider.\n@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n @if $min {\n @media (min-width: $min) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Media of at most the maximum breakpoint width. No query for the largest breakpoint.\n// Makes the @content apply to the given breakpoint and narrower.\n@mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) {\n $max: breakpoint-max($name, $breakpoints);\n @if $max {\n @media (max-width: $max) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Media that spans multiple breakpoint widths.\n// Makes the @content apply between the min and max breakpoints\n@mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($lower, $breakpoints);\n $max: breakpoint-max($upper, $breakpoints);\n\n @if $min != null and $max != null {\n @media (min-width: $min) and (max-width: $max) {\n @content;\n }\n } @else if $max == null {\n @include media-breakpoint-up($lower, $breakpoints) {\n @content;\n }\n } @else if $min == null {\n @include media-breakpoint-down($upper, $breakpoints) {\n @content;\n }\n }\n}\n\n// Media between the breakpoint's minimum and maximum widths.\n// No minimum for the smallest breakpoint, and no maximum for the largest one.\n// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.\n@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n $next: breakpoint-next($name, $breakpoints);\n $max: breakpoint-max($next);\n\n @if $min != null and $max != null {\n @media (min-width: $min) and (max-width: $max) {\n @content;\n }\n } @else if $max == null {\n @include media-breakpoint-up($name, $breakpoints) {\n @content;\n }\n } @else if $min == null {\n @include media-breakpoint-down($next, $breakpoints) {\n @content;\n }\n }\n}\n","// Row\n//\n// Rows contain your columns.\n\n@if $enable-grid-classes {\n .row {\n @include make-row();\n\n > * {\n @include make-col-ready();\n }\n }\n}\n\n@if $enable-cssgrid {\n .grid {\n display: grid;\n grid-template-rows: repeat(var(--#{$variable-prefix}rows, 1), 1fr);\n grid-template-columns: repeat(var(--#{$variable-prefix}columns, #{$grid-columns}), 1fr);\n gap: var(--#{$variable-prefix}gap, #{$grid-gutter-width});\n\n @include make-cssgrid();\n }\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n@if $enable-grid-classes {\n @include make-grid-columns();\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n@mixin make-row($gutter: $grid-gutter-width) {\n --#{$variable-prefix}gutter-x: #{$gutter};\n --#{$variable-prefix}gutter-y: 0;\n display: flex;\n flex-wrap: wrap;\n margin-top: calc(var(--#{$variable-prefix}gutter-y) * -1); // stylelint-disable-line function-disallowed-list\n margin-right: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list\n margin-left: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list\n}\n\n@mixin make-col-ready($gutter: $grid-gutter-width) {\n // Add box sizing if only the grid is loaded\n box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);\n // Prevent columns from becoming too narrow when at smaller grid tiers by\n // always setting `width: 100%;`. This works because we set the width\n // later on to override this initial width.\n flex-shrink: 0;\n width: 100%;\n max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid\n padding-right: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n padding-left: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n margin-top: var(--#{$variable-prefix}gutter-y);\n}\n\n@mixin make-col($size: false, $columns: $grid-columns) {\n @if $size {\n flex: 0 0 auto;\n width: percentage(divide($size, $columns));\n\n } @else {\n flex: 1 1 0;\n max-width: 100%;\n }\n}\n\n@mixin make-col-auto() {\n flex: 0 0 auto;\n width: auto;\n}\n\n@mixin make-col-offset($size, $columns: $grid-columns) {\n $num: divide($size, $columns);\n margin-left: if($num == 0, 0, percentage($num));\n}\n\n// Row columns\n//\n// Specify on a parent element(e.g., .row) to force immediate children into NN\n// numberof columns. Supports wrapping to new lines, but does not do a Masonry\n// style grid.\n@mixin row-cols($count) {\n > * {\n flex: 0 0 auto;\n width: divide(100%, $count);\n }\n}\n\n// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `$grid-columns`.\n\n@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {\n @each $breakpoint in map-keys($breakpoints) {\n $infix: breakpoint-infix($breakpoint, $breakpoints);\n\n @include media-breakpoint-up($breakpoint, $breakpoints) {\n // Provide basic `.col-{bp}` classes for equal-width flexbox columns\n .col#{$infix} {\n flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4\n }\n\n .row-cols#{$infix}-auto > * {\n @include make-col-auto();\n }\n\n @if $grid-row-columns > 0 {\n @for $i from 1 through $grid-row-columns {\n .row-cols#{$infix}-#{$i} {\n @include row-cols($i);\n }\n }\n }\n\n .col#{$infix}-auto {\n @include make-col-auto();\n }\n\n @if $columns > 0 {\n @for $i from 1 through $columns {\n .col#{$infix}-#{$i} {\n @include make-col($i, $columns);\n }\n }\n\n // `$columns - 1` because offsetting by the width of an entire row isn't possible\n @for $i from 0 through ($columns - 1) {\n @if not ($infix == \"\" and $i == 0) { // Avoid emitting useless .offset-0\n .offset#{$infix}-#{$i} {\n @include make-col-offset($i, $columns);\n }\n }\n }\n }\n\n // Gutters\n //\n // Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.\n @each $key, $value in $gutters {\n .g#{$infix}-#{$key},\n .gx#{$infix}-#{$key} {\n --#{$variable-prefix}gutter-x: #{$value};\n }\n\n .g#{$infix}-#{$key},\n .gy#{$infix}-#{$key} {\n --#{$variable-prefix}gutter-y: #{$value};\n }\n }\n }\n }\n}\n\n@mixin make-cssgrid($columns: $grid-columns, $breakpoints: $grid-breakpoints) {\n @each $breakpoint in map-keys($breakpoints) {\n $infix: breakpoint-infix($breakpoint, $breakpoints);\n\n @include media-breakpoint-up($breakpoint, $breakpoints) {\n @if $columns > 0 {\n @for $i from 1 through $columns {\n .g-col#{$infix}-#{$i} {\n grid-column: auto / span $i;\n }\n }\n\n // Start with `1` because `0` is and invalid value.\n // Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible.\n @for $i from 1 through ($columns - 1) {\n .g-start#{$infix}-#{$i} {\n grid-column-start: $i;\n }\n }\n }\n }\n }\n}\n","// Utility generator\n// Used to generate utilities & print utilities\n@mixin generate-utility($utility, $infix, $is-rfs-media-query: false) {\n $values: map-get($utility, values);\n\n // If the values are a list or string, convert it into a map\n @if type-of($values) == \"string\" or type-of(nth($values, 1)) != \"list\" {\n $values: zip($values, $values);\n }\n\n @each $key, $value in $values {\n $properties: map-get($utility, property);\n\n // Multiple properties are possible, for example with vertical or horizontal margins or paddings\n @if type-of($properties) == \"string\" {\n $properties: append((), $properties);\n }\n\n // Use custom class if present\n $property-class: if(map-has-key($utility, class), map-get($utility, class), nth($properties, 1));\n $property-class: if($property-class == null, \"\", $property-class);\n\n // State params to generate pseudo-classes\n $state: if(map-has-key($utility, state), map-get($utility, state), ());\n\n $infix: if($property-class == \"\" and str-slice($infix, 1, 1) == \"-\", str-slice($infix, 2), $infix);\n\n // Don't prefix if value key is null (eg. with shadow class)\n $property-class-modifier: if($key, if($property-class == \"\" and $infix == \"\", \"\", \"-\") + $key, \"\");\n\n @if map-get($utility, rfs) {\n // Inside the media query\n @if $is-rfs-media-query {\n $val: rfs-value($value);\n\n // Do not render anything if fluid and non fluid values are the same\n $value: if($val == rfs-fluid-value($value), null, $val);\n }\n @else {\n $value: rfs-fluid-value($value);\n }\n }\n\n $is-css-var: map-get($utility, css-var);\n $is-local-vars: map-get($utility, local-vars);\n $is-rtl: map-get($utility, rtl);\n\n @if $value != null {\n @if $is-rtl == false {\n /* rtl:begin:remove */\n }\n\n @if $is-css-var {\n .#{$property-class + $infix + $property-class-modifier} {\n --#{$variable-prefix}#{$property-class}: #{$value};\n }\n\n @each $pseudo in $state {\n .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {\n --#{$variable-prefix}#{$property-class}: #{$value};\n }\n }\n } @else {\n .#{$property-class + $infix + $property-class-modifier} {\n @each $property in $properties {\n @if $is-local-vars {\n @each $local-var, $value in $is-local-vars {\n --#{$variable-prefix}#{$local-var}: #{$value};\n }\n }\n #{$property}: $value if($enable-important-utilities, !important, null);\n }\n }\n\n @each $pseudo in $state {\n .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {\n @each $property in $properties {\n #{$property}: $value if($enable-important-utilities, !important, null);\n }\n }\n }\n }\n\n @if $is-rtl == false {\n /* rtl:end:remove */\n }\n }\n }\n}\n","// Loop over each breakpoint\n@each $breakpoint in map-keys($grid-breakpoints) {\n\n // Generate media query if needed\n @include media-breakpoint-up($breakpoint) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n // Loop over each utility property\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Only proceed if responsive media queries are enabled or if it's the base media query\n @if type-of($utility) == \"map\" and (map-get($utility, responsive) or $infix == \"\") {\n @include generate-utility($utility, $infix);\n }\n }\n }\n}\n\n// RFS rescaling\n@media (min-width: $rfs-mq-value) {\n @each $breakpoint in map-keys($grid-breakpoints) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n @if (map-get($grid-breakpoints, $breakpoint) < $rfs-breakpoint) {\n // Loop over each utility property\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Only proceed if responsive media queries are enabled or if it's the base media query\n @if type-of($utility) == \"map\" and map-get($utility, rfs) and (map-get($utility, responsive) or $infix == \"\") {\n @include generate-utility($utility, $infix, true);\n }\n }\n }\n }\n}\n\n\n// Print utilities\n@media print {\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Then check if the utility needs print styles\n @if type-of($utility) == \"map\" and map-get($utility, print) == true {\n @include generate-utility($utility, \"-print\");\n }\n }\n}\n"]} \ No newline at end of file diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css new file mode 100644 index 0000000..3c339b5 --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css @@ -0,0 +1,4996 @@ +/*! + * Bootstrap Grid v5.1.0 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors + * Copyright 2011-2021 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */ +.container, +.container-fluid, +.container-xxl, +.container-xl, +.container-lg, +.container-md, +.container-sm { + width: 100%; + padding-left: var(--bs-gutter-x, 0.75rem); + padding-right: var(--bs-gutter-x, 0.75rem); + margin-left: auto; + margin-right: auto; +} + +@media (min-width: 576px) { + .container-sm, .container { + max-width: 540px; + } +} +@media (min-width: 768px) { + .container-md, .container-sm, .container { + max-width: 720px; + } +} +@media (min-width: 992px) { + .container-lg, .container-md, .container-sm, .container { + max-width: 960px; + } +} +@media (min-width: 1200px) { + .container-xl, .container-lg, .container-md, .container-sm, .container { + max-width: 1140px; + } +} +@media (min-width: 1400px) { + .container-xxl, .container-xl, .container-lg, .container-md, .container-sm, .container { + max-width: 1320px; + } +} +.row { + --bs-gutter-x: 1.5rem; + --bs-gutter-y: 0; + display: flex; + flex-wrap: wrap; + margin-top: calc(var(--bs-gutter-y) * -1); + margin-left: calc(var(--bs-gutter-x) * -.5); + margin-right: calc(var(--bs-gutter-x) * -.5); +} +.row > * { + box-sizing: border-box; + flex-shrink: 0; + width: 100%; + max-width: 100%; + padding-left: calc(var(--bs-gutter-x) * .5); + padding-right: calc(var(--bs-gutter-x) * .5); + margin-top: var(--bs-gutter-y); +} + +.col { + flex: 1 0 0%; +} + +.row-cols-auto > * { + flex: 0 0 auto; + width: auto; +} + +.row-cols-1 > * { + flex: 0 0 auto; + width: 100%; +} + +.row-cols-2 > * { + flex: 0 0 auto; + width: 50%; +} + +.row-cols-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; +} + +.row-cols-4 > * { + flex: 0 0 auto; + width: 25%; +} + +.row-cols-5 > * { + flex: 0 0 auto; + width: 20%; +} + +.row-cols-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; +} + +.col-auto { + flex: 0 0 auto; + width: auto; +} + +.col-1 { + flex: 0 0 auto; + width: 8.33333333%; +} + +.col-2 { + flex: 0 0 auto; + width: 16.66666667%; +} + +.col-3 { + flex: 0 0 auto; + width: 25%; +} + +.col-4 { + flex: 0 0 auto; + width: 33.33333333%; +} + +.col-5 { + flex: 0 0 auto; + width: 41.66666667%; +} + +.col-6 { + flex: 0 0 auto; + width: 50%; +} + +.col-7 { + flex: 0 0 auto; + width: 58.33333333%; +} + +.col-8 { + flex: 0 0 auto; + width: 66.66666667%; +} + +.col-9 { + flex: 0 0 auto; + width: 75%; +} + +.col-10 { + flex: 0 0 auto; + width: 83.33333333%; +} + +.col-11 { + flex: 0 0 auto; + width: 91.66666667%; +} + +.col-12 { + flex: 0 0 auto; + width: 100%; +} + +.offset-1 { + margin-right: 8.33333333%; +} + +.offset-2 { + margin-right: 16.66666667%; +} + +.offset-3 { + margin-right: 25%; +} + +.offset-4 { + margin-right: 33.33333333%; +} + +.offset-5 { + margin-right: 41.66666667%; +} + +.offset-6 { + margin-right: 50%; +} + +.offset-7 { + margin-right: 58.33333333%; +} + +.offset-8 { + margin-right: 66.66666667%; +} + +.offset-9 { + margin-right: 75%; +} + +.offset-10 { + margin-right: 83.33333333%; +} + +.offset-11 { + margin-right: 91.66666667%; +} + +.g-0, +.gx-0 { + --bs-gutter-x: 0; +} + +.g-0, +.gy-0 { + --bs-gutter-y: 0; +} + +.g-1, +.gx-1 { + --bs-gutter-x: 0.25rem; +} + +.g-1, +.gy-1 { + --bs-gutter-y: 0.25rem; +} + +.g-2, +.gx-2 { + --bs-gutter-x: 0.5rem; +} + +.g-2, +.gy-2 { + --bs-gutter-y: 0.5rem; +} + +.g-3, +.gx-3 { + --bs-gutter-x: 1rem; +} + +.g-3, +.gy-3 { + --bs-gutter-y: 1rem; +} + +.g-4, +.gx-4 { + --bs-gutter-x: 1.5rem; +} + +.g-4, +.gy-4 { + --bs-gutter-y: 1.5rem; +} + +.g-5, +.gx-5 { + --bs-gutter-x: 3rem; +} + +.g-5, +.gy-5 { + --bs-gutter-y: 3rem; +} + +@media (min-width: 576px) { + .col-sm { + flex: 1 0 0%; + } + + .row-cols-sm-auto > * { + flex: 0 0 auto; + width: auto; + } + + .row-cols-sm-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .row-cols-sm-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .row-cols-sm-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .row-cols-sm-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .row-cols-sm-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .row-cols-sm-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .col-sm-auto { + flex: 0 0 auto; + width: auto; + } + + .col-sm-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .col-sm-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .col-sm-3 { + flex: 0 0 auto; + width: 25%; + } + + .col-sm-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .col-sm-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .col-sm-6 { + flex: 0 0 auto; + width: 50%; + } + + .col-sm-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .col-sm-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .col-sm-9 { + flex: 0 0 auto; + width: 75%; + } + + .col-sm-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .col-sm-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .col-sm-12 { + flex: 0 0 auto; + width: 100%; + } + + .offset-sm-0 { + margin-right: 0; + } + + .offset-sm-1 { + margin-right: 8.33333333%; + } + + .offset-sm-2 { + margin-right: 16.66666667%; + } + + .offset-sm-3 { + margin-right: 25%; + } + + .offset-sm-4 { + margin-right: 33.33333333%; + } + + .offset-sm-5 { + margin-right: 41.66666667%; + } + + .offset-sm-6 { + margin-right: 50%; + } + + .offset-sm-7 { + margin-right: 58.33333333%; + } + + .offset-sm-8 { + margin-right: 66.66666667%; + } + + .offset-sm-9 { + margin-right: 75%; + } + + .offset-sm-10 { + margin-right: 83.33333333%; + } + + .offset-sm-11 { + margin-right: 91.66666667%; + } + + .g-sm-0, +.gx-sm-0 { + --bs-gutter-x: 0; + } + + .g-sm-0, +.gy-sm-0 { + --bs-gutter-y: 0; + } + + .g-sm-1, +.gx-sm-1 { + --bs-gutter-x: 0.25rem; + } + + .g-sm-1, +.gy-sm-1 { + --bs-gutter-y: 0.25rem; + } + + .g-sm-2, +.gx-sm-2 { + --bs-gutter-x: 0.5rem; + } + + .g-sm-2, +.gy-sm-2 { + --bs-gutter-y: 0.5rem; + } + + .g-sm-3, +.gx-sm-3 { + --bs-gutter-x: 1rem; + } + + .g-sm-3, +.gy-sm-3 { + --bs-gutter-y: 1rem; + } + + .g-sm-4, +.gx-sm-4 { + --bs-gutter-x: 1.5rem; + } + + .g-sm-4, +.gy-sm-4 { + --bs-gutter-y: 1.5rem; + } + + .g-sm-5, +.gx-sm-5 { + --bs-gutter-x: 3rem; + } + + .g-sm-5, +.gy-sm-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 768px) { + .col-md { + flex: 1 0 0%; + } + + .row-cols-md-auto > * { + flex: 0 0 auto; + width: auto; + } + + .row-cols-md-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .row-cols-md-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .row-cols-md-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .row-cols-md-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .row-cols-md-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .row-cols-md-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .col-md-auto { + flex: 0 0 auto; + width: auto; + } + + .col-md-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .col-md-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .col-md-3 { + flex: 0 0 auto; + width: 25%; + } + + .col-md-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .col-md-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .col-md-6 { + flex: 0 0 auto; + width: 50%; + } + + .col-md-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .col-md-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .col-md-9 { + flex: 0 0 auto; + width: 75%; + } + + .col-md-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .col-md-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .col-md-12 { + flex: 0 0 auto; + width: 100%; + } + + .offset-md-0 { + margin-right: 0; + } + + .offset-md-1 { + margin-right: 8.33333333%; + } + + .offset-md-2 { + margin-right: 16.66666667%; + } + + .offset-md-3 { + margin-right: 25%; + } + + .offset-md-4 { + margin-right: 33.33333333%; + } + + .offset-md-5 { + margin-right: 41.66666667%; + } + + .offset-md-6 { + margin-right: 50%; + } + + .offset-md-7 { + margin-right: 58.33333333%; + } + + .offset-md-8 { + margin-right: 66.66666667%; + } + + .offset-md-9 { + margin-right: 75%; + } + + .offset-md-10 { + margin-right: 83.33333333%; + } + + .offset-md-11 { + margin-right: 91.66666667%; + } + + .g-md-0, +.gx-md-0 { + --bs-gutter-x: 0; + } + + .g-md-0, +.gy-md-0 { + --bs-gutter-y: 0; + } + + .g-md-1, +.gx-md-1 { + --bs-gutter-x: 0.25rem; + } + + .g-md-1, +.gy-md-1 { + --bs-gutter-y: 0.25rem; + } + + .g-md-2, +.gx-md-2 { + --bs-gutter-x: 0.5rem; + } + + .g-md-2, +.gy-md-2 { + --bs-gutter-y: 0.5rem; + } + + .g-md-3, +.gx-md-3 { + --bs-gutter-x: 1rem; + } + + .g-md-3, +.gy-md-3 { + --bs-gutter-y: 1rem; + } + + .g-md-4, +.gx-md-4 { + --bs-gutter-x: 1.5rem; + } + + .g-md-4, +.gy-md-4 { + --bs-gutter-y: 1.5rem; + } + + .g-md-5, +.gx-md-5 { + --bs-gutter-x: 3rem; + } + + .g-md-5, +.gy-md-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 992px) { + .col-lg { + flex: 1 0 0%; + } + + .row-cols-lg-auto > * { + flex: 0 0 auto; + width: auto; + } + + .row-cols-lg-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .row-cols-lg-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .row-cols-lg-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .row-cols-lg-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .row-cols-lg-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .row-cols-lg-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .col-lg-auto { + flex: 0 0 auto; + width: auto; + } + + .col-lg-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .col-lg-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .col-lg-3 { + flex: 0 0 auto; + width: 25%; + } + + .col-lg-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .col-lg-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .col-lg-6 { + flex: 0 0 auto; + width: 50%; + } + + .col-lg-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .col-lg-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .col-lg-9 { + flex: 0 0 auto; + width: 75%; + } + + .col-lg-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .col-lg-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .col-lg-12 { + flex: 0 0 auto; + width: 100%; + } + + .offset-lg-0 { + margin-right: 0; + } + + .offset-lg-1 { + margin-right: 8.33333333%; + } + + .offset-lg-2 { + margin-right: 16.66666667%; + } + + .offset-lg-3 { + margin-right: 25%; + } + + .offset-lg-4 { + margin-right: 33.33333333%; + } + + .offset-lg-5 { + margin-right: 41.66666667%; + } + + .offset-lg-6 { + margin-right: 50%; + } + + .offset-lg-7 { + margin-right: 58.33333333%; + } + + .offset-lg-8 { + margin-right: 66.66666667%; + } + + .offset-lg-9 { + margin-right: 75%; + } + + .offset-lg-10 { + margin-right: 83.33333333%; + } + + .offset-lg-11 { + margin-right: 91.66666667%; + } + + .g-lg-0, +.gx-lg-0 { + --bs-gutter-x: 0; + } + + .g-lg-0, +.gy-lg-0 { + --bs-gutter-y: 0; + } + + .g-lg-1, +.gx-lg-1 { + --bs-gutter-x: 0.25rem; + } + + .g-lg-1, +.gy-lg-1 { + --bs-gutter-y: 0.25rem; + } + + .g-lg-2, +.gx-lg-2 { + --bs-gutter-x: 0.5rem; + } + + .g-lg-2, +.gy-lg-2 { + --bs-gutter-y: 0.5rem; + } + + .g-lg-3, +.gx-lg-3 { + --bs-gutter-x: 1rem; + } + + .g-lg-3, +.gy-lg-3 { + --bs-gutter-y: 1rem; + } + + .g-lg-4, +.gx-lg-4 { + --bs-gutter-x: 1.5rem; + } + + .g-lg-4, +.gy-lg-4 { + --bs-gutter-y: 1.5rem; + } + + .g-lg-5, +.gx-lg-5 { + --bs-gutter-x: 3rem; + } + + .g-lg-5, +.gy-lg-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 1200px) { + .col-xl { + flex: 1 0 0%; + } + + .row-cols-xl-auto > * { + flex: 0 0 auto; + width: auto; + } + + .row-cols-xl-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .row-cols-xl-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .row-cols-xl-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .row-cols-xl-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .row-cols-xl-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .row-cols-xl-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .col-xl-auto { + flex: 0 0 auto; + width: auto; + } + + .col-xl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .col-xl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .col-xl-3 { + flex: 0 0 auto; + width: 25%; + } + + .col-xl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .col-xl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .col-xl-6 { + flex: 0 0 auto; + width: 50%; + } + + .col-xl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .col-xl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .col-xl-9 { + flex: 0 0 auto; + width: 75%; + } + + .col-xl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .col-xl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .col-xl-12 { + flex: 0 0 auto; + width: 100%; + } + + .offset-xl-0 { + margin-right: 0; + } + + .offset-xl-1 { + margin-right: 8.33333333%; + } + + .offset-xl-2 { + margin-right: 16.66666667%; + } + + .offset-xl-3 { + margin-right: 25%; + } + + .offset-xl-4 { + margin-right: 33.33333333%; + } + + .offset-xl-5 { + margin-right: 41.66666667%; + } + + .offset-xl-6 { + margin-right: 50%; + } + + .offset-xl-7 { + margin-right: 58.33333333%; + } + + .offset-xl-8 { + margin-right: 66.66666667%; + } + + .offset-xl-9 { + margin-right: 75%; + } + + .offset-xl-10 { + margin-right: 83.33333333%; + } + + .offset-xl-11 { + margin-right: 91.66666667%; + } + + .g-xl-0, +.gx-xl-0 { + --bs-gutter-x: 0; + } + + .g-xl-0, +.gy-xl-0 { + --bs-gutter-y: 0; + } + + .g-xl-1, +.gx-xl-1 { + --bs-gutter-x: 0.25rem; + } + + .g-xl-1, +.gy-xl-1 { + --bs-gutter-y: 0.25rem; + } + + .g-xl-2, +.gx-xl-2 { + --bs-gutter-x: 0.5rem; + } + + .g-xl-2, +.gy-xl-2 { + --bs-gutter-y: 0.5rem; + } + + .g-xl-3, +.gx-xl-3 { + --bs-gutter-x: 1rem; + } + + .g-xl-3, +.gy-xl-3 { + --bs-gutter-y: 1rem; + } + + .g-xl-4, +.gx-xl-4 { + --bs-gutter-x: 1.5rem; + } + + .g-xl-4, +.gy-xl-4 { + --bs-gutter-y: 1.5rem; + } + + .g-xl-5, +.gx-xl-5 { + --bs-gutter-x: 3rem; + } + + .g-xl-5, +.gy-xl-5 { + --bs-gutter-y: 3rem; + } +} +@media (min-width: 1400px) { + .col-xxl { + flex: 1 0 0%; + } + + .row-cols-xxl-auto > * { + flex: 0 0 auto; + width: auto; + } + + .row-cols-xxl-1 > * { + flex: 0 0 auto; + width: 100%; + } + + .row-cols-xxl-2 > * { + flex: 0 0 auto; + width: 50%; + } + + .row-cols-xxl-3 > * { + flex: 0 0 auto; + width: 33.3333333333%; + } + + .row-cols-xxl-4 > * { + flex: 0 0 auto; + width: 25%; + } + + .row-cols-xxl-5 > * { + flex: 0 0 auto; + width: 20%; + } + + .row-cols-xxl-6 > * { + flex: 0 0 auto; + width: 16.6666666667%; + } + + .col-xxl-auto { + flex: 0 0 auto; + width: auto; + } + + .col-xxl-1 { + flex: 0 0 auto; + width: 8.33333333%; + } + + .col-xxl-2 { + flex: 0 0 auto; + width: 16.66666667%; + } + + .col-xxl-3 { + flex: 0 0 auto; + width: 25%; + } + + .col-xxl-4 { + flex: 0 0 auto; + width: 33.33333333%; + } + + .col-xxl-5 { + flex: 0 0 auto; + width: 41.66666667%; + } + + .col-xxl-6 { + flex: 0 0 auto; + width: 50%; + } + + .col-xxl-7 { + flex: 0 0 auto; + width: 58.33333333%; + } + + .col-xxl-8 { + flex: 0 0 auto; + width: 66.66666667%; + } + + .col-xxl-9 { + flex: 0 0 auto; + width: 75%; + } + + .col-xxl-10 { + flex: 0 0 auto; + width: 83.33333333%; + } + + .col-xxl-11 { + flex: 0 0 auto; + width: 91.66666667%; + } + + .col-xxl-12 { + flex: 0 0 auto; + width: 100%; + } + + .offset-xxl-0 { + margin-right: 0; + } + + .offset-xxl-1 { + margin-right: 8.33333333%; + } + + .offset-xxl-2 { + margin-right: 16.66666667%; + } + + .offset-xxl-3 { + margin-right: 25%; + } + + .offset-xxl-4 { + margin-right: 33.33333333%; + } + + .offset-xxl-5 { + margin-right: 41.66666667%; + } + + .offset-xxl-6 { + margin-right: 50%; + } + + .offset-xxl-7 { + margin-right: 58.33333333%; + } + + .offset-xxl-8 { + margin-right: 66.66666667%; + } + + .offset-xxl-9 { + margin-right: 75%; + } + + .offset-xxl-10 { + margin-right: 83.33333333%; + } + + .offset-xxl-11 { + margin-right: 91.66666667%; + } + + .g-xxl-0, +.gx-xxl-0 { + --bs-gutter-x: 0; + } + + .g-xxl-0, +.gy-xxl-0 { + --bs-gutter-y: 0; + } + + .g-xxl-1, +.gx-xxl-1 { + --bs-gutter-x: 0.25rem; + } + + .g-xxl-1, +.gy-xxl-1 { + --bs-gutter-y: 0.25rem; + } + + .g-xxl-2, +.gx-xxl-2 { + --bs-gutter-x: 0.5rem; + } + + .g-xxl-2, +.gy-xxl-2 { + --bs-gutter-y: 0.5rem; + } + + .g-xxl-3, +.gx-xxl-3 { + --bs-gutter-x: 1rem; + } + + .g-xxl-3, +.gy-xxl-3 { + --bs-gutter-y: 1rem; + } + + .g-xxl-4, +.gx-xxl-4 { + --bs-gutter-x: 1.5rem; + } + + .g-xxl-4, +.gy-xxl-4 { + --bs-gutter-y: 1.5rem; + } + + .g-xxl-5, +.gx-xxl-5 { + --bs-gutter-x: 3rem; + } + + .g-xxl-5, +.gy-xxl-5 { + --bs-gutter-y: 3rem; + } +} +.d-inline { + display: inline !important; +} + +.d-inline-block { + display: inline-block !important; +} + +.d-block { + display: block !important; +} + +.d-grid { + display: grid !important; +} + +.d-table { + display: table !important; +} + +.d-table-row { + display: table-row !important; +} + +.d-table-cell { + display: table-cell !important; +} + +.d-flex { + display: flex !important; +} + +.d-inline-flex { + display: inline-flex !important; +} + +.d-none { + display: none !important; +} + +.flex-fill { + flex: 1 1 auto !important; +} + +.flex-row { + flex-direction: row !important; +} + +.flex-column { + flex-direction: column !important; +} + +.flex-row-reverse { + flex-direction: row-reverse !important; +} + +.flex-column-reverse { + flex-direction: column-reverse !important; +} + +.flex-grow-0 { + flex-grow: 0 !important; +} + +.flex-grow-1 { + flex-grow: 1 !important; +} + +.flex-shrink-0 { + flex-shrink: 0 !important; +} + +.flex-shrink-1 { + flex-shrink: 1 !important; +} + +.flex-wrap { + flex-wrap: wrap !important; +} + +.flex-nowrap { + flex-wrap: nowrap !important; +} + +.flex-wrap-reverse { + flex-wrap: wrap-reverse !important; +} + +.justify-content-start { + justify-content: flex-start !important; +} + +.justify-content-end { + justify-content: flex-end !important; +} + +.justify-content-center { + justify-content: center !important; +} + +.justify-content-between { + justify-content: space-between !important; +} + +.justify-content-around { + justify-content: space-around !important; +} + +.justify-content-evenly { + justify-content: space-evenly !important; +} + +.align-items-start { + align-items: flex-start !important; +} + +.align-items-end { + align-items: flex-end !important; +} + +.align-items-center { + align-items: center !important; +} + +.align-items-baseline { + align-items: baseline !important; +} + +.align-items-stretch { + align-items: stretch !important; +} + +.align-content-start { + align-content: flex-start !important; +} + +.align-content-end { + align-content: flex-end !important; +} + +.align-content-center { + align-content: center !important; +} + +.align-content-between { + align-content: space-between !important; +} + +.align-content-around { + align-content: space-around !important; +} + +.align-content-stretch { + align-content: stretch !important; +} + +.align-self-auto { + align-self: auto !important; +} + +.align-self-start { + align-self: flex-start !important; +} + +.align-self-end { + align-self: flex-end !important; +} + +.align-self-center { + align-self: center !important; +} + +.align-self-baseline { + align-self: baseline !important; +} + +.align-self-stretch { + align-self: stretch !important; +} + +.order-first { + order: -1 !important; +} + +.order-0 { + order: 0 !important; +} + +.order-1 { + order: 1 !important; +} + +.order-2 { + order: 2 !important; +} + +.order-3 { + order: 3 !important; +} + +.order-4 { + order: 4 !important; +} + +.order-5 { + order: 5 !important; +} + +.order-last { + order: 6 !important; +} + +.m-0 { + margin: 0 !important; +} + +.m-1 { + margin: 0.25rem !important; +} + +.m-2 { + margin: 0.5rem !important; +} + +.m-3 { + margin: 1rem !important; +} + +.m-4 { + margin: 1.5rem !important; +} + +.m-5 { + margin: 3rem !important; +} + +.m-auto { + margin: auto !important; +} + +.mx-0 { + margin-left: 0 !important; + margin-right: 0 !important; +} + +.mx-1 { + margin-left: 0.25rem !important; + margin-right: 0.25rem !important; +} + +.mx-2 { + margin-left: 0.5rem !important; + margin-right: 0.5rem !important; +} + +.mx-3 { + margin-left: 1rem !important; + margin-right: 1rem !important; +} + +.mx-4 { + margin-left: 1.5rem !important; + margin-right: 1.5rem !important; +} + +.mx-5 { + margin-left: 3rem !important; + margin-right: 3rem !important; +} + +.mx-auto { + margin-left: auto !important; + margin-right: auto !important; +} + +.my-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; +} + +.my-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; +} + +.my-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; +} + +.my-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; +} + +.my-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; +} + +.my-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; +} + +.my-auto { + margin-top: auto !important; + margin-bottom: auto !important; +} + +.mt-0 { + margin-top: 0 !important; +} + +.mt-1 { + margin-top: 0.25rem !important; +} + +.mt-2 { + margin-top: 0.5rem !important; +} + +.mt-3 { + margin-top: 1rem !important; +} + +.mt-4 { + margin-top: 1.5rem !important; +} + +.mt-5 { + margin-top: 3rem !important; +} + +.mt-auto { + margin-top: auto !important; +} + +.me-0 { + margin-left: 0 !important; +} + +.me-1 { + margin-left: 0.25rem !important; +} + +.me-2 { + margin-left: 0.5rem !important; +} + +.me-3 { + margin-left: 1rem !important; +} + +.me-4 { + margin-left: 1.5rem !important; +} + +.me-5 { + margin-left: 3rem !important; +} + +.me-auto { + margin-left: auto !important; +} + +.mb-0 { + margin-bottom: 0 !important; +} + +.mb-1 { + margin-bottom: 0.25rem !important; +} + +.mb-2 { + margin-bottom: 0.5rem !important; +} + +.mb-3 { + margin-bottom: 1rem !important; +} + +.mb-4 { + margin-bottom: 1.5rem !important; +} + +.mb-5 { + margin-bottom: 3rem !important; +} + +.mb-auto { + margin-bottom: auto !important; +} + +.ms-0 { + margin-right: 0 !important; +} + +.ms-1 { + margin-right: 0.25rem !important; +} + +.ms-2 { + margin-right: 0.5rem !important; +} + +.ms-3 { + margin-right: 1rem !important; +} + +.ms-4 { + margin-right: 1.5rem !important; +} + +.ms-5 { + margin-right: 3rem !important; +} + +.ms-auto { + margin-right: auto !important; +} + +.p-0 { + padding: 0 !important; +} + +.p-1 { + padding: 0.25rem !important; +} + +.p-2 { + padding: 0.5rem !important; +} + +.p-3 { + padding: 1rem !important; +} + +.p-4 { + padding: 1.5rem !important; +} + +.p-5 { + padding: 3rem !important; +} + +.px-0 { + padding-left: 0 !important; + padding-right: 0 !important; +} + +.px-1 { + padding-left: 0.25rem !important; + padding-right: 0.25rem !important; +} + +.px-2 { + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; +} + +.px-3 { + padding-left: 1rem !important; + padding-right: 1rem !important; +} + +.px-4 { + padding-left: 1.5rem !important; + padding-right: 1.5rem !important; +} + +.px-5 { + padding-left: 3rem !important; + padding-right: 3rem !important; +} + +.py-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; +} + +.py-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; +} + +.py-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; +} + +.py-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; +} + +.py-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; +} + +.py-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; +} + +.pt-0 { + padding-top: 0 !important; +} + +.pt-1 { + padding-top: 0.25rem !important; +} + +.pt-2 { + padding-top: 0.5rem !important; +} + +.pt-3 { + padding-top: 1rem !important; +} + +.pt-4 { + padding-top: 1.5rem !important; +} + +.pt-5 { + padding-top: 3rem !important; +} + +.pe-0 { + padding-left: 0 !important; +} + +.pe-1 { + padding-left: 0.25rem !important; +} + +.pe-2 { + padding-left: 0.5rem !important; +} + +.pe-3 { + padding-left: 1rem !important; +} + +.pe-4 { + padding-left: 1.5rem !important; +} + +.pe-5 { + padding-left: 3rem !important; +} + +.pb-0 { + padding-bottom: 0 !important; +} + +.pb-1 { + padding-bottom: 0.25rem !important; +} + +.pb-2 { + padding-bottom: 0.5rem !important; +} + +.pb-3 { + padding-bottom: 1rem !important; +} + +.pb-4 { + padding-bottom: 1.5rem !important; +} + +.pb-5 { + padding-bottom: 3rem !important; +} + +.ps-0 { + padding-right: 0 !important; +} + +.ps-1 { + padding-right: 0.25rem !important; +} + +.ps-2 { + padding-right: 0.5rem !important; +} + +.ps-3 { + padding-right: 1rem !important; +} + +.ps-4 { + padding-right: 1.5rem !important; +} + +.ps-5 { + padding-right: 3rem !important; +} + +@media (min-width: 576px) { + .d-sm-inline { + display: inline !important; + } + + .d-sm-inline-block { + display: inline-block !important; + } + + .d-sm-block { + display: block !important; + } + + .d-sm-grid { + display: grid !important; + } + + .d-sm-table { + display: table !important; + } + + .d-sm-table-row { + display: table-row !important; + } + + .d-sm-table-cell { + display: table-cell !important; + } + + .d-sm-flex { + display: flex !important; + } + + .d-sm-inline-flex { + display: inline-flex !important; + } + + .d-sm-none { + display: none !important; + } + + .flex-sm-fill { + flex: 1 1 auto !important; + } + + .flex-sm-row { + flex-direction: row !important; + } + + .flex-sm-column { + flex-direction: column !important; + } + + .flex-sm-row-reverse { + flex-direction: row-reverse !important; + } + + .flex-sm-column-reverse { + flex-direction: column-reverse !important; + } + + .flex-sm-grow-0 { + flex-grow: 0 !important; + } + + .flex-sm-grow-1 { + flex-grow: 1 !important; + } + + .flex-sm-shrink-0 { + flex-shrink: 0 !important; + } + + .flex-sm-shrink-1 { + flex-shrink: 1 !important; + } + + .flex-sm-wrap { + flex-wrap: wrap !important; + } + + .flex-sm-nowrap { + flex-wrap: nowrap !important; + } + + .flex-sm-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .justify-content-sm-start { + justify-content: flex-start !important; + } + + .justify-content-sm-end { + justify-content: flex-end !important; + } + + .justify-content-sm-center { + justify-content: center !important; + } + + .justify-content-sm-between { + justify-content: space-between !important; + } + + .justify-content-sm-around { + justify-content: space-around !important; + } + + .justify-content-sm-evenly { + justify-content: space-evenly !important; + } + + .align-items-sm-start { + align-items: flex-start !important; + } + + .align-items-sm-end { + align-items: flex-end !important; + } + + .align-items-sm-center { + align-items: center !important; + } + + .align-items-sm-baseline { + align-items: baseline !important; + } + + .align-items-sm-stretch { + align-items: stretch !important; + } + + .align-content-sm-start { + align-content: flex-start !important; + } + + .align-content-sm-end { + align-content: flex-end !important; + } + + .align-content-sm-center { + align-content: center !important; + } + + .align-content-sm-between { + align-content: space-between !important; + } + + .align-content-sm-around { + align-content: space-around !important; + } + + .align-content-sm-stretch { + align-content: stretch !important; + } + + .align-self-sm-auto { + align-self: auto !important; + } + + .align-self-sm-start { + align-self: flex-start !important; + } + + .align-self-sm-end { + align-self: flex-end !important; + } + + .align-self-sm-center { + align-self: center !important; + } + + .align-self-sm-baseline { + align-self: baseline !important; + } + + .align-self-sm-stretch { + align-self: stretch !important; + } + + .order-sm-first { + order: -1 !important; + } + + .order-sm-0 { + order: 0 !important; + } + + .order-sm-1 { + order: 1 !important; + } + + .order-sm-2 { + order: 2 !important; + } + + .order-sm-3 { + order: 3 !important; + } + + .order-sm-4 { + order: 4 !important; + } + + .order-sm-5 { + order: 5 !important; + } + + .order-sm-last { + order: 6 !important; + } + + .m-sm-0 { + margin: 0 !important; + } + + .m-sm-1 { + margin: 0.25rem !important; + } + + .m-sm-2 { + margin: 0.5rem !important; + } + + .m-sm-3 { + margin: 1rem !important; + } + + .m-sm-4 { + margin: 1.5rem !important; + } + + .m-sm-5 { + margin: 3rem !important; + } + + .m-sm-auto { + margin: auto !important; + } + + .mx-sm-0 { + margin-left: 0 !important; + margin-right: 0 !important; + } + + .mx-sm-1 { + margin-left: 0.25rem !important; + margin-right: 0.25rem !important; + } + + .mx-sm-2 { + margin-left: 0.5rem !important; + margin-right: 0.5rem !important; + } + + .mx-sm-3 { + margin-left: 1rem !important; + margin-right: 1rem !important; + } + + .mx-sm-4 { + margin-left: 1.5rem !important; + margin-right: 1.5rem !important; + } + + .mx-sm-5 { + margin-left: 3rem !important; + margin-right: 3rem !important; + } + + .mx-sm-auto { + margin-left: auto !important; + margin-right: auto !important; + } + + .my-sm-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .my-sm-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .my-sm-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .my-sm-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .my-sm-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .my-sm-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .my-sm-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .mt-sm-0 { + margin-top: 0 !important; + } + + .mt-sm-1 { + margin-top: 0.25rem !important; + } + + .mt-sm-2 { + margin-top: 0.5rem !important; + } + + .mt-sm-3 { + margin-top: 1rem !important; + } + + .mt-sm-4 { + margin-top: 1.5rem !important; + } + + .mt-sm-5 { + margin-top: 3rem !important; + } + + .mt-sm-auto { + margin-top: auto !important; + } + + .me-sm-0 { + margin-left: 0 !important; + } + + .me-sm-1 { + margin-left: 0.25rem !important; + } + + .me-sm-2 { + margin-left: 0.5rem !important; + } + + .me-sm-3 { + margin-left: 1rem !important; + } + + .me-sm-4 { + margin-left: 1.5rem !important; + } + + .me-sm-5 { + margin-left: 3rem !important; + } + + .me-sm-auto { + margin-left: auto !important; + } + + .mb-sm-0 { + margin-bottom: 0 !important; + } + + .mb-sm-1 { + margin-bottom: 0.25rem !important; + } + + .mb-sm-2 { + margin-bottom: 0.5rem !important; + } + + .mb-sm-3 { + margin-bottom: 1rem !important; + } + + .mb-sm-4 { + margin-bottom: 1.5rem !important; + } + + .mb-sm-5 { + margin-bottom: 3rem !important; + } + + .mb-sm-auto { + margin-bottom: auto !important; + } + + .ms-sm-0 { + margin-right: 0 !important; + } + + .ms-sm-1 { + margin-right: 0.25rem !important; + } + + .ms-sm-2 { + margin-right: 0.5rem !important; + } + + .ms-sm-3 { + margin-right: 1rem !important; + } + + .ms-sm-4 { + margin-right: 1.5rem !important; + } + + .ms-sm-5 { + margin-right: 3rem !important; + } + + .ms-sm-auto { + margin-right: auto !important; + } + + .p-sm-0 { + padding: 0 !important; + } + + .p-sm-1 { + padding: 0.25rem !important; + } + + .p-sm-2 { + padding: 0.5rem !important; + } + + .p-sm-3 { + padding: 1rem !important; + } + + .p-sm-4 { + padding: 1.5rem !important; + } + + .p-sm-5 { + padding: 3rem !important; + } + + .px-sm-0 { + padding-left: 0 !important; + padding-right: 0 !important; + } + + .px-sm-1 { + padding-left: 0.25rem !important; + padding-right: 0.25rem !important; + } + + .px-sm-2 { + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; + } + + .px-sm-3 { + padding-left: 1rem !important; + padding-right: 1rem !important; + } + + .px-sm-4 { + padding-left: 1.5rem !important; + padding-right: 1.5rem !important; + } + + .px-sm-5 { + padding-left: 3rem !important; + padding-right: 3rem !important; + } + + .py-sm-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .py-sm-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .py-sm-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .py-sm-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .py-sm-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .py-sm-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .pt-sm-0 { + padding-top: 0 !important; + } + + .pt-sm-1 { + padding-top: 0.25rem !important; + } + + .pt-sm-2 { + padding-top: 0.5rem !important; + } + + .pt-sm-3 { + padding-top: 1rem !important; + } + + .pt-sm-4 { + padding-top: 1.5rem !important; + } + + .pt-sm-5 { + padding-top: 3rem !important; + } + + .pe-sm-0 { + padding-left: 0 !important; + } + + .pe-sm-1 { + padding-left: 0.25rem !important; + } + + .pe-sm-2 { + padding-left: 0.5rem !important; + } + + .pe-sm-3 { + padding-left: 1rem !important; + } + + .pe-sm-4 { + padding-left: 1.5rem !important; + } + + .pe-sm-5 { + padding-left: 3rem !important; + } + + .pb-sm-0 { + padding-bottom: 0 !important; + } + + .pb-sm-1 { + padding-bottom: 0.25rem !important; + } + + .pb-sm-2 { + padding-bottom: 0.5rem !important; + } + + .pb-sm-3 { + padding-bottom: 1rem !important; + } + + .pb-sm-4 { + padding-bottom: 1.5rem !important; + } + + .pb-sm-5 { + padding-bottom: 3rem !important; + } + + .ps-sm-0 { + padding-right: 0 !important; + } + + .ps-sm-1 { + padding-right: 0.25rem !important; + } + + .ps-sm-2 { + padding-right: 0.5rem !important; + } + + .ps-sm-3 { + padding-right: 1rem !important; + } + + .ps-sm-4 { + padding-right: 1.5rem !important; + } + + .ps-sm-5 { + padding-right: 3rem !important; + } +} +@media (min-width: 768px) { + .d-md-inline { + display: inline !important; + } + + .d-md-inline-block { + display: inline-block !important; + } + + .d-md-block { + display: block !important; + } + + .d-md-grid { + display: grid !important; + } + + .d-md-table { + display: table !important; + } + + .d-md-table-row { + display: table-row !important; + } + + .d-md-table-cell { + display: table-cell !important; + } + + .d-md-flex { + display: flex !important; + } + + .d-md-inline-flex { + display: inline-flex !important; + } + + .d-md-none { + display: none !important; + } + + .flex-md-fill { + flex: 1 1 auto !important; + } + + .flex-md-row { + flex-direction: row !important; + } + + .flex-md-column { + flex-direction: column !important; + } + + .flex-md-row-reverse { + flex-direction: row-reverse !important; + } + + .flex-md-column-reverse { + flex-direction: column-reverse !important; + } + + .flex-md-grow-0 { + flex-grow: 0 !important; + } + + .flex-md-grow-1 { + flex-grow: 1 !important; + } + + .flex-md-shrink-0 { + flex-shrink: 0 !important; + } + + .flex-md-shrink-1 { + flex-shrink: 1 !important; + } + + .flex-md-wrap { + flex-wrap: wrap !important; + } + + .flex-md-nowrap { + flex-wrap: nowrap !important; + } + + .flex-md-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .justify-content-md-start { + justify-content: flex-start !important; + } + + .justify-content-md-end { + justify-content: flex-end !important; + } + + .justify-content-md-center { + justify-content: center !important; + } + + .justify-content-md-between { + justify-content: space-between !important; + } + + .justify-content-md-around { + justify-content: space-around !important; + } + + .justify-content-md-evenly { + justify-content: space-evenly !important; + } + + .align-items-md-start { + align-items: flex-start !important; + } + + .align-items-md-end { + align-items: flex-end !important; + } + + .align-items-md-center { + align-items: center !important; + } + + .align-items-md-baseline { + align-items: baseline !important; + } + + .align-items-md-stretch { + align-items: stretch !important; + } + + .align-content-md-start { + align-content: flex-start !important; + } + + .align-content-md-end { + align-content: flex-end !important; + } + + .align-content-md-center { + align-content: center !important; + } + + .align-content-md-between { + align-content: space-between !important; + } + + .align-content-md-around { + align-content: space-around !important; + } + + .align-content-md-stretch { + align-content: stretch !important; + } + + .align-self-md-auto { + align-self: auto !important; + } + + .align-self-md-start { + align-self: flex-start !important; + } + + .align-self-md-end { + align-self: flex-end !important; + } + + .align-self-md-center { + align-self: center !important; + } + + .align-self-md-baseline { + align-self: baseline !important; + } + + .align-self-md-stretch { + align-self: stretch !important; + } + + .order-md-first { + order: -1 !important; + } + + .order-md-0 { + order: 0 !important; + } + + .order-md-1 { + order: 1 !important; + } + + .order-md-2 { + order: 2 !important; + } + + .order-md-3 { + order: 3 !important; + } + + .order-md-4 { + order: 4 !important; + } + + .order-md-5 { + order: 5 !important; + } + + .order-md-last { + order: 6 !important; + } + + .m-md-0 { + margin: 0 !important; + } + + .m-md-1 { + margin: 0.25rem !important; + } + + .m-md-2 { + margin: 0.5rem !important; + } + + .m-md-3 { + margin: 1rem !important; + } + + .m-md-4 { + margin: 1.5rem !important; + } + + .m-md-5 { + margin: 3rem !important; + } + + .m-md-auto { + margin: auto !important; + } + + .mx-md-0 { + margin-left: 0 !important; + margin-right: 0 !important; + } + + .mx-md-1 { + margin-left: 0.25rem !important; + margin-right: 0.25rem !important; + } + + .mx-md-2 { + margin-left: 0.5rem !important; + margin-right: 0.5rem !important; + } + + .mx-md-3 { + margin-left: 1rem !important; + margin-right: 1rem !important; + } + + .mx-md-4 { + margin-left: 1.5rem !important; + margin-right: 1.5rem !important; + } + + .mx-md-5 { + margin-left: 3rem !important; + margin-right: 3rem !important; + } + + .mx-md-auto { + margin-left: auto !important; + margin-right: auto !important; + } + + .my-md-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .my-md-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .my-md-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .my-md-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .my-md-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .my-md-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .my-md-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .mt-md-0 { + margin-top: 0 !important; + } + + .mt-md-1 { + margin-top: 0.25rem !important; + } + + .mt-md-2 { + margin-top: 0.5rem !important; + } + + .mt-md-3 { + margin-top: 1rem !important; + } + + .mt-md-4 { + margin-top: 1.5rem !important; + } + + .mt-md-5 { + margin-top: 3rem !important; + } + + .mt-md-auto { + margin-top: auto !important; + } + + .me-md-0 { + margin-left: 0 !important; + } + + .me-md-1 { + margin-left: 0.25rem !important; + } + + .me-md-2 { + margin-left: 0.5rem !important; + } + + .me-md-3 { + margin-left: 1rem !important; + } + + .me-md-4 { + margin-left: 1.5rem !important; + } + + .me-md-5 { + margin-left: 3rem !important; + } + + .me-md-auto { + margin-left: auto !important; + } + + .mb-md-0 { + margin-bottom: 0 !important; + } + + .mb-md-1 { + margin-bottom: 0.25rem !important; + } + + .mb-md-2 { + margin-bottom: 0.5rem !important; + } + + .mb-md-3 { + margin-bottom: 1rem !important; + } + + .mb-md-4 { + margin-bottom: 1.5rem !important; + } + + .mb-md-5 { + margin-bottom: 3rem !important; + } + + .mb-md-auto { + margin-bottom: auto !important; + } + + .ms-md-0 { + margin-right: 0 !important; + } + + .ms-md-1 { + margin-right: 0.25rem !important; + } + + .ms-md-2 { + margin-right: 0.5rem !important; + } + + .ms-md-3 { + margin-right: 1rem !important; + } + + .ms-md-4 { + margin-right: 1.5rem !important; + } + + .ms-md-5 { + margin-right: 3rem !important; + } + + .ms-md-auto { + margin-right: auto !important; + } + + .p-md-0 { + padding: 0 !important; + } + + .p-md-1 { + padding: 0.25rem !important; + } + + .p-md-2 { + padding: 0.5rem !important; + } + + .p-md-3 { + padding: 1rem !important; + } + + .p-md-4 { + padding: 1.5rem !important; + } + + .p-md-5 { + padding: 3rem !important; + } + + .px-md-0 { + padding-left: 0 !important; + padding-right: 0 !important; + } + + .px-md-1 { + padding-left: 0.25rem !important; + padding-right: 0.25rem !important; + } + + .px-md-2 { + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; + } + + .px-md-3 { + padding-left: 1rem !important; + padding-right: 1rem !important; + } + + .px-md-4 { + padding-left: 1.5rem !important; + padding-right: 1.5rem !important; + } + + .px-md-5 { + padding-left: 3rem !important; + padding-right: 3rem !important; + } + + .py-md-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .py-md-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .py-md-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .py-md-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .py-md-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .py-md-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .pt-md-0 { + padding-top: 0 !important; + } + + .pt-md-1 { + padding-top: 0.25rem !important; + } + + .pt-md-2 { + padding-top: 0.5rem !important; + } + + .pt-md-3 { + padding-top: 1rem !important; + } + + .pt-md-4 { + padding-top: 1.5rem !important; + } + + .pt-md-5 { + padding-top: 3rem !important; + } + + .pe-md-0 { + padding-left: 0 !important; + } + + .pe-md-1 { + padding-left: 0.25rem !important; + } + + .pe-md-2 { + padding-left: 0.5rem !important; + } + + .pe-md-3 { + padding-left: 1rem !important; + } + + .pe-md-4 { + padding-left: 1.5rem !important; + } + + .pe-md-5 { + padding-left: 3rem !important; + } + + .pb-md-0 { + padding-bottom: 0 !important; + } + + .pb-md-1 { + padding-bottom: 0.25rem !important; + } + + .pb-md-2 { + padding-bottom: 0.5rem !important; + } + + .pb-md-3 { + padding-bottom: 1rem !important; + } + + .pb-md-4 { + padding-bottom: 1.5rem !important; + } + + .pb-md-5 { + padding-bottom: 3rem !important; + } + + .ps-md-0 { + padding-right: 0 !important; + } + + .ps-md-1 { + padding-right: 0.25rem !important; + } + + .ps-md-2 { + padding-right: 0.5rem !important; + } + + .ps-md-3 { + padding-right: 1rem !important; + } + + .ps-md-4 { + padding-right: 1.5rem !important; + } + + .ps-md-5 { + padding-right: 3rem !important; + } +} +@media (min-width: 992px) { + .d-lg-inline { + display: inline !important; + } + + .d-lg-inline-block { + display: inline-block !important; + } + + .d-lg-block { + display: block !important; + } + + .d-lg-grid { + display: grid !important; + } + + .d-lg-table { + display: table !important; + } + + .d-lg-table-row { + display: table-row !important; + } + + .d-lg-table-cell { + display: table-cell !important; + } + + .d-lg-flex { + display: flex !important; + } + + .d-lg-inline-flex { + display: inline-flex !important; + } + + .d-lg-none { + display: none !important; + } + + .flex-lg-fill { + flex: 1 1 auto !important; + } + + .flex-lg-row { + flex-direction: row !important; + } + + .flex-lg-column { + flex-direction: column !important; + } + + .flex-lg-row-reverse { + flex-direction: row-reverse !important; + } + + .flex-lg-column-reverse { + flex-direction: column-reverse !important; + } + + .flex-lg-grow-0 { + flex-grow: 0 !important; + } + + .flex-lg-grow-1 { + flex-grow: 1 !important; + } + + .flex-lg-shrink-0 { + flex-shrink: 0 !important; + } + + .flex-lg-shrink-1 { + flex-shrink: 1 !important; + } + + .flex-lg-wrap { + flex-wrap: wrap !important; + } + + .flex-lg-nowrap { + flex-wrap: nowrap !important; + } + + .flex-lg-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .justify-content-lg-start { + justify-content: flex-start !important; + } + + .justify-content-lg-end { + justify-content: flex-end !important; + } + + .justify-content-lg-center { + justify-content: center !important; + } + + .justify-content-lg-between { + justify-content: space-between !important; + } + + .justify-content-lg-around { + justify-content: space-around !important; + } + + .justify-content-lg-evenly { + justify-content: space-evenly !important; + } + + .align-items-lg-start { + align-items: flex-start !important; + } + + .align-items-lg-end { + align-items: flex-end !important; + } + + .align-items-lg-center { + align-items: center !important; + } + + .align-items-lg-baseline { + align-items: baseline !important; + } + + .align-items-lg-stretch { + align-items: stretch !important; + } + + .align-content-lg-start { + align-content: flex-start !important; + } + + .align-content-lg-end { + align-content: flex-end !important; + } + + .align-content-lg-center { + align-content: center !important; + } + + .align-content-lg-between { + align-content: space-between !important; + } + + .align-content-lg-around { + align-content: space-around !important; + } + + .align-content-lg-stretch { + align-content: stretch !important; + } + + .align-self-lg-auto { + align-self: auto !important; + } + + .align-self-lg-start { + align-self: flex-start !important; + } + + .align-self-lg-end { + align-self: flex-end !important; + } + + .align-self-lg-center { + align-self: center !important; + } + + .align-self-lg-baseline { + align-self: baseline !important; + } + + .align-self-lg-stretch { + align-self: stretch !important; + } + + .order-lg-first { + order: -1 !important; + } + + .order-lg-0 { + order: 0 !important; + } + + .order-lg-1 { + order: 1 !important; + } + + .order-lg-2 { + order: 2 !important; + } + + .order-lg-3 { + order: 3 !important; + } + + .order-lg-4 { + order: 4 !important; + } + + .order-lg-5 { + order: 5 !important; + } + + .order-lg-last { + order: 6 !important; + } + + .m-lg-0 { + margin: 0 !important; + } + + .m-lg-1 { + margin: 0.25rem !important; + } + + .m-lg-2 { + margin: 0.5rem !important; + } + + .m-lg-3 { + margin: 1rem !important; + } + + .m-lg-4 { + margin: 1.5rem !important; + } + + .m-lg-5 { + margin: 3rem !important; + } + + .m-lg-auto { + margin: auto !important; + } + + .mx-lg-0 { + margin-left: 0 !important; + margin-right: 0 !important; + } + + .mx-lg-1 { + margin-left: 0.25rem !important; + margin-right: 0.25rem !important; + } + + .mx-lg-2 { + margin-left: 0.5rem !important; + margin-right: 0.5rem !important; + } + + .mx-lg-3 { + margin-left: 1rem !important; + margin-right: 1rem !important; + } + + .mx-lg-4 { + margin-left: 1.5rem !important; + margin-right: 1.5rem !important; + } + + .mx-lg-5 { + margin-left: 3rem !important; + margin-right: 3rem !important; + } + + .mx-lg-auto { + margin-left: auto !important; + margin-right: auto !important; + } + + .my-lg-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .my-lg-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .my-lg-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .my-lg-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .my-lg-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .my-lg-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .my-lg-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .mt-lg-0 { + margin-top: 0 !important; + } + + .mt-lg-1 { + margin-top: 0.25rem !important; + } + + .mt-lg-2 { + margin-top: 0.5rem !important; + } + + .mt-lg-3 { + margin-top: 1rem !important; + } + + .mt-lg-4 { + margin-top: 1.5rem !important; + } + + .mt-lg-5 { + margin-top: 3rem !important; + } + + .mt-lg-auto { + margin-top: auto !important; + } + + .me-lg-0 { + margin-left: 0 !important; + } + + .me-lg-1 { + margin-left: 0.25rem !important; + } + + .me-lg-2 { + margin-left: 0.5rem !important; + } + + .me-lg-3 { + margin-left: 1rem !important; + } + + .me-lg-4 { + margin-left: 1.5rem !important; + } + + .me-lg-5 { + margin-left: 3rem !important; + } + + .me-lg-auto { + margin-left: auto !important; + } + + .mb-lg-0 { + margin-bottom: 0 !important; + } + + .mb-lg-1 { + margin-bottom: 0.25rem !important; + } + + .mb-lg-2 { + margin-bottom: 0.5rem !important; + } + + .mb-lg-3 { + margin-bottom: 1rem !important; + } + + .mb-lg-4 { + margin-bottom: 1.5rem !important; + } + + .mb-lg-5 { + margin-bottom: 3rem !important; + } + + .mb-lg-auto { + margin-bottom: auto !important; + } + + .ms-lg-0 { + margin-right: 0 !important; + } + + .ms-lg-1 { + margin-right: 0.25rem !important; + } + + .ms-lg-2 { + margin-right: 0.5rem !important; + } + + .ms-lg-3 { + margin-right: 1rem !important; + } + + .ms-lg-4 { + margin-right: 1.5rem !important; + } + + .ms-lg-5 { + margin-right: 3rem !important; + } + + .ms-lg-auto { + margin-right: auto !important; + } + + .p-lg-0 { + padding: 0 !important; + } + + .p-lg-1 { + padding: 0.25rem !important; + } + + .p-lg-2 { + padding: 0.5rem !important; + } + + .p-lg-3 { + padding: 1rem !important; + } + + .p-lg-4 { + padding: 1.5rem !important; + } + + .p-lg-5 { + padding: 3rem !important; + } + + .px-lg-0 { + padding-left: 0 !important; + padding-right: 0 !important; + } + + .px-lg-1 { + padding-left: 0.25rem !important; + padding-right: 0.25rem !important; + } + + .px-lg-2 { + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; + } + + .px-lg-3 { + padding-left: 1rem !important; + padding-right: 1rem !important; + } + + .px-lg-4 { + padding-left: 1.5rem !important; + padding-right: 1.5rem !important; + } + + .px-lg-5 { + padding-left: 3rem !important; + padding-right: 3rem !important; + } + + .py-lg-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .py-lg-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .py-lg-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .py-lg-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .py-lg-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .py-lg-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .pt-lg-0 { + padding-top: 0 !important; + } + + .pt-lg-1 { + padding-top: 0.25rem !important; + } + + .pt-lg-2 { + padding-top: 0.5rem !important; + } + + .pt-lg-3 { + padding-top: 1rem !important; + } + + .pt-lg-4 { + padding-top: 1.5rem !important; + } + + .pt-lg-5 { + padding-top: 3rem !important; + } + + .pe-lg-0 { + padding-left: 0 !important; + } + + .pe-lg-1 { + padding-left: 0.25rem !important; + } + + .pe-lg-2 { + padding-left: 0.5rem !important; + } + + .pe-lg-3 { + padding-left: 1rem !important; + } + + .pe-lg-4 { + padding-left: 1.5rem !important; + } + + .pe-lg-5 { + padding-left: 3rem !important; + } + + .pb-lg-0 { + padding-bottom: 0 !important; + } + + .pb-lg-1 { + padding-bottom: 0.25rem !important; + } + + .pb-lg-2 { + padding-bottom: 0.5rem !important; + } + + .pb-lg-3 { + padding-bottom: 1rem !important; + } + + .pb-lg-4 { + padding-bottom: 1.5rem !important; + } + + .pb-lg-5 { + padding-bottom: 3rem !important; + } + + .ps-lg-0 { + padding-right: 0 !important; + } + + .ps-lg-1 { + padding-right: 0.25rem !important; + } + + .ps-lg-2 { + padding-right: 0.5rem !important; + } + + .ps-lg-3 { + padding-right: 1rem !important; + } + + .ps-lg-4 { + padding-right: 1.5rem !important; + } + + .ps-lg-5 { + padding-right: 3rem !important; + } +} +@media (min-width: 1200px) { + .d-xl-inline { + display: inline !important; + } + + .d-xl-inline-block { + display: inline-block !important; + } + + .d-xl-block { + display: block !important; + } + + .d-xl-grid { + display: grid !important; + } + + .d-xl-table { + display: table !important; + } + + .d-xl-table-row { + display: table-row !important; + } + + .d-xl-table-cell { + display: table-cell !important; + } + + .d-xl-flex { + display: flex !important; + } + + .d-xl-inline-flex { + display: inline-flex !important; + } + + .d-xl-none { + display: none !important; + } + + .flex-xl-fill { + flex: 1 1 auto !important; + } + + .flex-xl-row { + flex-direction: row !important; + } + + .flex-xl-column { + flex-direction: column !important; + } + + .flex-xl-row-reverse { + flex-direction: row-reverse !important; + } + + .flex-xl-column-reverse { + flex-direction: column-reverse !important; + } + + .flex-xl-grow-0 { + flex-grow: 0 !important; + } + + .flex-xl-grow-1 { + flex-grow: 1 !important; + } + + .flex-xl-shrink-0 { + flex-shrink: 0 !important; + } + + .flex-xl-shrink-1 { + flex-shrink: 1 !important; + } + + .flex-xl-wrap { + flex-wrap: wrap !important; + } + + .flex-xl-nowrap { + flex-wrap: nowrap !important; + } + + .flex-xl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .justify-content-xl-start { + justify-content: flex-start !important; + } + + .justify-content-xl-end { + justify-content: flex-end !important; + } + + .justify-content-xl-center { + justify-content: center !important; + } + + .justify-content-xl-between { + justify-content: space-between !important; + } + + .justify-content-xl-around { + justify-content: space-around !important; + } + + .justify-content-xl-evenly { + justify-content: space-evenly !important; + } + + .align-items-xl-start { + align-items: flex-start !important; + } + + .align-items-xl-end { + align-items: flex-end !important; + } + + .align-items-xl-center { + align-items: center !important; + } + + .align-items-xl-baseline { + align-items: baseline !important; + } + + .align-items-xl-stretch { + align-items: stretch !important; + } + + .align-content-xl-start { + align-content: flex-start !important; + } + + .align-content-xl-end { + align-content: flex-end !important; + } + + .align-content-xl-center { + align-content: center !important; + } + + .align-content-xl-between { + align-content: space-between !important; + } + + .align-content-xl-around { + align-content: space-around !important; + } + + .align-content-xl-stretch { + align-content: stretch !important; + } + + .align-self-xl-auto { + align-self: auto !important; + } + + .align-self-xl-start { + align-self: flex-start !important; + } + + .align-self-xl-end { + align-self: flex-end !important; + } + + .align-self-xl-center { + align-self: center !important; + } + + .align-self-xl-baseline { + align-self: baseline !important; + } + + .align-self-xl-stretch { + align-self: stretch !important; + } + + .order-xl-first { + order: -1 !important; + } + + .order-xl-0 { + order: 0 !important; + } + + .order-xl-1 { + order: 1 !important; + } + + .order-xl-2 { + order: 2 !important; + } + + .order-xl-3 { + order: 3 !important; + } + + .order-xl-4 { + order: 4 !important; + } + + .order-xl-5 { + order: 5 !important; + } + + .order-xl-last { + order: 6 !important; + } + + .m-xl-0 { + margin: 0 !important; + } + + .m-xl-1 { + margin: 0.25rem !important; + } + + .m-xl-2 { + margin: 0.5rem !important; + } + + .m-xl-3 { + margin: 1rem !important; + } + + .m-xl-4 { + margin: 1.5rem !important; + } + + .m-xl-5 { + margin: 3rem !important; + } + + .m-xl-auto { + margin: auto !important; + } + + .mx-xl-0 { + margin-left: 0 !important; + margin-right: 0 !important; + } + + .mx-xl-1 { + margin-left: 0.25rem !important; + margin-right: 0.25rem !important; + } + + .mx-xl-2 { + margin-left: 0.5rem !important; + margin-right: 0.5rem !important; + } + + .mx-xl-3 { + margin-left: 1rem !important; + margin-right: 1rem !important; + } + + .mx-xl-4 { + margin-left: 1.5rem !important; + margin-right: 1.5rem !important; + } + + .mx-xl-5 { + margin-left: 3rem !important; + margin-right: 3rem !important; + } + + .mx-xl-auto { + margin-left: auto !important; + margin-right: auto !important; + } + + .my-xl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .my-xl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .my-xl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .my-xl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .my-xl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .my-xl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .my-xl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .mt-xl-0 { + margin-top: 0 !important; + } + + .mt-xl-1 { + margin-top: 0.25rem !important; + } + + .mt-xl-2 { + margin-top: 0.5rem !important; + } + + .mt-xl-3 { + margin-top: 1rem !important; + } + + .mt-xl-4 { + margin-top: 1.5rem !important; + } + + .mt-xl-5 { + margin-top: 3rem !important; + } + + .mt-xl-auto { + margin-top: auto !important; + } + + .me-xl-0 { + margin-left: 0 !important; + } + + .me-xl-1 { + margin-left: 0.25rem !important; + } + + .me-xl-2 { + margin-left: 0.5rem !important; + } + + .me-xl-3 { + margin-left: 1rem !important; + } + + .me-xl-4 { + margin-left: 1.5rem !important; + } + + .me-xl-5 { + margin-left: 3rem !important; + } + + .me-xl-auto { + margin-left: auto !important; + } + + .mb-xl-0 { + margin-bottom: 0 !important; + } + + .mb-xl-1 { + margin-bottom: 0.25rem !important; + } + + .mb-xl-2 { + margin-bottom: 0.5rem !important; + } + + .mb-xl-3 { + margin-bottom: 1rem !important; + } + + .mb-xl-4 { + margin-bottom: 1.5rem !important; + } + + .mb-xl-5 { + margin-bottom: 3rem !important; + } + + .mb-xl-auto { + margin-bottom: auto !important; + } + + .ms-xl-0 { + margin-right: 0 !important; + } + + .ms-xl-1 { + margin-right: 0.25rem !important; + } + + .ms-xl-2 { + margin-right: 0.5rem !important; + } + + .ms-xl-3 { + margin-right: 1rem !important; + } + + .ms-xl-4 { + margin-right: 1.5rem !important; + } + + .ms-xl-5 { + margin-right: 3rem !important; + } + + .ms-xl-auto { + margin-right: auto !important; + } + + .p-xl-0 { + padding: 0 !important; + } + + .p-xl-1 { + padding: 0.25rem !important; + } + + .p-xl-2 { + padding: 0.5rem !important; + } + + .p-xl-3 { + padding: 1rem !important; + } + + .p-xl-4 { + padding: 1.5rem !important; + } + + .p-xl-5 { + padding: 3rem !important; + } + + .px-xl-0 { + padding-left: 0 !important; + padding-right: 0 !important; + } + + .px-xl-1 { + padding-left: 0.25rem !important; + padding-right: 0.25rem !important; + } + + .px-xl-2 { + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; + } + + .px-xl-3 { + padding-left: 1rem !important; + padding-right: 1rem !important; + } + + .px-xl-4 { + padding-left: 1.5rem !important; + padding-right: 1.5rem !important; + } + + .px-xl-5 { + padding-left: 3rem !important; + padding-right: 3rem !important; + } + + .py-xl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .py-xl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .py-xl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .py-xl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .py-xl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .py-xl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .pt-xl-0 { + padding-top: 0 !important; + } + + .pt-xl-1 { + padding-top: 0.25rem !important; + } + + .pt-xl-2 { + padding-top: 0.5rem !important; + } + + .pt-xl-3 { + padding-top: 1rem !important; + } + + .pt-xl-4 { + padding-top: 1.5rem !important; + } + + .pt-xl-5 { + padding-top: 3rem !important; + } + + .pe-xl-0 { + padding-left: 0 !important; + } + + .pe-xl-1 { + padding-left: 0.25rem !important; + } + + .pe-xl-2 { + padding-left: 0.5rem !important; + } + + .pe-xl-3 { + padding-left: 1rem !important; + } + + .pe-xl-4 { + padding-left: 1.5rem !important; + } + + .pe-xl-5 { + padding-left: 3rem !important; + } + + .pb-xl-0 { + padding-bottom: 0 !important; + } + + .pb-xl-1 { + padding-bottom: 0.25rem !important; + } + + .pb-xl-2 { + padding-bottom: 0.5rem !important; + } + + .pb-xl-3 { + padding-bottom: 1rem !important; + } + + .pb-xl-4 { + padding-bottom: 1.5rem !important; + } + + .pb-xl-5 { + padding-bottom: 3rem !important; + } + + .ps-xl-0 { + padding-right: 0 !important; + } + + .ps-xl-1 { + padding-right: 0.25rem !important; + } + + .ps-xl-2 { + padding-right: 0.5rem !important; + } + + .ps-xl-3 { + padding-right: 1rem !important; + } + + .ps-xl-4 { + padding-right: 1.5rem !important; + } + + .ps-xl-5 { + padding-right: 3rem !important; + } +} +@media (min-width: 1400px) { + .d-xxl-inline { + display: inline !important; + } + + .d-xxl-inline-block { + display: inline-block !important; + } + + .d-xxl-block { + display: block !important; + } + + .d-xxl-grid { + display: grid !important; + } + + .d-xxl-table { + display: table !important; + } + + .d-xxl-table-row { + display: table-row !important; + } + + .d-xxl-table-cell { + display: table-cell !important; + } + + .d-xxl-flex { + display: flex !important; + } + + .d-xxl-inline-flex { + display: inline-flex !important; + } + + .d-xxl-none { + display: none !important; + } + + .flex-xxl-fill { + flex: 1 1 auto !important; + } + + .flex-xxl-row { + flex-direction: row !important; + } + + .flex-xxl-column { + flex-direction: column !important; + } + + .flex-xxl-row-reverse { + flex-direction: row-reverse !important; + } + + .flex-xxl-column-reverse { + flex-direction: column-reverse !important; + } + + .flex-xxl-grow-0 { + flex-grow: 0 !important; + } + + .flex-xxl-grow-1 { + flex-grow: 1 !important; + } + + .flex-xxl-shrink-0 { + flex-shrink: 0 !important; + } + + .flex-xxl-shrink-1 { + flex-shrink: 1 !important; + } + + .flex-xxl-wrap { + flex-wrap: wrap !important; + } + + .flex-xxl-nowrap { + flex-wrap: nowrap !important; + } + + .flex-xxl-wrap-reverse { + flex-wrap: wrap-reverse !important; + } + + .justify-content-xxl-start { + justify-content: flex-start !important; + } + + .justify-content-xxl-end { + justify-content: flex-end !important; + } + + .justify-content-xxl-center { + justify-content: center !important; + } + + .justify-content-xxl-between { + justify-content: space-between !important; + } + + .justify-content-xxl-around { + justify-content: space-around !important; + } + + .justify-content-xxl-evenly { + justify-content: space-evenly !important; + } + + .align-items-xxl-start { + align-items: flex-start !important; + } + + .align-items-xxl-end { + align-items: flex-end !important; + } + + .align-items-xxl-center { + align-items: center !important; + } + + .align-items-xxl-baseline { + align-items: baseline !important; + } + + .align-items-xxl-stretch { + align-items: stretch !important; + } + + .align-content-xxl-start { + align-content: flex-start !important; + } + + .align-content-xxl-end { + align-content: flex-end !important; + } + + .align-content-xxl-center { + align-content: center !important; + } + + .align-content-xxl-between { + align-content: space-between !important; + } + + .align-content-xxl-around { + align-content: space-around !important; + } + + .align-content-xxl-stretch { + align-content: stretch !important; + } + + .align-self-xxl-auto { + align-self: auto !important; + } + + .align-self-xxl-start { + align-self: flex-start !important; + } + + .align-self-xxl-end { + align-self: flex-end !important; + } + + .align-self-xxl-center { + align-self: center !important; + } + + .align-self-xxl-baseline { + align-self: baseline !important; + } + + .align-self-xxl-stretch { + align-self: stretch !important; + } + + .order-xxl-first { + order: -1 !important; + } + + .order-xxl-0 { + order: 0 !important; + } + + .order-xxl-1 { + order: 1 !important; + } + + .order-xxl-2 { + order: 2 !important; + } + + .order-xxl-3 { + order: 3 !important; + } + + .order-xxl-4 { + order: 4 !important; + } + + .order-xxl-5 { + order: 5 !important; + } + + .order-xxl-last { + order: 6 !important; + } + + .m-xxl-0 { + margin: 0 !important; + } + + .m-xxl-1 { + margin: 0.25rem !important; + } + + .m-xxl-2 { + margin: 0.5rem !important; + } + + .m-xxl-3 { + margin: 1rem !important; + } + + .m-xxl-4 { + margin: 1.5rem !important; + } + + .m-xxl-5 { + margin: 3rem !important; + } + + .m-xxl-auto { + margin: auto !important; + } + + .mx-xxl-0 { + margin-left: 0 !important; + margin-right: 0 !important; + } + + .mx-xxl-1 { + margin-left: 0.25rem !important; + margin-right: 0.25rem !important; + } + + .mx-xxl-2 { + margin-left: 0.5rem !important; + margin-right: 0.5rem !important; + } + + .mx-xxl-3 { + margin-left: 1rem !important; + margin-right: 1rem !important; + } + + .mx-xxl-4 { + margin-left: 1.5rem !important; + margin-right: 1.5rem !important; + } + + .mx-xxl-5 { + margin-left: 3rem !important; + margin-right: 3rem !important; + } + + .mx-xxl-auto { + margin-left: auto !important; + margin-right: auto !important; + } + + .my-xxl-0 { + margin-top: 0 !important; + margin-bottom: 0 !important; + } + + .my-xxl-1 { + margin-top: 0.25rem !important; + margin-bottom: 0.25rem !important; + } + + .my-xxl-2 { + margin-top: 0.5rem !important; + margin-bottom: 0.5rem !important; + } + + .my-xxl-3 { + margin-top: 1rem !important; + margin-bottom: 1rem !important; + } + + .my-xxl-4 { + margin-top: 1.5rem !important; + margin-bottom: 1.5rem !important; + } + + .my-xxl-5 { + margin-top: 3rem !important; + margin-bottom: 3rem !important; + } + + .my-xxl-auto { + margin-top: auto !important; + margin-bottom: auto !important; + } + + .mt-xxl-0 { + margin-top: 0 !important; + } + + .mt-xxl-1 { + margin-top: 0.25rem !important; + } + + .mt-xxl-2 { + margin-top: 0.5rem !important; + } + + .mt-xxl-3 { + margin-top: 1rem !important; + } + + .mt-xxl-4 { + margin-top: 1.5rem !important; + } + + .mt-xxl-5 { + margin-top: 3rem !important; + } + + .mt-xxl-auto { + margin-top: auto !important; + } + + .me-xxl-0 { + margin-left: 0 !important; + } + + .me-xxl-1 { + margin-left: 0.25rem !important; + } + + .me-xxl-2 { + margin-left: 0.5rem !important; + } + + .me-xxl-3 { + margin-left: 1rem !important; + } + + .me-xxl-4 { + margin-left: 1.5rem !important; + } + + .me-xxl-5 { + margin-left: 3rem !important; + } + + .me-xxl-auto { + margin-left: auto !important; + } + + .mb-xxl-0 { + margin-bottom: 0 !important; + } + + .mb-xxl-1 { + margin-bottom: 0.25rem !important; + } + + .mb-xxl-2 { + margin-bottom: 0.5rem !important; + } + + .mb-xxl-3 { + margin-bottom: 1rem !important; + } + + .mb-xxl-4 { + margin-bottom: 1.5rem !important; + } + + .mb-xxl-5 { + margin-bottom: 3rem !important; + } + + .mb-xxl-auto { + margin-bottom: auto !important; + } + + .ms-xxl-0 { + margin-right: 0 !important; + } + + .ms-xxl-1 { + margin-right: 0.25rem !important; + } + + .ms-xxl-2 { + margin-right: 0.5rem !important; + } + + .ms-xxl-3 { + margin-right: 1rem !important; + } + + .ms-xxl-4 { + margin-right: 1.5rem !important; + } + + .ms-xxl-5 { + margin-right: 3rem !important; + } + + .ms-xxl-auto { + margin-right: auto !important; + } + + .p-xxl-0 { + padding: 0 !important; + } + + .p-xxl-1 { + padding: 0.25rem !important; + } + + .p-xxl-2 { + padding: 0.5rem !important; + } + + .p-xxl-3 { + padding: 1rem !important; + } + + .p-xxl-4 { + padding: 1.5rem !important; + } + + .p-xxl-5 { + padding: 3rem !important; + } + + .px-xxl-0 { + padding-left: 0 !important; + padding-right: 0 !important; + } + + .px-xxl-1 { + padding-left: 0.25rem !important; + padding-right: 0.25rem !important; + } + + .px-xxl-2 { + padding-left: 0.5rem !important; + padding-right: 0.5rem !important; + } + + .px-xxl-3 { + padding-left: 1rem !important; + padding-right: 1rem !important; + } + + .px-xxl-4 { + padding-left: 1.5rem !important; + padding-right: 1.5rem !important; + } + + .px-xxl-5 { + padding-left: 3rem !important; + padding-right: 3rem !important; + } + + .py-xxl-0 { + padding-top: 0 !important; + padding-bottom: 0 !important; + } + + .py-xxl-1 { + padding-top: 0.25rem !important; + padding-bottom: 0.25rem !important; + } + + .py-xxl-2 { + padding-top: 0.5rem !important; + padding-bottom: 0.5rem !important; + } + + .py-xxl-3 { + padding-top: 1rem !important; + padding-bottom: 1rem !important; + } + + .py-xxl-4 { + padding-top: 1.5rem !important; + padding-bottom: 1.5rem !important; + } + + .py-xxl-5 { + padding-top: 3rem !important; + padding-bottom: 3rem !important; + } + + .pt-xxl-0 { + padding-top: 0 !important; + } + + .pt-xxl-1 { + padding-top: 0.25rem !important; + } + + .pt-xxl-2 { + padding-top: 0.5rem !important; + } + + .pt-xxl-3 { + padding-top: 1rem !important; + } + + .pt-xxl-4 { + padding-top: 1.5rem !important; + } + + .pt-xxl-5 { + padding-top: 3rem !important; + } + + .pe-xxl-0 { + padding-left: 0 !important; + } + + .pe-xxl-1 { + padding-left: 0.25rem !important; + } + + .pe-xxl-2 { + padding-left: 0.5rem !important; + } + + .pe-xxl-3 { + padding-left: 1rem !important; + } + + .pe-xxl-4 { + padding-left: 1.5rem !important; + } + + .pe-xxl-5 { + padding-left: 3rem !important; + } + + .pb-xxl-0 { + padding-bottom: 0 !important; + } + + .pb-xxl-1 { + padding-bottom: 0.25rem !important; + } + + .pb-xxl-2 { + padding-bottom: 0.5rem !important; + } + + .pb-xxl-3 { + padding-bottom: 1rem !important; + } + + .pb-xxl-4 { + padding-bottom: 1.5rem !important; + } + + .pb-xxl-5 { + padding-bottom: 3rem !important; + } + + .ps-xxl-0 { + padding-right: 0 !important; + } + + .ps-xxl-1 { + padding-right: 0.25rem !important; + } + + .ps-xxl-2 { + padding-right: 0.5rem !important; + } + + .ps-xxl-3 { + padding-right: 1rem !important; + } + + .ps-xxl-4 { + padding-right: 1.5rem !important; + } + + .ps-xxl-5 { + padding-right: 3rem !important; + } +} +@media print { + .d-print-inline { + display: inline !important; + } + + .d-print-inline-block { + display: inline-block !important; + } + + .d-print-block { + display: block !important; + } + + .d-print-grid { + display: grid !important; + } + + .d-print-table { + display: table !important; + } + + .d-print-table-row { + display: table-row !important; + } + + .d-print-table-cell { + display: table-cell !important; + } + + .d-print-flex { + display: flex !important; + } + + .d-print-inline-flex { + display: inline-flex !important; + } + + .d-print-none { + display: none !important; + } +} +/*# sourceMappingURL=bootstrap-grid.rtl.css.map */ \ No newline at end of file diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map new file mode 100644 index 0000000..33f5c3b --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../scss/bootstrap-grid.scss","../../scss/_containers.scss","../../scss/mixins/_container.scss","bootstrap-grid.css","../../scss/mixins/_breakpoints.scss","../../scss/_variables.scss","../../scss/_grid.scss","../../scss/mixins/_grid.scss","../../scss/mixins/_utilities.scss","../../scss/utilities/_api.scss"],"names":[],"mappings":"AAAA;;;;;EAAA;ACME;;;;;;;ECHA,WAAA;EACA,yCAAA;EACA,0CAAA;EACA,iBAAA;EACA,kBAAA;ACWF;;AC6CI;EH5CE;IACE,gBIuce;EFpcrB;AACF;ACuCI;EH5CE;IACE,gBIuce;EF/brB;AACF;ACkCI;EH5CE;IACE,gBIuce;EF1brB;AACF;AC6BI;EH5CE;IACE,iBIuce;EFrbrB;AACF;ACwBI;EH5CE;IACE,iBIuce;EFhbrB;AACF;AGvCE;ECAA,qBAAA;EACA,gBAAA;EACA,aAAA;EACA,eAAA;EACA,yCAAA;EACA,2CAAA;EACA,4CAAA;AJ0CF;AG7CI;ECQF,sBAAA;EAIA,cAAA;EACA,WAAA;EACA,eAAA;EACA,2CAAA;EACA,4CAAA;EACA,8BAAA;AJqCF;;AIUM;EACE,YAAA;AJPR;;AIUM;EApCJ,cAAA;EACA,WAAA;AJ8BF;;AIhBE;EACE,cAAA;EACA,WAAA;AJmBJ;;AIrBE;EACE,cAAA;EACA,UAAA;AJwBJ;;AI1BE;EACE,cAAA;EACA,qBAAA;AJ6BJ;;AI/BE;EACE,cAAA;EACA,UAAA;AJkCJ;;AIpCE;EACE,cAAA;EACA,UAAA;AJuCJ;;AIzCE;EACE,cAAA;EACA,qBAAA;AJ4CJ;;AIbM;EAhDJ,cAAA;EACA,WAAA;AJiEF;;AIZU;EAhEN,cAAA;EACA,kBAAA;AJgFJ;;AIjBU;EAhEN,cAAA;EACA,mBAAA;AJqFJ;;AItBU;EAhEN,cAAA;EACA,UAAA;AJ0FJ;;AI3BU;EAhEN,cAAA;EACA,mBAAA;AJ+FJ;;AIhCU;EAhEN,cAAA;EACA,mBAAA;AJoGJ;;AIrCU;EAhEN,cAAA;EACA,UAAA;AJyGJ;;AI1CU;EAhEN,cAAA;EACA,mBAAA;AJ8GJ;;AI/CU;EAhEN,cAAA;EACA,mBAAA;AJmHJ;;AIpDU;EAhEN,cAAA;EACA,UAAA;AJwHJ;;AIzDU;EAhEN,cAAA;EACA,mBAAA;AJ6HJ;;AI9DU;EAhEN,cAAA;EACA,mBAAA;AJkIJ;;AInEU;EAhEN,cAAA;EACA,WAAA;AJuIJ;;AIhEY;EAxDV,yBAAA;AJ4HF;;AIpEY;EAxDV,0BAAA;AJgIF;;AIxEY;EAxDV,iBAAA;AJoIF;;AI5EY;EAxDV,0BAAA;AJwIF;;AIhFY;EAxDV,0BAAA;AJ4IF;;AIpFY;EAxDV,iBAAA;AJgJF;;AIxFY;EAxDV,0BAAA;AJoJF;;AI5FY;EAxDV,0BAAA;AJwJF;;AIhGY;EAxDV,iBAAA;AJ4JF;;AIpGY;EAxDV,0BAAA;AJgKF;;AIxGY;EAxDV,0BAAA;AJoKF;;AIjGQ;;EAEE,gBAAA;AJoGV;;AIjGQ;;EAEE,gBAAA;AJoGV;;AI3GQ;;EAEE,sBAAA;AJ8GV;;AI3GQ;;EAEE,sBAAA;AJ8GV;;AIrHQ;;EAEE,qBAAA;AJwHV;;AIrHQ;;EAEE,qBAAA;AJwHV;;AI/HQ;;EAEE,mBAAA;AJkIV;;AI/HQ;;EAEE,mBAAA;AJkIV;;AIzIQ;;EAEE,qBAAA;AJ4IV;;AIzIQ;;EAEE,qBAAA;AJ4IV;;AInJQ;;EAEE,mBAAA;AJsJV;;AInJQ;;EAEE,mBAAA;AJsJV;;AC/MI;EGSE;IACE,YAAA;EJ0MN;;EIvMI;IApCJ,cAAA;IACA,WAAA;EJ+OA;;EIjOA;IACE,cAAA;IACA,WAAA;EJoOF;;EItOA;IACE,cAAA;IACA,UAAA;EJyOF;;EI3OA;IACE,cAAA;IACA,qBAAA;EJ8OF;;EIhPA;IACE,cAAA;IACA,UAAA;EJmPF;;EIrPA;IACE,cAAA;IACA,UAAA;EJwPF;;EI1PA;IACE,cAAA;IACA,qBAAA;EJ6PF;;EI9NI;IAhDJ,cAAA;IACA,WAAA;EJkRA;;EI7NQ;IAhEN,cAAA;IACA,kBAAA;EJiSF;;EIlOQ;IAhEN,cAAA;IACA,mBAAA;EJsSF;;EIvOQ;IAhEN,cAAA;IACA,UAAA;EJ2SF;;EI5OQ;IAhEN,cAAA;IACA,mBAAA;EJgTF;;EIjPQ;IAhEN,cAAA;IACA,mBAAA;EJqTF;;EItPQ;IAhEN,cAAA;IACA,UAAA;EJ0TF;;EI3PQ;IAhEN,cAAA;IACA,mBAAA;EJ+TF;;EIhQQ;IAhEN,cAAA;IACA,mBAAA;EJoUF;;EIrQQ;IAhEN,cAAA;IACA,UAAA;EJyUF;;EI1QQ;IAhEN,cAAA;IACA,mBAAA;EJ8UF;;EI/QQ;IAhEN,cAAA;IACA,mBAAA;EJmVF;;EIpRQ;IAhEN,cAAA;IACA,WAAA;EJwVF;;EIjRU;IAxDV,eAAA;EJ6UA;;EIrRU;IAxDV,yBAAA;EJiVA;;EIzRU;IAxDV,0BAAA;EJqVA;;EI7RU;IAxDV,iBAAA;EJyVA;;EIjSU;IAxDV,0BAAA;EJ6VA;;EIrSU;IAxDV,0BAAA;EJiWA;;EIzSU;IAxDV,iBAAA;EJqWA;;EI7SU;IAxDV,0BAAA;EJyWA;;EIjTU;IAxDV,0BAAA;EJ6WA;;EIrTU;IAxDV,iBAAA;EJiXA;;EIzTU;IAxDV,0BAAA;EJqXA;;EI7TU;IAxDV,0BAAA;EJyXA;;EItTM;;IAEE,gBAAA;EJyTR;;EItTM;;IAEE,gBAAA;EJyTR;;EIhUM;;IAEE,sBAAA;EJmUR;;EIhUM;;IAEE,sBAAA;EJmUR;;EI1UM;;IAEE,qBAAA;EJ6UR;;EI1UM;;IAEE,qBAAA;EJ6UR;;EIpVM;;IAEE,mBAAA;EJuVR;;EIpVM;;IAEE,mBAAA;EJuVR;;EI9VM;;IAEE,qBAAA;EJiWR;;EI9VM;;IAEE,qBAAA;EJiWR;;EIxWM;;IAEE,mBAAA;EJ2WR;;EIxWM;;IAEE,mBAAA;EJ2WR;AACF;ACraI;EGSE;IACE,YAAA;EJ+ZN;;EI5ZI;IApCJ,cAAA;IACA,WAAA;EJocA;;EItbA;IACE,cAAA;IACA,WAAA;EJybF;;EI3bA;IACE,cAAA;IACA,UAAA;EJ8bF;;EIhcA;IACE,cAAA;IACA,qBAAA;EJmcF;;EIrcA;IACE,cAAA;IACA,UAAA;EJwcF;;EI1cA;IACE,cAAA;IACA,UAAA;EJ6cF;;EI/cA;IACE,cAAA;IACA,qBAAA;EJkdF;;EInbI;IAhDJ,cAAA;IACA,WAAA;EJueA;;EIlbQ;IAhEN,cAAA;IACA,kBAAA;EJsfF;;EIvbQ;IAhEN,cAAA;IACA,mBAAA;EJ2fF;;EI5bQ;IAhEN,cAAA;IACA,UAAA;EJggBF;;EIjcQ;IAhEN,cAAA;IACA,mBAAA;EJqgBF;;EItcQ;IAhEN,cAAA;IACA,mBAAA;EJ0gBF;;EI3cQ;IAhEN,cAAA;IACA,UAAA;EJ+gBF;;EIhdQ;IAhEN,cAAA;IACA,mBAAA;EJohBF;;EIrdQ;IAhEN,cAAA;IACA,mBAAA;EJyhBF;;EI1dQ;IAhEN,cAAA;IACA,UAAA;EJ8hBF;;EI/dQ;IAhEN,cAAA;IACA,mBAAA;EJmiBF;;EIpeQ;IAhEN,cAAA;IACA,mBAAA;EJwiBF;;EIzeQ;IAhEN,cAAA;IACA,WAAA;EJ6iBF;;EIteU;IAxDV,eAAA;EJkiBA;;EI1eU;IAxDV,yBAAA;EJsiBA;;EI9eU;IAxDV,0BAAA;EJ0iBA;;EIlfU;IAxDV,iBAAA;EJ8iBA;;EItfU;IAxDV,0BAAA;EJkjBA;;EI1fU;IAxDV,0BAAA;EJsjBA;;EI9fU;IAxDV,iBAAA;EJ0jBA;;EIlgBU;IAxDV,0BAAA;EJ8jBA;;EItgBU;IAxDV,0BAAA;EJkkBA;;EI1gBU;IAxDV,iBAAA;EJskBA;;EI9gBU;IAxDV,0BAAA;EJ0kBA;;EIlhBU;IAxDV,0BAAA;EJ8kBA;;EI3gBM;;IAEE,gBAAA;EJ8gBR;;EI3gBM;;IAEE,gBAAA;EJ8gBR;;EIrhBM;;IAEE,sBAAA;EJwhBR;;EIrhBM;;IAEE,sBAAA;EJwhBR;;EI/hBM;;IAEE,qBAAA;EJkiBR;;EI/hBM;;IAEE,qBAAA;EJkiBR;;EIziBM;;IAEE,mBAAA;EJ4iBR;;EIziBM;;IAEE,mBAAA;EJ4iBR;;EInjBM;;IAEE,qBAAA;EJsjBR;;EInjBM;;IAEE,qBAAA;EJsjBR;;EI7jBM;;IAEE,mBAAA;EJgkBR;;EI7jBM;;IAEE,mBAAA;EJgkBR;AACF;AC1nBI;EGSE;IACE,YAAA;EJonBN;;EIjnBI;IApCJ,cAAA;IACA,WAAA;EJypBA;;EI3oBA;IACE,cAAA;IACA,WAAA;EJ8oBF;;EIhpBA;IACE,cAAA;IACA,UAAA;EJmpBF;;EIrpBA;IACE,cAAA;IACA,qBAAA;EJwpBF;;EI1pBA;IACE,cAAA;IACA,UAAA;EJ6pBF;;EI/pBA;IACE,cAAA;IACA,UAAA;EJkqBF;;EIpqBA;IACE,cAAA;IACA,qBAAA;EJuqBF;;EIxoBI;IAhDJ,cAAA;IACA,WAAA;EJ4rBA;;EIvoBQ;IAhEN,cAAA;IACA,kBAAA;EJ2sBF;;EI5oBQ;IAhEN,cAAA;IACA,mBAAA;EJgtBF;;EIjpBQ;IAhEN,cAAA;IACA,UAAA;EJqtBF;;EItpBQ;IAhEN,cAAA;IACA,mBAAA;EJ0tBF;;EI3pBQ;IAhEN,cAAA;IACA,mBAAA;EJ+tBF;;EIhqBQ;IAhEN,cAAA;IACA,UAAA;EJouBF;;EIrqBQ;IAhEN,cAAA;IACA,mBAAA;EJyuBF;;EI1qBQ;IAhEN,cAAA;IACA,mBAAA;EJ8uBF;;EI/qBQ;IAhEN,cAAA;IACA,UAAA;EJmvBF;;EIprBQ;IAhEN,cAAA;IACA,mBAAA;EJwvBF;;EIzrBQ;IAhEN,cAAA;IACA,mBAAA;EJ6vBF;;EI9rBQ;IAhEN,cAAA;IACA,WAAA;EJkwBF;;EI3rBU;IAxDV,eAAA;EJuvBA;;EI/rBU;IAxDV,yBAAA;EJ2vBA;;EInsBU;IAxDV,0BAAA;EJ+vBA;;EIvsBU;IAxDV,iBAAA;EJmwBA;;EI3sBU;IAxDV,0BAAA;EJuwBA;;EI/sBU;IAxDV,0BAAA;EJ2wBA;;EIntBU;IAxDV,iBAAA;EJ+wBA;;EIvtBU;IAxDV,0BAAA;EJmxBA;;EI3tBU;IAxDV,0BAAA;EJuxBA;;EI/tBU;IAxDV,iBAAA;EJ2xBA;;EInuBU;IAxDV,0BAAA;EJ+xBA;;EIvuBU;IAxDV,0BAAA;EJmyBA;;EIhuBM;;IAEE,gBAAA;EJmuBR;;EIhuBM;;IAEE,gBAAA;EJmuBR;;EI1uBM;;IAEE,sBAAA;EJ6uBR;;EI1uBM;;IAEE,sBAAA;EJ6uBR;;EIpvBM;;IAEE,qBAAA;EJuvBR;;EIpvBM;;IAEE,qBAAA;EJuvBR;;EI9vBM;;IAEE,mBAAA;EJiwBR;;EI9vBM;;IAEE,mBAAA;EJiwBR;;EIxwBM;;IAEE,qBAAA;EJ2wBR;;EIxwBM;;IAEE,qBAAA;EJ2wBR;;EIlxBM;;IAEE,mBAAA;EJqxBR;;EIlxBM;;IAEE,mBAAA;EJqxBR;AACF;AC/0BI;EGSE;IACE,YAAA;EJy0BN;;EIt0BI;IApCJ,cAAA;IACA,WAAA;EJ82BA;;EIh2BA;IACE,cAAA;IACA,WAAA;EJm2BF;;EIr2BA;IACE,cAAA;IACA,UAAA;EJw2BF;;EI12BA;IACE,cAAA;IACA,qBAAA;EJ62BF;;EI/2BA;IACE,cAAA;IACA,UAAA;EJk3BF;;EIp3BA;IACE,cAAA;IACA,UAAA;EJu3BF;;EIz3BA;IACE,cAAA;IACA,qBAAA;EJ43BF;;EI71BI;IAhDJ,cAAA;IACA,WAAA;EJi5BA;;EI51BQ;IAhEN,cAAA;IACA,kBAAA;EJg6BF;;EIj2BQ;IAhEN,cAAA;IACA,mBAAA;EJq6BF;;EIt2BQ;IAhEN,cAAA;IACA,UAAA;EJ06BF;;EI32BQ;IAhEN,cAAA;IACA,mBAAA;EJ+6BF;;EIh3BQ;IAhEN,cAAA;IACA,mBAAA;EJo7BF;;EIr3BQ;IAhEN,cAAA;IACA,UAAA;EJy7BF;;EI13BQ;IAhEN,cAAA;IACA,mBAAA;EJ87BF;;EI/3BQ;IAhEN,cAAA;IACA,mBAAA;EJm8BF;;EIp4BQ;IAhEN,cAAA;IACA,UAAA;EJw8BF;;EIz4BQ;IAhEN,cAAA;IACA,mBAAA;EJ68BF;;EI94BQ;IAhEN,cAAA;IACA,mBAAA;EJk9BF;;EIn5BQ;IAhEN,cAAA;IACA,WAAA;EJu9BF;;EIh5BU;IAxDV,eAAA;EJ48BA;;EIp5BU;IAxDV,yBAAA;EJg9BA;;EIx5BU;IAxDV,0BAAA;EJo9BA;;EI55BU;IAxDV,iBAAA;EJw9BA;;EIh6BU;IAxDV,0BAAA;EJ49BA;;EIp6BU;IAxDV,0BAAA;EJg+BA;;EIx6BU;IAxDV,iBAAA;EJo+BA;;EI56BU;IAxDV,0BAAA;EJw+BA;;EIh7BU;IAxDV,0BAAA;EJ4+BA;;EIp7BU;IAxDV,iBAAA;EJg/BA;;EIx7BU;IAxDV,0BAAA;EJo/BA;;EI57BU;IAxDV,0BAAA;EJw/BA;;EIr7BM;;IAEE,gBAAA;EJw7BR;;EIr7BM;;IAEE,gBAAA;EJw7BR;;EI/7BM;;IAEE,sBAAA;EJk8BR;;EI/7BM;;IAEE,sBAAA;EJk8BR;;EIz8BM;;IAEE,qBAAA;EJ48BR;;EIz8BM;;IAEE,qBAAA;EJ48BR;;EIn9BM;;IAEE,mBAAA;EJs9BR;;EIn9BM;;IAEE,mBAAA;EJs9BR;;EI79BM;;IAEE,qBAAA;EJg+BR;;EI79BM;;IAEE,qBAAA;EJg+BR;;EIv+BM;;IAEE,mBAAA;EJ0+BR;;EIv+BM;;IAEE,mBAAA;EJ0+BR;AACF;ACpiCI;EGSE;IACE,YAAA;EJ8hCN;;EI3hCI;IApCJ,cAAA;IACA,WAAA;EJmkCA;;EIrjCA;IACE,cAAA;IACA,WAAA;EJwjCF;;EI1jCA;IACE,cAAA;IACA,UAAA;EJ6jCF;;EI/jCA;IACE,cAAA;IACA,qBAAA;EJkkCF;;EIpkCA;IACE,cAAA;IACA,UAAA;EJukCF;;EIzkCA;IACE,cAAA;IACA,UAAA;EJ4kCF;;EI9kCA;IACE,cAAA;IACA,qBAAA;EJilCF;;EIljCI;IAhDJ,cAAA;IACA,WAAA;EJsmCA;;EIjjCQ;IAhEN,cAAA;IACA,kBAAA;EJqnCF;;EItjCQ;IAhEN,cAAA;IACA,mBAAA;EJ0nCF;;EI3jCQ;IAhEN,cAAA;IACA,UAAA;EJ+nCF;;EIhkCQ;IAhEN,cAAA;IACA,mBAAA;EJooCF;;EIrkCQ;IAhEN,cAAA;IACA,mBAAA;EJyoCF;;EI1kCQ;IAhEN,cAAA;IACA,UAAA;EJ8oCF;;EI/kCQ;IAhEN,cAAA;IACA,mBAAA;EJmpCF;;EIplCQ;IAhEN,cAAA;IACA,mBAAA;EJwpCF;;EIzlCQ;IAhEN,cAAA;IACA,UAAA;EJ6pCF;;EI9lCQ;IAhEN,cAAA;IACA,mBAAA;EJkqCF;;EInmCQ;IAhEN,cAAA;IACA,mBAAA;EJuqCF;;EIxmCQ;IAhEN,cAAA;IACA,WAAA;EJ4qCF;;EIrmCU;IAxDV,eAAA;EJiqCA;;EIzmCU;IAxDV,yBAAA;EJqqCA;;EI7mCU;IAxDV,0BAAA;EJyqCA;;EIjnCU;IAxDV,iBAAA;EJ6qCA;;EIrnCU;IAxDV,0BAAA;EJirCA;;EIznCU;IAxDV,0BAAA;EJqrCA;;EI7nCU;IAxDV,iBAAA;EJyrCA;;EIjoCU;IAxDV,0BAAA;EJ6rCA;;EIroCU;IAxDV,0BAAA;EJisCA;;EIzoCU;IAxDV,iBAAA;EJqsCA;;EI7oCU;IAxDV,0BAAA;EJysCA;;EIjpCU;IAxDV,0BAAA;EJ6sCA;;EI1oCM;;IAEE,gBAAA;EJ6oCR;;EI1oCM;;IAEE,gBAAA;EJ6oCR;;EIppCM;;IAEE,sBAAA;EJupCR;;EIppCM;;IAEE,sBAAA;EJupCR;;EI9pCM;;IAEE,qBAAA;EJiqCR;;EI9pCM;;IAEE,qBAAA;EJiqCR;;EIxqCM;;IAEE,mBAAA;EJ2qCR;;EIxqCM;;IAEE,mBAAA;EJ2qCR;;EIlrCM;;IAEE,qBAAA;EJqrCR;;EIlrCM;;IAEE,qBAAA;EJqrCR;;EI5rCM;;IAEE,mBAAA;EJ+rCR;;EI5rCM;;IAEE,mBAAA;EJ+rCR;AACF;AKzvCQ;EAOI,0BAAA;ALqvCZ;;AK5vCQ;EAOI,gCAAA;ALyvCZ;;AKhwCQ;EAOI,yBAAA;AL6vCZ;;AKpwCQ;EAOI,wBAAA;ALiwCZ;;AKxwCQ;EAOI,yBAAA;ALqwCZ;;AK5wCQ;EAOI,6BAAA;ALywCZ;;AKhxCQ;EAOI,8BAAA;AL6wCZ;;AKpxCQ;EAOI,wBAAA;ALixCZ;;AKxxCQ;EAOI,+BAAA;ALqxCZ;;AK5xCQ;EAOI,wBAAA;ALyxCZ;;AKhyCQ;EAOI,yBAAA;AL6xCZ;;AKpyCQ;EAOI,8BAAA;ALiyCZ;;AKxyCQ;EAOI,iCAAA;ALqyCZ;;AK5yCQ;EAOI,sCAAA;ALyyCZ;;AKhzCQ;EAOI,yCAAA;AL6yCZ;;AKpzCQ;EAOI,uBAAA;ALizCZ;;AKxzCQ;EAOI,uBAAA;ALqzCZ;;AK5zCQ;EAOI,yBAAA;ALyzCZ;;AKh0CQ;EAOI,yBAAA;AL6zCZ;;AKp0CQ;EAOI,0BAAA;ALi0CZ;;AKx0CQ;EAOI,4BAAA;ALq0CZ;;AK50CQ;EAOI,kCAAA;ALy0CZ;;AKh1CQ;EAOI,sCAAA;AL60CZ;;AKp1CQ;EAOI,oCAAA;ALi1CZ;;AKx1CQ;EAOI,kCAAA;ALq1CZ;;AK51CQ;EAOI,yCAAA;ALy1CZ;;AKh2CQ;EAOI,wCAAA;AL61CZ;;AKp2CQ;EAOI,wCAAA;ALi2CZ;;AKx2CQ;EAOI,kCAAA;ALq2CZ;;AK52CQ;EAOI,gCAAA;ALy2CZ;;AKh3CQ;EAOI,8BAAA;AL62CZ;;AKp3CQ;EAOI,gCAAA;ALi3CZ;;AKx3CQ;EAOI,+BAAA;ALq3CZ;;AK53CQ;EAOI,oCAAA;ALy3CZ;;AKh4CQ;EAOI,kCAAA;AL63CZ;;AKp4CQ;EAOI,gCAAA;ALi4CZ;;AKx4CQ;EAOI,uCAAA;ALq4CZ;;AK54CQ;EAOI,sCAAA;ALy4CZ;;AKh5CQ;EAOI,iCAAA;AL64CZ;;AKp5CQ;EAOI,2BAAA;ALi5CZ;;AKx5CQ;EAOI,iCAAA;ALq5CZ;;AK55CQ;EAOI,+BAAA;ALy5CZ;;AKh6CQ;EAOI,6BAAA;AL65CZ;;AKp6CQ;EAOI,+BAAA;ALi6CZ;;AKx6CQ;EAOI,8BAAA;ALq6CZ;;AK56CQ;EAOI,oBAAA;ALy6CZ;;AKh7CQ;EAOI,mBAAA;AL66CZ;;AKp7CQ;EAOI,mBAAA;ALi7CZ;;AKx7CQ;EAOI,mBAAA;ALq7CZ;;AK57CQ;EAOI,mBAAA;ALy7CZ;;AKh8CQ;EAOI,mBAAA;AL67CZ;;AKp8CQ;EAOI,mBAAA;ALi8CZ;;AKx8CQ;EAOI,mBAAA;ALq8CZ;;AK58CQ;EAOI,oBAAA;ALy8CZ;;AKh9CQ;EAOI,0BAAA;AL68CZ;;AKp9CQ;EAOI,yBAAA;ALi9CZ;;AKx9CQ;EAOI,uBAAA;ALq9CZ;;AK59CQ;EAOI,yBAAA;ALy9CZ;;AKh+CQ;EAOI,uBAAA;AL69CZ;;AKp+CQ;EAOI,uBAAA;ALi+CZ;;AKx+CQ;EAOI,yBAAA;EAAA,0BAAA;ALs+CZ;;AK7+CQ;EAOI,+BAAA;EAAA,gCAAA;AL2+CZ;;AKl/CQ;EAOI,8BAAA;EAAA,+BAAA;ALg/CZ;;AKv/CQ;EAOI,4BAAA;EAAA,6BAAA;ALq/CZ;;AK5/CQ;EAOI,8BAAA;EAAA,+BAAA;AL0/CZ;;AKjgDQ;EAOI,4BAAA;EAAA,6BAAA;AL+/CZ;;AKtgDQ;EAOI,4BAAA;EAAA,6BAAA;ALogDZ;;AK3gDQ;EAOI,wBAAA;EAAA,2BAAA;ALygDZ;;AKhhDQ;EAOI,8BAAA;EAAA,iCAAA;AL8gDZ;;AKrhDQ;EAOI,6BAAA;EAAA,gCAAA;ALmhDZ;;AK1hDQ;EAOI,2BAAA;EAAA,8BAAA;ALwhDZ;;AK/hDQ;EAOI,6BAAA;EAAA,gCAAA;AL6hDZ;;AKpiDQ;EAOI,2BAAA;EAAA,8BAAA;ALkiDZ;;AKziDQ;EAOI,2BAAA;EAAA,8BAAA;ALuiDZ;;AK9iDQ;EAOI,wBAAA;AL2iDZ;;AKljDQ;EAOI,8BAAA;AL+iDZ;;AKtjDQ;EAOI,6BAAA;ALmjDZ;;AK1jDQ;EAOI,2BAAA;ALujDZ;;AK9jDQ;EAOI,6BAAA;AL2jDZ;;AKlkDQ;EAOI,2BAAA;AL+jDZ;;AKtkDQ;EAOI,2BAAA;ALmkDZ;;AK1kDQ;EAOI,yBAAA;ALukDZ;;AK9kDQ;EAOI,+BAAA;AL2kDZ;;AKllDQ;EAOI,8BAAA;AL+kDZ;;AKtlDQ;EAOI,4BAAA;ALmlDZ;;AK1lDQ;EAOI,8BAAA;ALulDZ;;AK9lDQ;EAOI,4BAAA;AL2lDZ;;AKlmDQ;EAOI,4BAAA;AL+lDZ;;AKtmDQ;EAOI,2BAAA;ALmmDZ;;AK1mDQ;EAOI,iCAAA;ALumDZ;;AK9mDQ;EAOI,gCAAA;AL2mDZ;;AKlnDQ;EAOI,8BAAA;AL+mDZ;;AKtnDQ;EAOI,gCAAA;ALmnDZ;;AK1nDQ;EAOI,8BAAA;ALunDZ;;AK9nDQ;EAOI,8BAAA;AL2nDZ;;AKloDQ;EAOI,0BAAA;AL+nDZ;;AKtoDQ;EAOI,gCAAA;ALmoDZ;;AK1oDQ;EAOI,+BAAA;ALuoDZ;;AK9oDQ;EAOI,6BAAA;AL2oDZ;;AKlpDQ;EAOI,+BAAA;AL+oDZ;;AKtpDQ;EAOI,6BAAA;ALmpDZ;;AK1pDQ;EAOI,6BAAA;ALupDZ;;AK9pDQ;EAOI,qBAAA;AL2pDZ;;AKlqDQ;EAOI,2BAAA;AL+pDZ;;AKtqDQ;EAOI,0BAAA;ALmqDZ;;AK1qDQ;EAOI,wBAAA;ALuqDZ;;AK9qDQ;EAOI,0BAAA;AL2qDZ;;AKlrDQ;EAOI,wBAAA;AL+qDZ;;AKtrDQ;EAOI,0BAAA;EAAA,2BAAA;ALorDZ;;AK3rDQ;EAOI,gCAAA;EAAA,iCAAA;ALyrDZ;;AKhsDQ;EAOI,+BAAA;EAAA,gCAAA;AL8rDZ;;AKrsDQ;EAOI,6BAAA;EAAA,8BAAA;ALmsDZ;;AK1sDQ;EAOI,+BAAA;EAAA,gCAAA;ALwsDZ;;AK/sDQ;EAOI,6BAAA;EAAA,8BAAA;AL6sDZ;;AKptDQ;EAOI,yBAAA;EAAA,4BAAA;ALktDZ;;AKztDQ;EAOI,+BAAA;EAAA,kCAAA;ALutDZ;;AK9tDQ;EAOI,8BAAA;EAAA,iCAAA;AL4tDZ;;AKnuDQ;EAOI,4BAAA;EAAA,+BAAA;ALiuDZ;;AKxuDQ;EAOI,8BAAA;EAAA,iCAAA;ALsuDZ;;AK7uDQ;EAOI,4BAAA;EAAA,+BAAA;AL2uDZ;;AKlvDQ;EAOI,yBAAA;AL+uDZ;;AKtvDQ;EAOI,+BAAA;ALmvDZ;;AK1vDQ;EAOI,8BAAA;ALuvDZ;;AK9vDQ;EAOI,4BAAA;AL2vDZ;;AKlwDQ;EAOI,8BAAA;AL+vDZ;;AKtwDQ;EAOI,4BAAA;ALmwDZ;;AK1wDQ;EAOI,0BAAA;ALuwDZ;;AK9wDQ;EAOI,gCAAA;AL2wDZ;;AKlxDQ;EAOI,+BAAA;AL+wDZ;;AKtxDQ;EAOI,6BAAA;ALmxDZ;;AK1xDQ;EAOI,+BAAA;ALuxDZ;;AK9xDQ;EAOI,6BAAA;AL2xDZ;;AKlyDQ;EAOI,4BAAA;AL+xDZ;;AKtyDQ;EAOI,kCAAA;ALmyDZ;;AK1yDQ;EAOI,iCAAA;ALuyDZ;;AK9yDQ;EAOI,+BAAA;AL2yDZ;;AKlzDQ;EAOI,iCAAA;AL+yDZ;;AKtzDQ;EAOI,+BAAA;ALmzDZ;;AK1zDQ;EAOI,2BAAA;ALuzDZ;;AK9zDQ;EAOI,iCAAA;AL2zDZ;;AKl0DQ;EAOI,gCAAA;AL+zDZ;;AKt0DQ;EAOI,8BAAA;ALm0DZ;;AK10DQ;EAOI,gCAAA;ALu0DZ;;AK90DQ;EAOI,8BAAA;AL20DZ;;ACl1DI;EIAI;IAOI,0BAAA;ELg1DV;;EKv1DM;IAOI,gCAAA;ELo1DV;;EK31DM;IAOI,yBAAA;ELw1DV;;EK/1DM;IAOI,wBAAA;EL41DV;;EKn2DM;IAOI,yBAAA;ELg2DV;;EKv2DM;IAOI,6BAAA;ELo2DV;;EK32DM;IAOI,8BAAA;ELw2DV;;EK/2DM;IAOI,wBAAA;EL42DV;;EKn3DM;IAOI,+BAAA;ELg3DV;;EKv3DM;IAOI,wBAAA;ELo3DV;;EK33DM;IAOI,yBAAA;ELw3DV;;EK/3DM;IAOI,8BAAA;EL43DV;;EKn4DM;IAOI,iCAAA;ELg4DV;;EKv4DM;IAOI,sCAAA;ELo4DV;;EK34DM;IAOI,yCAAA;ELw4DV;;EK/4DM;IAOI,uBAAA;EL44DV;;EKn5DM;IAOI,uBAAA;ELg5DV;;EKv5DM;IAOI,yBAAA;ELo5DV;;EK35DM;IAOI,yBAAA;ELw5DV;;EK/5DM;IAOI,0BAAA;EL45DV;;EKn6DM;IAOI,4BAAA;ELg6DV;;EKv6DM;IAOI,kCAAA;ELo6DV;;EK36DM;IAOI,sCAAA;ELw6DV;;EK/6DM;IAOI,oCAAA;EL46DV;;EKn7DM;IAOI,kCAAA;ELg7DV;;EKv7DM;IAOI,yCAAA;ELo7DV;;EK37DM;IAOI,wCAAA;ELw7DV;;EK/7DM;IAOI,wCAAA;EL47DV;;EKn8DM;IAOI,kCAAA;ELg8DV;;EKv8DM;IAOI,gCAAA;ELo8DV;;EK38DM;IAOI,8BAAA;ELw8DV;;EK/8DM;IAOI,gCAAA;EL48DV;;EKn9DM;IAOI,+BAAA;ELg9DV;;EKv9DM;IAOI,oCAAA;ELo9DV;;EK39DM;IAOI,kCAAA;ELw9DV;;EK/9DM;IAOI,gCAAA;EL49DV;;EKn+DM;IAOI,uCAAA;ELg+DV;;EKv+DM;IAOI,sCAAA;ELo+DV;;EK3+DM;IAOI,iCAAA;ELw+DV;;EK/+DM;IAOI,2BAAA;EL4+DV;;EKn/DM;IAOI,iCAAA;ELg/DV;;EKv/DM;IAOI,+BAAA;ELo/DV;;EK3/DM;IAOI,6BAAA;ELw/DV;;EK//DM;IAOI,+BAAA;EL4/DV;;EKngEM;IAOI,8BAAA;ELggEV;;EKvgEM;IAOI,oBAAA;ELogEV;;EK3gEM;IAOI,mBAAA;ELwgEV;;EK/gEM;IAOI,mBAAA;EL4gEV;;EKnhEM;IAOI,mBAAA;ELghEV;;EKvhEM;IAOI,mBAAA;ELohEV;;EK3hEM;IAOI,mBAAA;ELwhEV;;EK/hEM;IAOI,mBAAA;EL4hEV;;EKniEM;IAOI,mBAAA;ELgiEV;;EKviEM;IAOI,oBAAA;ELoiEV;;EK3iEM;IAOI,0BAAA;ELwiEV;;EK/iEM;IAOI,yBAAA;EL4iEV;;EKnjEM;IAOI,uBAAA;ELgjEV;;EKvjEM;IAOI,yBAAA;ELojEV;;EK3jEM;IAOI,uBAAA;ELwjEV;;EK/jEM;IAOI,uBAAA;EL4jEV;;EKnkEM;IAOI,yBAAA;IAAA,0BAAA;ELikEV;;EKxkEM;IAOI,+BAAA;IAAA,gCAAA;ELskEV;;EK7kEM;IAOI,8BAAA;IAAA,+BAAA;EL2kEV;;EKllEM;IAOI,4BAAA;IAAA,6BAAA;ELglEV;;EKvlEM;IAOI,8BAAA;IAAA,+BAAA;ELqlEV;;EK5lEM;IAOI,4BAAA;IAAA,6BAAA;EL0lEV;;EKjmEM;IAOI,4BAAA;IAAA,6BAAA;EL+lEV;;EKtmEM;IAOI,wBAAA;IAAA,2BAAA;ELomEV;;EK3mEM;IAOI,8BAAA;IAAA,iCAAA;ELymEV;;EKhnEM;IAOI,6BAAA;IAAA,gCAAA;EL8mEV;;EKrnEM;IAOI,2BAAA;IAAA,8BAAA;ELmnEV;;EK1nEM;IAOI,6BAAA;IAAA,gCAAA;ELwnEV;;EK/nEM;IAOI,2BAAA;IAAA,8BAAA;EL6nEV;;EKpoEM;IAOI,2BAAA;IAAA,8BAAA;ELkoEV;;EKzoEM;IAOI,wBAAA;ELsoEV;;EK7oEM;IAOI,8BAAA;EL0oEV;;EKjpEM;IAOI,6BAAA;EL8oEV;;EKrpEM;IAOI,2BAAA;ELkpEV;;EKzpEM;IAOI,6BAAA;ELspEV;;EK7pEM;IAOI,2BAAA;EL0pEV;;EKjqEM;IAOI,2BAAA;EL8pEV;;EKrqEM;IAOI,yBAAA;ELkqEV;;EKzqEM;IAOI,+BAAA;ELsqEV;;EK7qEM;IAOI,8BAAA;EL0qEV;;EKjrEM;IAOI,4BAAA;EL8qEV;;EKrrEM;IAOI,8BAAA;ELkrEV;;EKzrEM;IAOI,4BAAA;ELsrEV;;EK7rEM;IAOI,4BAAA;EL0rEV;;EKjsEM;IAOI,2BAAA;EL8rEV;;EKrsEM;IAOI,iCAAA;ELksEV;;EKzsEM;IAOI,gCAAA;ELssEV;;EK7sEM;IAOI,8BAAA;EL0sEV;;EKjtEM;IAOI,gCAAA;EL8sEV;;EKrtEM;IAOI,8BAAA;ELktEV;;EKztEM;IAOI,8BAAA;ELstEV;;EK7tEM;IAOI,0BAAA;EL0tEV;;EKjuEM;IAOI,gCAAA;EL8tEV;;EKruEM;IAOI,+BAAA;ELkuEV;;EKzuEM;IAOI,6BAAA;ELsuEV;;EK7uEM;IAOI,+BAAA;EL0uEV;;EKjvEM;IAOI,6BAAA;EL8uEV;;EKrvEM;IAOI,6BAAA;ELkvEV;;EKzvEM;IAOI,qBAAA;ELsvEV;;EK7vEM;IAOI,2BAAA;EL0vEV;;EKjwEM;IAOI,0BAAA;EL8vEV;;EKrwEM;IAOI,wBAAA;ELkwEV;;EKzwEM;IAOI,0BAAA;ELswEV;;EK7wEM;IAOI,wBAAA;EL0wEV;;EKjxEM;IAOI,0BAAA;IAAA,2BAAA;EL+wEV;;EKtxEM;IAOI,gCAAA;IAAA,iCAAA;ELoxEV;;EK3xEM;IAOI,+BAAA;IAAA,gCAAA;ELyxEV;;EKhyEM;IAOI,6BAAA;IAAA,8BAAA;EL8xEV;;EKryEM;IAOI,+BAAA;IAAA,gCAAA;ELmyEV;;EK1yEM;IAOI,6BAAA;IAAA,8BAAA;ELwyEV;;EK/yEM;IAOI,yBAAA;IAAA,4BAAA;EL6yEV;;EKpzEM;IAOI,+BAAA;IAAA,kCAAA;ELkzEV;;EKzzEM;IAOI,8BAAA;IAAA,iCAAA;ELuzEV;;EK9zEM;IAOI,4BAAA;IAAA,+BAAA;EL4zEV;;EKn0EM;IAOI,8BAAA;IAAA,iCAAA;ELi0EV;;EKx0EM;IAOI,4BAAA;IAAA,+BAAA;ELs0EV;;EK70EM;IAOI,yBAAA;EL00EV;;EKj1EM;IAOI,+BAAA;EL80EV;;EKr1EM;IAOI,8BAAA;ELk1EV;;EKz1EM;IAOI,4BAAA;ELs1EV;;EK71EM;IAOI,8BAAA;EL01EV;;EKj2EM;IAOI,4BAAA;EL81EV;;EKr2EM;IAOI,0BAAA;ELk2EV;;EKz2EM;IAOI,gCAAA;ELs2EV;;EK72EM;IAOI,+BAAA;EL02EV;;EKj3EM;IAOI,6BAAA;EL82EV;;EKr3EM;IAOI,+BAAA;ELk3EV;;EKz3EM;IAOI,6BAAA;ELs3EV;;EK73EM;IAOI,4BAAA;EL03EV;;EKj4EM;IAOI,kCAAA;EL83EV;;EKr4EM;IAOI,iCAAA;ELk4EV;;EKz4EM;IAOI,+BAAA;ELs4EV;;EK74EM;IAOI,iCAAA;EL04EV;;EKj5EM;IAOI,+BAAA;EL84EV;;EKr5EM;IAOI,2BAAA;ELk5EV;;EKz5EM;IAOI,iCAAA;ELs5EV;;EK75EM;IAOI,gCAAA;EL05EV;;EKj6EM;IAOI,8BAAA;EL85EV;;EKr6EM;IAOI,gCAAA;ELk6EV;;EKz6EM;IAOI,8BAAA;ELs6EV;AACF;AC96EI;EIAI;IAOI,0BAAA;EL26EV;;EKl7EM;IAOI,gCAAA;EL+6EV;;EKt7EM;IAOI,yBAAA;ELm7EV;;EK17EM;IAOI,wBAAA;ELu7EV;;EK97EM;IAOI,yBAAA;EL27EV;;EKl8EM;IAOI,6BAAA;EL+7EV;;EKt8EM;IAOI,8BAAA;ELm8EV;;EK18EM;IAOI,wBAAA;ELu8EV;;EK98EM;IAOI,+BAAA;EL28EV;;EKl9EM;IAOI,wBAAA;EL+8EV;;EKt9EM;IAOI,yBAAA;ELm9EV;;EK19EM;IAOI,8BAAA;ELu9EV;;EK99EM;IAOI,iCAAA;EL29EV;;EKl+EM;IAOI,sCAAA;EL+9EV;;EKt+EM;IAOI,yCAAA;ELm+EV;;EK1+EM;IAOI,uBAAA;ELu+EV;;EK9+EM;IAOI,uBAAA;EL2+EV;;EKl/EM;IAOI,yBAAA;EL++EV;;EKt/EM;IAOI,yBAAA;ELm/EV;;EK1/EM;IAOI,0BAAA;ELu/EV;;EK9/EM;IAOI,4BAAA;EL2/EV;;EKlgFM;IAOI,kCAAA;EL+/EV;;EKtgFM;IAOI,sCAAA;ELmgFV;;EK1gFM;IAOI,oCAAA;ELugFV;;EK9gFM;IAOI,kCAAA;EL2gFV;;EKlhFM;IAOI,yCAAA;EL+gFV;;EKthFM;IAOI,wCAAA;ELmhFV;;EK1hFM;IAOI,wCAAA;ELuhFV;;EK9hFM;IAOI,kCAAA;EL2hFV;;EKliFM;IAOI,gCAAA;EL+hFV;;EKtiFM;IAOI,8BAAA;ELmiFV;;EK1iFM;IAOI,gCAAA;ELuiFV;;EK9iFM;IAOI,+BAAA;EL2iFV;;EKljFM;IAOI,oCAAA;EL+iFV;;EKtjFM;IAOI,kCAAA;ELmjFV;;EK1jFM;IAOI,gCAAA;ELujFV;;EK9jFM;IAOI,uCAAA;EL2jFV;;EKlkFM;IAOI,sCAAA;EL+jFV;;EKtkFM;IAOI,iCAAA;ELmkFV;;EK1kFM;IAOI,2BAAA;ELukFV;;EK9kFM;IAOI,iCAAA;EL2kFV;;EKllFM;IAOI,+BAAA;EL+kFV;;EKtlFM;IAOI,6BAAA;ELmlFV;;EK1lFM;IAOI,+BAAA;ELulFV;;EK9lFM;IAOI,8BAAA;EL2lFV;;EKlmFM;IAOI,oBAAA;EL+lFV;;EKtmFM;IAOI,mBAAA;ELmmFV;;EK1mFM;IAOI,mBAAA;ELumFV;;EK9mFM;IAOI,mBAAA;EL2mFV;;EKlnFM;IAOI,mBAAA;EL+mFV;;EKtnFM;IAOI,mBAAA;ELmnFV;;EK1nFM;IAOI,mBAAA;ELunFV;;EK9nFM;IAOI,mBAAA;EL2nFV;;EKloFM;IAOI,oBAAA;EL+nFV;;EKtoFM;IAOI,0BAAA;ELmoFV;;EK1oFM;IAOI,yBAAA;ELuoFV;;EK9oFM;IAOI,uBAAA;EL2oFV;;EKlpFM;IAOI,yBAAA;EL+oFV;;EKtpFM;IAOI,uBAAA;ELmpFV;;EK1pFM;IAOI,uBAAA;ELupFV;;EK9pFM;IAOI,yBAAA;IAAA,0BAAA;EL4pFV;;EKnqFM;IAOI,+BAAA;IAAA,gCAAA;ELiqFV;;EKxqFM;IAOI,8BAAA;IAAA,+BAAA;ELsqFV;;EK7qFM;IAOI,4BAAA;IAAA,6BAAA;EL2qFV;;EKlrFM;IAOI,8BAAA;IAAA,+BAAA;ELgrFV;;EKvrFM;IAOI,4BAAA;IAAA,6BAAA;ELqrFV;;EK5rFM;IAOI,4BAAA;IAAA,6BAAA;EL0rFV;;EKjsFM;IAOI,wBAAA;IAAA,2BAAA;EL+rFV;;EKtsFM;IAOI,8BAAA;IAAA,iCAAA;ELosFV;;EK3sFM;IAOI,6BAAA;IAAA,gCAAA;ELysFV;;EKhtFM;IAOI,2BAAA;IAAA,8BAAA;EL8sFV;;EKrtFM;IAOI,6BAAA;IAAA,gCAAA;ELmtFV;;EK1tFM;IAOI,2BAAA;IAAA,8BAAA;ELwtFV;;EK/tFM;IAOI,2BAAA;IAAA,8BAAA;EL6tFV;;EKpuFM;IAOI,wBAAA;ELiuFV;;EKxuFM;IAOI,8BAAA;ELquFV;;EK5uFM;IAOI,6BAAA;ELyuFV;;EKhvFM;IAOI,2BAAA;EL6uFV;;EKpvFM;IAOI,6BAAA;ELivFV;;EKxvFM;IAOI,2BAAA;ELqvFV;;EK5vFM;IAOI,2BAAA;ELyvFV;;EKhwFM;IAOI,yBAAA;EL6vFV;;EKpwFM;IAOI,+BAAA;ELiwFV;;EKxwFM;IAOI,8BAAA;ELqwFV;;EK5wFM;IAOI,4BAAA;ELywFV;;EKhxFM;IAOI,8BAAA;EL6wFV;;EKpxFM;IAOI,4BAAA;ELixFV;;EKxxFM;IAOI,4BAAA;ELqxFV;;EK5xFM;IAOI,2BAAA;ELyxFV;;EKhyFM;IAOI,iCAAA;EL6xFV;;EKpyFM;IAOI,gCAAA;ELiyFV;;EKxyFM;IAOI,8BAAA;ELqyFV;;EK5yFM;IAOI,gCAAA;ELyyFV;;EKhzFM;IAOI,8BAAA;EL6yFV;;EKpzFM;IAOI,8BAAA;ELizFV;;EKxzFM;IAOI,0BAAA;ELqzFV;;EK5zFM;IAOI,gCAAA;ELyzFV;;EKh0FM;IAOI,+BAAA;EL6zFV;;EKp0FM;IAOI,6BAAA;ELi0FV;;EKx0FM;IAOI,+BAAA;ELq0FV;;EK50FM;IAOI,6BAAA;ELy0FV;;EKh1FM;IAOI,6BAAA;EL60FV;;EKp1FM;IAOI,qBAAA;ELi1FV;;EKx1FM;IAOI,2BAAA;ELq1FV;;EK51FM;IAOI,0BAAA;ELy1FV;;EKh2FM;IAOI,wBAAA;EL61FV;;EKp2FM;IAOI,0BAAA;ELi2FV;;EKx2FM;IAOI,wBAAA;ELq2FV;;EK52FM;IAOI,0BAAA;IAAA,2BAAA;EL02FV;;EKj3FM;IAOI,gCAAA;IAAA,iCAAA;EL+2FV;;EKt3FM;IAOI,+BAAA;IAAA,gCAAA;ELo3FV;;EK33FM;IAOI,6BAAA;IAAA,8BAAA;ELy3FV;;EKh4FM;IAOI,+BAAA;IAAA,gCAAA;EL83FV;;EKr4FM;IAOI,6BAAA;IAAA,8BAAA;ELm4FV;;EK14FM;IAOI,yBAAA;IAAA,4BAAA;ELw4FV;;EK/4FM;IAOI,+BAAA;IAAA,kCAAA;EL64FV;;EKp5FM;IAOI,8BAAA;IAAA,iCAAA;ELk5FV;;EKz5FM;IAOI,4BAAA;IAAA,+BAAA;ELu5FV;;EK95FM;IAOI,8BAAA;IAAA,iCAAA;EL45FV;;EKn6FM;IAOI,4BAAA;IAAA,+BAAA;ELi6FV;;EKx6FM;IAOI,yBAAA;ELq6FV;;EK56FM;IAOI,+BAAA;ELy6FV;;EKh7FM;IAOI,8BAAA;EL66FV;;EKp7FM;IAOI,4BAAA;ELi7FV;;EKx7FM;IAOI,8BAAA;ELq7FV;;EK57FM;IAOI,4BAAA;ELy7FV;;EKh8FM;IAOI,0BAAA;EL67FV;;EKp8FM;IAOI,gCAAA;ELi8FV;;EKx8FM;IAOI,+BAAA;ELq8FV;;EK58FM;IAOI,6BAAA;ELy8FV;;EKh9FM;IAOI,+BAAA;EL68FV;;EKp9FM;IAOI,6BAAA;ELi9FV;;EKx9FM;IAOI,4BAAA;ELq9FV;;EK59FM;IAOI,kCAAA;ELy9FV;;EKh+FM;IAOI,iCAAA;EL69FV;;EKp+FM;IAOI,+BAAA;ELi+FV;;EKx+FM;IAOI,iCAAA;ELq+FV;;EK5+FM;IAOI,+BAAA;ELy+FV;;EKh/FM;IAOI,2BAAA;EL6+FV;;EKp/FM;IAOI,iCAAA;ELi/FV;;EKx/FM;IAOI,gCAAA;ELq/FV;;EK5/FM;IAOI,8BAAA;ELy/FV;;EKhgGM;IAOI,gCAAA;EL6/FV;;EKpgGM;IAOI,8BAAA;ELigGV;AACF;ACzgGI;EIAI;IAOI,0BAAA;ELsgGV;;EK7gGM;IAOI,gCAAA;EL0gGV;;EKjhGM;IAOI,yBAAA;EL8gGV;;EKrhGM;IAOI,wBAAA;ELkhGV;;EKzhGM;IAOI,yBAAA;ELshGV;;EK7hGM;IAOI,6BAAA;EL0hGV;;EKjiGM;IAOI,8BAAA;EL8hGV;;EKriGM;IAOI,wBAAA;ELkiGV;;EKziGM;IAOI,+BAAA;ELsiGV;;EK7iGM;IAOI,wBAAA;EL0iGV;;EKjjGM;IAOI,yBAAA;EL8iGV;;EKrjGM;IAOI,8BAAA;ELkjGV;;EKzjGM;IAOI,iCAAA;ELsjGV;;EK7jGM;IAOI,sCAAA;EL0jGV;;EKjkGM;IAOI,yCAAA;EL8jGV;;EKrkGM;IAOI,uBAAA;ELkkGV;;EKzkGM;IAOI,uBAAA;ELskGV;;EK7kGM;IAOI,yBAAA;EL0kGV;;EKjlGM;IAOI,yBAAA;EL8kGV;;EKrlGM;IAOI,0BAAA;ELklGV;;EKzlGM;IAOI,4BAAA;ELslGV;;EK7lGM;IAOI,kCAAA;EL0lGV;;EKjmGM;IAOI,sCAAA;EL8lGV;;EKrmGM;IAOI,oCAAA;ELkmGV;;EKzmGM;IAOI,kCAAA;ELsmGV;;EK7mGM;IAOI,yCAAA;EL0mGV;;EKjnGM;IAOI,wCAAA;EL8mGV;;EKrnGM;IAOI,wCAAA;ELknGV;;EKznGM;IAOI,kCAAA;ELsnGV;;EK7nGM;IAOI,gCAAA;EL0nGV;;EKjoGM;IAOI,8BAAA;EL8nGV;;EKroGM;IAOI,gCAAA;ELkoGV;;EKzoGM;IAOI,+BAAA;ELsoGV;;EK7oGM;IAOI,oCAAA;EL0oGV;;EKjpGM;IAOI,kCAAA;EL8oGV;;EKrpGM;IAOI,gCAAA;ELkpGV;;EKzpGM;IAOI,uCAAA;ELspGV;;EK7pGM;IAOI,sCAAA;EL0pGV;;EKjqGM;IAOI,iCAAA;EL8pGV;;EKrqGM;IAOI,2BAAA;ELkqGV;;EKzqGM;IAOI,iCAAA;ELsqGV;;EK7qGM;IAOI,+BAAA;EL0qGV;;EKjrGM;IAOI,6BAAA;EL8qGV;;EKrrGM;IAOI,+BAAA;ELkrGV;;EKzrGM;IAOI,8BAAA;ELsrGV;;EK7rGM;IAOI,oBAAA;EL0rGV;;EKjsGM;IAOI,mBAAA;EL8rGV;;EKrsGM;IAOI,mBAAA;ELksGV;;EKzsGM;IAOI,mBAAA;ELssGV;;EK7sGM;IAOI,mBAAA;EL0sGV;;EKjtGM;IAOI,mBAAA;EL8sGV;;EKrtGM;IAOI,mBAAA;ELktGV;;EKztGM;IAOI,mBAAA;ELstGV;;EK7tGM;IAOI,oBAAA;EL0tGV;;EKjuGM;IAOI,0BAAA;EL8tGV;;EKruGM;IAOI,yBAAA;ELkuGV;;EKzuGM;IAOI,uBAAA;ELsuGV;;EK7uGM;IAOI,yBAAA;EL0uGV;;EKjvGM;IAOI,uBAAA;EL8uGV;;EKrvGM;IAOI,uBAAA;ELkvGV;;EKzvGM;IAOI,yBAAA;IAAA,0BAAA;ELuvGV;;EK9vGM;IAOI,+BAAA;IAAA,gCAAA;EL4vGV;;EKnwGM;IAOI,8BAAA;IAAA,+BAAA;ELiwGV;;EKxwGM;IAOI,4BAAA;IAAA,6BAAA;ELswGV;;EK7wGM;IAOI,8BAAA;IAAA,+BAAA;EL2wGV;;EKlxGM;IAOI,4BAAA;IAAA,6BAAA;ELgxGV;;EKvxGM;IAOI,4BAAA;IAAA,6BAAA;ELqxGV;;EK5xGM;IAOI,wBAAA;IAAA,2BAAA;EL0xGV;;EKjyGM;IAOI,8BAAA;IAAA,iCAAA;EL+xGV;;EKtyGM;IAOI,6BAAA;IAAA,gCAAA;ELoyGV;;EK3yGM;IAOI,2BAAA;IAAA,8BAAA;ELyyGV;;EKhzGM;IAOI,6BAAA;IAAA,gCAAA;EL8yGV;;EKrzGM;IAOI,2BAAA;IAAA,8BAAA;ELmzGV;;EK1zGM;IAOI,2BAAA;IAAA,8BAAA;ELwzGV;;EK/zGM;IAOI,wBAAA;EL4zGV;;EKn0GM;IAOI,8BAAA;ELg0GV;;EKv0GM;IAOI,6BAAA;ELo0GV;;EK30GM;IAOI,2BAAA;ELw0GV;;EK/0GM;IAOI,6BAAA;EL40GV;;EKn1GM;IAOI,2BAAA;ELg1GV;;EKv1GM;IAOI,2BAAA;ELo1GV;;EK31GM;IAOI,yBAAA;ELw1GV;;EK/1GM;IAOI,+BAAA;EL41GV;;EKn2GM;IAOI,8BAAA;ELg2GV;;EKv2GM;IAOI,4BAAA;ELo2GV;;EK32GM;IAOI,8BAAA;ELw2GV;;EK/2GM;IAOI,4BAAA;EL42GV;;EKn3GM;IAOI,4BAAA;ELg3GV;;EKv3GM;IAOI,2BAAA;ELo3GV;;EK33GM;IAOI,iCAAA;ELw3GV;;EK/3GM;IAOI,gCAAA;EL43GV;;EKn4GM;IAOI,8BAAA;ELg4GV;;EKv4GM;IAOI,gCAAA;ELo4GV;;EK34GM;IAOI,8BAAA;ELw4GV;;EK/4GM;IAOI,8BAAA;EL44GV;;EKn5GM;IAOI,0BAAA;ELg5GV;;EKv5GM;IAOI,gCAAA;ELo5GV;;EK35GM;IAOI,+BAAA;ELw5GV;;EK/5GM;IAOI,6BAAA;EL45GV;;EKn6GM;IAOI,+BAAA;ELg6GV;;EKv6GM;IAOI,6BAAA;ELo6GV;;EK36GM;IAOI,6BAAA;ELw6GV;;EK/6GM;IAOI,qBAAA;EL46GV;;EKn7GM;IAOI,2BAAA;ELg7GV;;EKv7GM;IAOI,0BAAA;ELo7GV;;EK37GM;IAOI,wBAAA;ELw7GV;;EK/7GM;IAOI,0BAAA;EL47GV;;EKn8GM;IAOI,wBAAA;ELg8GV;;EKv8GM;IAOI,0BAAA;IAAA,2BAAA;ELq8GV;;EK58GM;IAOI,gCAAA;IAAA,iCAAA;EL08GV;;EKj9GM;IAOI,+BAAA;IAAA,gCAAA;EL+8GV;;EKt9GM;IAOI,6BAAA;IAAA,8BAAA;ELo9GV;;EK39GM;IAOI,+BAAA;IAAA,gCAAA;ELy9GV;;EKh+GM;IAOI,6BAAA;IAAA,8BAAA;EL89GV;;EKr+GM;IAOI,yBAAA;IAAA,4BAAA;ELm+GV;;EK1+GM;IAOI,+BAAA;IAAA,kCAAA;ELw+GV;;EK/+GM;IAOI,8BAAA;IAAA,iCAAA;EL6+GV;;EKp/GM;IAOI,4BAAA;IAAA,+BAAA;ELk/GV;;EKz/GM;IAOI,8BAAA;IAAA,iCAAA;ELu/GV;;EK9/GM;IAOI,4BAAA;IAAA,+BAAA;EL4/GV;;EKngHM;IAOI,yBAAA;ELggHV;;EKvgHM;IAOI,+BAAA;ELogHV;;EK3gHM;IAOI,8BAAA;ELwgHV;;EK/gHM;IAOI,4BAAA;EL4gHV;;EKnhHM;IAOI,8BAAA;ELghHV;;EKvhHM;IAOI,4BAAA;ELohHV;;EK3hHM;IAOI,0BAAA;ELwhHV;;EK/hHM;IAOI,gCAAA;EL4hHV;;EKniHM;IAOI,+BAAA;ELgiHV;;EKviHM;IAOI,6BAAA;ELoiHV;;EK3iHM;IAOI,+BAAA;ELwiHV;;EK/iHM;IAOI,6BAAA;EL4iHV;;EKnjHM;IAOI,4BAAA;ELgjHV;;EKvjHM;IAOI,kCAAA;ELojHV;;EK3jHM;IAOI,iCAAA;ELwjHV;;EK/jHM;IAOI,+BAAA;EL4jHV;;EKnkHM;IAOI,iCAAA;ELgkHV;;EKvkHM;IAOI,+BAAA;ELokHV;;EK3kHM;IAOI,2BAAA;ELwkHV;;EK/kHM;IAOI,iCAAA;EL4kHV;;EKnlHM;IAOI,gCAAA;ELglHV;;EKvlHM;IAOI,8BAAA;ELolHV;;EK3lHM;IAOI,gCAAA;ELwlHV;;EK/lHM;IAOI,8BAAA;EL4lHV;AACF;ACpmHI;EIAI;IAOI,0BAAA;ELimHV;;EKxmHM;IAOI,gCAAA;ELqmHV;;EK5mHM;IAOI,yBAAA;ELymHV;;EKhnHM;IAOI,wBAAA;EL6mHV;;EKpnHM;IAOI,yBAAA;ELinHV;;EKxnHM;IAOI,6BAAA;ELqnHV;;EK5nHM;IAOI,8BAAA;ELynHV;;EKhoHM;IAOI,wBAAA;EL6nHV;;EKpoHM;IAOI,+BAAA;ELioHV;;EKxoHM;IAOI,wBAAA;ELqoHV;;EK5oHM;IAOI,yBAAA;ELyoHV;;EKhpHM;IAOI,8BAAA;EL6oHV;;EKppHM;IAOI,iCAAA;ELipHV;;EKxpHM;IAOI,sCAAA;ELqpHV;;EK5pHM;IAOI,yCAAA;ELypHV;;EKhqHM;IAOI,uBAAA;EL6pHV;;EKpqHM;IAOI,uBAAA;ELiqHV;;EKxqHM;IAOI,yBAAA;ELqqHV;;EK5qHM;IAOI,yBAAA;ELyqHV;;EKhrHM;IAOI,0BAAA;EL6qHV;;EKprHM;IAOI,4BAAA;ELirHV;;EKxrHM;IAOI,kCAAA;ELqrHV;;EK5rHM;IAOI,sCAAA;ELyrHV;;EKhsHM;IAOI,oCAAA;EL6rHV;;EKpsHM;IAOI,kCAAA;ELisHV;;EKxsHM;IAOI,yCAAA;ELqsHV;;EK5sHM;IAOI,wCAAA;ELysHV;;EKhtHM;IAOI,wCAAA;EL6sHV;;EKptHM;IAOI,kCAAA;ELitHV;;EKxtHM;IAOI,gCAAA;ELqtHV;;EK5tHM;IAOI,8BAAA;ELytHV;;EKhuHM;IAOI,gCAAA;EL6tHV;;EKpuHM;IAOI,+BAAA;ELiuHV;;EKxuHM;IAOI,oCAAA;ELquHV;;EK5uHM;IAOI,kCAAA;ELyuHV;;EKhvHM;IAOI,gCAAA;EL6uHV;;EKpvHM;IAOI,uCAAA;ELivHV;;EKxvHM;IAOI,sCAAA;ELqvHV;;EK5vHM;IAOI,iCAAA;ELyvHV;;EKhwHM;IAOI,2BAAA;EL6vHV;;EKpwHM;IAOI,iCAAA;ELiwHV;;EKxwHM;IAOI,+BAAA;ELqwHV;;EK5wHM;IAOI,6BAAA;ELywHV;;EKhxHM;IAOI,+BAAA;EL6wHV;;EKpxHM;IAOI,8BAAA;ELixHV;;EKxxHM;IAOI,oBAAA;ELqxHV;;EK5xHM;IAOI,mBAAA;ELyxHV;;EKhyHM;IAOI,mBAAA;EL6xHV;;EKpyHM;IAOI,mBAAA;ELiyHV;;EKxyHM;IAOI,mBAAA;ELqyHV;;EK5yHM;IAOI,mBAAA;ELyyHV;;EKhzHM;IAOI,mBAAA;EL6yHV;;EKpzHM;IAOI,mBAAA;ELizHV;;EKxzHM;IAOI,oBAAA;ELqzHV;;EK5zHM;IAOI,0BAAA;ELyzHV;;EKh0HM;IAOI,yBAAA;EL6zHV;;EKp0HM;IAOI,uBAAA;ELi0HV;;EKx0HM;IAOI,yBAAA;ELq0HV;;EK50HM;IAOI,uBAAA;ELy0HV;;EKh1HM;IAOI,uBAAA;EL60HV;;EKp1HM;IAOI,yBAAA;IAAA,0BAAA;ELk1HV;;EKz1HM;IAOI,+BAAA;IAAA,gCAAA;ELu1HV;;EK91HM;IAOI,8BAAA;IAAA,+BAAA;EL41HV;;EKn2HM;IAOI,4BAAA;IAAA,6BAAA;ELi2HV;;EKx2HM;IAOI,8BAAA;IAAA,+BAAA;ELs2HV;;EK72HM;IAOI,4BAAA;IAAA,6BAAA;EL22HV;;EKl3HM;IAOI,4BAAA;IAAA,6BAAA;ELg3HV;;EKv3HM;IAOI,wBAAA;IAAA,2BAAA;ELq3HV;;EK53HM;IAOI,8BAAA;IAAA,iCAAA;EL03HV;;EKj4HM;IAOI,6BAAA;IAAA,gCAAA;EL+3HV;;EKt4HM;IAOI,2BAAA;IAAA,8BAAA;ELo4HV;;EK34HM;IAOI,6BAAA;IAAA,gCAAA;ELy4HV;;EKh5HM;IAOI,2BAAA;IAAA,8BAAA;EL84HV;;EKr5HM;IAOI,2BAAA;IAAA,8BAAA;ELm5HV;;EK15HM;IAOI,wBAAA;ELu5HV;;EK95HM;IAOI,8BAAA;EL25HV;;EKl6HM;IAOI,6BAAA;EL+5HV;;EKt6HM;IAOI,2BAAA;ELm6HV;;EK16HM;IAOI,6BAAA;ELu6HV;;EK96HM;IAOI,2BAAA;EL26HV;;EKl7HM;IAOI,2BAAA;EL+6HV;;EKt7HM;IAOI,yBAAA;ELm7HV;;EK17HM;IAOI,+BAAA;ELu7HV;;EK97HM;IAOI,8BAAA;EL27HV;;EKl8HM;IAOI,4BAAA;EL+7HV;;EKt8HM;IAOI,8BAAA;ELm8HV;;EK18HM;IAOI,4BAAA;ELu8HV;;EK98HM;IAOI,4BAAA;EL28HV;;EKl9HM;IAOI,2BAAA;EL+8HV;;EKt9HM;IAOI,iCAAA;ELm9HV;;EK19HM;IAOI,gCAAA;ELu9HV;;EK99HM;IAOI,8BAAA;EL29HV;;EKl+HM;IAOI,gCAAA;EL+9HV;;EKt+HM;IAOI,8BAAA;ELm+HV;;EK1+HM;IAOI,8BAAA;ELu+HV;;EK9+HM;IAOI,0BAAA;EL2+HV;;EKl/HM;IAOI,gCAAA;EL++HV;;EKt/HM;IAOI,+BAAA;ELm/HV;;EK1/HM;IAOI,6BAAA;ELu/HV;;EK9/HM;IAOI,+BAAA;EL2/HV;;EKlgIM;IAOI,6BAAA;EL+/HV;;EKtgIM;IAOI,6BAAA;ELmgIV;;EK1gIM;IAOI,qBAAA;ELugIV;;EK9gIM;IAOI,2BAAA;EL2gIV;;EKlhIM;IAOI,0BAAA;EL+gIV;;EKthIM;IAOI,wBAAA;ELmhIV;;EK1hIM;IAOI,0BAAA;ELuhIV;;EK9hIM;IAOI,wBAAA;EL2hIV;;EKliIM;IAOI,0BAAA;IAAA,2BAAA;ELgiIV;;EKviIM;IAOI,gCAAA;IAAA,iCAAA;ELqiIV;;EK5iIM;IAOI,+BAAA;IAAA,gCAAA;EL0iIV;;EKjjIM;IAOI,6BAAA;IAAA,8BAAA;EL+iIV;;EKtjIM;IAOI,+BAAA;IAAA,gCAAA;ELojIV;;EK3jIM;IAOI,6BAAA;IAAA,8BAAA;ELyjIV;;EKhkIM;IAOI,yBAAA;IAAA,4BAAA;EL8jIV;;EKrkIM;IAOI,+BAAA;IAAA,kCAAA;ELmkIV;;EK1kIM;IAOI,8BAAA;IAAA,iCAAA;ELwkIV;;EK/kIM;IAOI,4BAAA;IAAA,+BAAA;EL6kIV;;EKplIM;IAOI,8BAAA;IAAA,iCAAA;ELklIV;;EKzlIM;IAOI,4BAAA;IAAA,+BAAA;ELulIV;;EK9lIM;IAOI,yBAAA;EL2lIV;;EKlmIM;IAOI,+BAAA;EL+lIV;;EKtmIM;IAOI,8BAAA;ELmmIV;;EK1mIM;IAOI,4BAAA;ELumIV;;EK9mIM;IAOI,8BAAA;EL2mIV;;EKlnIM;IAOI,4BAAA;EL+mIV;;EKtnIM;IAOI,0BAAA;ELmnIV;;EK1nIM;IAOI,gCAAA;ELunIV;;EK9nIM;IAOI,+BAAA;EL2nIV;;EKloIM;IAOI,6BAAA;EL+nIV;;EKtoIM;IAOI,+BAAA;ELmoIV;;EK1oIM;IAOI,6BAAA;ELuoIV;;EK9oIM;IAOI,4BAAA;EL2oIV;;EKlpIM;IAOI,kCAAA;EL+oIV;;EKtpIM;IAOI,iCAAA;ELmpIV;;EK1pIM;IAOI,+BAAA;ELupIV;;EK9pIM;IAOI,iCAAA;EL2pIV;;EKlqIM;IAOI,+BAAA;EL+pIV;;EKtqIM;IAOI,2BAAA;ELmqIV;;EK1qIM;IAOI,iCAAA;ELuqIV;;EK9qIM;IAOI,gCAAA;EL2qIV;;EKlrIM;IAOI,8BAAA;EL+qIV;;EKtrIM;IAOI,gCAAA;ELmrIV;;EK1rIM;IAOI,8BAAA;ELurIV;AACF;AC/rII;EIAI;IAOI,0BAAA;EL4rIV;;EKnsIM;IAOI,gCAAA;ELgsIV;;EKvsIM;IAOI,yBAAA;ELosIV;;EK3sIM;IAOI,wBAAA;ELwsIV;;EK/sIM;IAOI,yBAAA;EL4sIV;;EKntIM;IAOI,6BAAA;ELgtIV;;EKvtIM;IAOI,8BAAA;ELotIV;;EK3tIM;IAOI,wBAAA;ELwtIV;;EK/tIM;IAOI,+BAAA;EL4tIV;;EKnuIM;IAOI,wBAAA;ELguIV;;EKvuIM;IAOI,yBAAA;ELouIV;;EK3uIM;IAOI,8BAAA;ELwuIV;;EK/uIM;IAOI,iCAAA;EL4uIV;;EKnvIM;IAOI,sCAAA;ELgvIV;;EKvvIM;IAOI,yCAAA;ELovIV;;EK3vIM;IAOI,uBAAA;ELwvIV;;EK/vIM;IAOI,uBAAA;EL4vIV;;EKnwIM;IAOI,yBAAA;ELgwIV;;EKvwIM;IAOI,yBAAA;ELowIV;;EK3wIM;IAOI,0BAAA;ELwwIV;;EK/wIM;IAOI,4BAAA;EL4wIV;;EKnxIM;IAOI,kCAAA;ELgxIV;;EKvxIM;IAOI,sCAAA;ELoxIV;;EK3xIM;IAOI,oCAAA;ELwxIV;;EK/xIM;IAOI,kCAAA;EL4xIV;;EKnyIM;IAOI,yCAAA;ELgyIV;;EKvyIM;IAOI,wCAAA;ELoyIV;;EK3yIM;IAOI,wCAAA;ELwyIV;;EK/yIM;IAOI,kCAAA;EL4yIV;;EKnzIM;IAOI,gCAAA;ELgzIV;;EKvzIM;IAOI,8BAAA;ELozIV;;EK3zIM;IAOI,gCAAA;ELwzIV;;EK/zIM;IAOI,+BAAA;EL4zIV;;EKn0IM;IAOI,oCAAA;ELg0IV;;EKv0IM;IAOI,kCAAA;ELo0IV;;EK30IM;IAOI,gCAAA;ELw0IV;;EK/0IM;IAOI,uCAAA;EL40IV;;EKn1IM;IAOI,sCAAA;ELg1IV;;EKv1IM;IAOI,iCAAA;ELo1IV;;EK31IM;IAOI,2BAAA;ELw1IV;;EK/1IM;IAOI,iCAAA;EL41IV;;EKn2IM;IAOI,+BAAA;ELg2IV;;EKv2IM;IAOI,6BAAA;ELo2IV;;EK32IM;IAOI,+BAAA;ELw2IV;;EK/2IM;IAOI,8BAAA;EL42IV;;EKn3IM;IAOI,oBAAA;ELg3IV;;EKv3IM;IAOI,mBAAA;ELo3IV;;EK33IM;IAOI,mBAAA;ELw3IV;;EK/3IM;IAOI,mBAAA;EL43IV;;EKn4IM;IAOI,mBAAA;ELg4IV;;EKv4IM;IAOI,mBAAA;ELo4IV;;EK34IM;IAOI,mBAAA;ELw4IV;;EK/4IM;IAOI,mBAAA;EL44IV;;EKn5IM;IAOI,oBAAA;ELg5IV;;EKv5IM;IAOI,0BAAA;ELo5IV;;EK35IM;IAOI,yBAAA;ELw5IV;;EK/5IM;IAOI,uBAAA;EL45IV;;EKn6IM;IAOI,yBAAA;ELg6IV;;EKv6IM;IAOI,uBAAA;ELo6IV;;EK36IM;IAOI,uBAAA;ELw6IV;;EK/6IM;IAOI,yBAAA;IAAA,0BAAA;EL66IV;;EKp7IM;IAOI,+BAAA;IAAA,gCAAA;ELk7IV;;EKz7IM;IAOI,8BAAA;IAAA,+BAAA;ELu7IV;;EK97IM;IAOI,4BAAA;IAAA,6BAAA;EL47IV;;EKn8IM;IAOI,8BAAA;IAAA,+BAAA;ELi8IV;;EKx8IM;IAOI,4BAAA;IAAA,6BAAA;ELs8IV;;EK78IM;IAOI,4BAAA;IAAA,6BAAA;EL28IV;;EKl9IM;IAOI,wBAAA;IAAA,2BAAA;ELg9IV;;EKv9IM;IAOI,8BAAA;IAAA,iCAAA;ELq9IV;;EK59IM;IAOI,6BAAA;IAAA,gCAAA;EL09IV;;EKj+IM;IAOI,2BAAA;IAAA,8BAAA;EL+9IV;;EKt+IM;IAOI,6BAAA;IAAA,gCAAA;ELo+IV;;EK3+IM;IAOI,2BAAA;IAAA,8BAAA;ELy+IV;;EKh/IM;IAOI,2BAAA;IAAA,8BAAA;EL8+IV;;EKr/IM;IAOI,wBAAA;ELk/IV;;EKz/IM;IAOI,8BAAA;ELs/IV;;EK7/IM;IAOI,6BAAA;EL0/IV;;EKjgJM;IAOI,2BAAA;EL8/IV;;EKrgJM;IAOI,6BAAA;ELkgJV;;EKzgJM;IAOI,2BAAA;ELsgJV;;EK7gJM;IAOI,2BAAA;EL0gJV;;EKjhJM;IAOI,yBAAA;EL8gJV;;EKrhJM;IAOI,+BAAA;ELkhJV;;EKzhJM;IAOI,8BAAA;ELshJV;;EK7hJM;IAOI,4BAAA;EL0hJV;;EKjiJM;IAOI,8BAAA;EL8hJV;;EKriJM;IAOI,4BAAA;ELkiJV;;EKziJM;IAOI,4BAAA;ELsiJV;;EK7iJM;IAOI,2BAAA;EL0iJV;;EKjjJM;IAOI,iCAAA;EL8iJV;;EKrjJM;IAOI,gCAAA;ELkjJV;;EKzjJM;IAOI,8BAAA;ELsjJV;;EK7jJM;IAOI,gCAAA;EL0jJV;;EKjkJM;IAOI,8BAAA;EL8jJV;;EKrkJM;IAOI,8BAAA;ELkkJV;;EKzkJM;IAOI,0BAAA;ELskJV;;EK7kJM;IAOI,gCAAA;EL0kJV;;EKjlJM;IAOI,+BAAA;EL8kJV;;EKrlJM;IAOI,6BAAA;ELklJV;;EKzlJM;IAOI,+BAAA;ELslJV;;EK7lJM;IAOI,6BAAA;EL0lJV;;EKjmJM;IAOI,6BAAA;EL8lJV;;EKrmJM;IAOI,qBAAA;ELkmJV;;EKzmJM;IAOI,2BAAA;ELsmJV;;EK7mJM;IAOI,0BAAA;EL0mJV;;EKjnJM;IAOI,wBAAA;EL8mJV;;EKrnJM;IAOI,0BAAA;ELknJV;;EKznJM;IAOI,wBAAA;ELsnJV;;EK7nJM;IAOI,0BAAA;IAAA,2BAAA;EL2nJV;;EKloJM;IAOI,gCAAA;IAAA,iCAAA;ELgoJV;;EKvoJM;IAOI,+BAAA;IAAA,gCAAA;ELqoJV;;EK5oJM;IAOI,6BAAA;IAAA,8BAAA;EL0oJV;;EKjpJM;IAOI,+BAAA;IAAA,gCAAA;EL+oJV;;EKtpJM;IAOI,6BAAA;IAAA,8BAAA;ELopJV;;EK3pJM;IAOI,yBAAA;IAAA,4BAAA;ELypJV;;EKhqJM;IAOI,+BAAA;IAAA,kCAAA;EL8pJV;;EKrqJM;IAOI,8BAAA;IAAA,iCAAA;ELmqJV;;EK1qJM;IAOI,4BAAA;IAAA,+BAAA;ELwqJV;;EK/qJM;IAOI,8BAAA;IAAA,iCAAA;EL6qJV;;EKprJM;IAOI,4BAAA;IAAA,+BAAA;ELkrJV;;EKzrJM;IAOI,yBAAA;ELsrJV;;EK7rJM;IAOI,+BAAA;EL0rJV;;EKjsJM;IAOI,8BAAA;EL8rJV;;EKrsJM;IAOI,4BAAA;ELksJV;;EKzsJM;IAOI,8BAAA;ELssJV;;EK7sJM;IAOI,4BAAA;EL0sJV;;EKjtJM;IAOI,0BAAA;EL8sJV;;EKrtJM;IAOI,gCAAA;ELktJV;;EKztJM;IAOI,+BAAA;ELstJV;;EK7tJM;IAOI,6BAAA;EL0tJV;;EKjuJM;IAOI,+BAAA;EL8tJV;;EKruJM;IAOI,6BAAA;ELkuJV;;EKzuJM;IAOI,4BAAA;ELsuJV;;EK7uJM;IAOI,kCAAA;EL0uJV;;EKjvJM;IAOI,iCAAA;EL8uJV;;EKrvJM;IAOI,+BAAA;ELkvJV;;EKzvJM;IAOI,iCAAA;ELsvJV;;EK7vJM;IAOI,+BAAA;EL0vJV;;EKjwJM;IAOI,2BAAA;EL8vJV;;EKrwJM;IAOI,iCAAA;ELkwJV;;EKzwJM;IAOI,gCAAA;ELswJV;;EK7wJM;IAOI,8BAAA;EL0wJV;;EKjxJM;IAOI,gCAAA;EL8wJV;;EKrxJM;IAOI,8BAAA;ELkxJV;AACF;AMnzJA;EDyBQ;IAOI,0BAAA;ELuxJV;;EK9xJM;IAOI,gCAAA;EL2xJV;;EKlyJM;IAOI,yBAAA;EL+xJV;;EKtyJM;IAOI,wBAAA;ELmyJV;;EK1yJM;IAOI,yBAAA;ELuyJV;;EK9yJM;IAOI,6BAAA;EL2yJV;;EKlzJM;IAOI,8BAAA;EL+yJV;;EKtzJM;IAOI,wBAAA;ELmzJV;;EK1zJM;IAOI,+BAAA;ELuzJV;;EK9zJM;IAOI,wBAAA;EL2zJV;AACF","file":"bootstrap-grid.rtl.css","sourcesContent":["/*!\n * Bootstrap Grid v5.1.0 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n\n$include-column-box-sizing: true !default;\n\n@import \"functions\";\n@import \"variables\";\n\n@import \"mixins/lists\";\n@import \"mixins/breakpoints\";\n@import \"mixins/container\";\n@import \"mixins/grid\";\n@import \"mixins/utilities\";\n\n@import \"vendor/rfs\";\n\n@import \"containers\";\n@import \"grid\";\n\n@import \"utilities\";\n// Only use the utilities we need\n// stylelint-disable-next-line scss/dollar-variable-default\n$utilities: map-get-multiple(\n $utilities,\n (\n \"display\",\n \"order\",\n \"flex\",\n \"flex-direction\",\n \"flex-grow\",\n \"flex-shrink\",\n \"flex-wrap\",\n \"justify-content\",\n \"align-items\",\n \"align-content\",\n \"align-self\",\n \"margin\",\n \"margin-x\",\n \"margin-y\",\n \"margin-top\",\n \"margin-end\",\n \"margin-bottom\",\n \"margin-start\",\n \"negative-margin\",\n \"negative-margin-x\",\n \"negative-margin-y\",\n \"negative-margin-top\",\n \"negative-margin-end\",\n \"negative-margin-bottom\",\n \"negative-margin-start\",\n \"padding\",\n \"padding-x\",\n \"padding-y\",\n \"padding-top\",\n \"padding-end\",\n \"padding-bottom\",\n \"padding-start\",\n )\n);\n\n@import \"utilities/api\";\n","// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n@if $enable-grid-classes {\n // Single container class with breakpoint max-widths\n .container,\n // 100% wide container at all breakpoints\n .container-fluid {\n @include make-container();\n }\n\n // Responsive containers that are 100% wide until a breakpoint\n @each $breakpoint, $container-max-width in $container-max-widths {\n .container-#{$breakpoint} {\n @extend .container-fluid;\n }\n\n @include media-breakpoint-up($breakpoint, $grid-breakpoints) {\n %responsive-container-#{$breakpoint} {\n max-width: $container-max-width;\n }\n\n // Extend each breakpoint which is smaller or equal to the current breakpoint\n $extend-breakpoint: true;\n\n @each $name, $width in $grid-breakpoints {\n @if ($extend-breakpoint) {\n .container#{breakpoint-infix($name, $grid-breakpoints)} {\n @extend %responsive-container-#{$breakpoint};\n }\n\n // Once the current breakpoint is reached, stop extending\n @if ($breakpoint == $name) {\n $extend-breakpoint: false;\n }\n }\n }\n }\n }\n}\n","// Container mixins\n\n@mixin make-container($gutter: $container-padding-x) {\n width: 100%;\n padding-right: var(--#{$variable-prefix}gutter-x, #{$gutter});\n padding-left: var(--#{$variable-prefix}gutter-x, #{$gutter});\n margin-right: auto;\n margin-left: auto;\n}\n","/*!\n * Bootstrap Grid v5.1.0 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n.container,\n.container-fluid,\n.container-xxl,\n.container-xl,\n.container-lg,\n.container-md,\n.container-sm {\n width: 100%;\n padding-right: var(--bs-gutter-x, 0.75rem);\n padding-left: var(--bs-gutter-x, 0.75rem);\n margin-right: auto;\n margin-left: auto;\n}\n\n@media (min-width: 576px) {\n .container-sm, .container {\n max-width: 540px;\n }\n}\n@media (min-width: 768px) {\n .container-md, .container-sm, .container {\n max-width: 720px;\n }\n}\n@media (min-width: 992px) {\n .container-lg, .container-md, .container-sm, .container {\n max-width: 960px;\n }\n}\n@media (min-width: 1200px) {\n .container-xl, .container-lg, .container-md, .container-sm, .container {\n max-width: 1140px;\n }\n}\n@media (min-width: 1400px) {\n .container-xxl, .container-xl, .container-lg, .container-md, .container-sm, .container {\n max-width: 1320px;\n }\n}\n.row {\n --bs-gutter-x: 1.5rem;\n --bs-gutter-y: 0;\n display: flex;\n flex-wrap: wrap;\n margin-top: calc(var(--bs-gutter-y) * -1);\n margin-right: calc(var(--bs-gutter-x) * -.5);\n margin-left: calc(var(--bs-gutter-x) * -.5);\n}\n.row > * {\n box-sizing: border-box;\n flex-shrink: 0;\n width: 100%;\n max-width: 100%;\n padding-right: calc(var(--bs-gutter-x) * .5);\n padding-left: calc(var(--bs-gutter-x) * .5);\n margin-top: var(--bs-gutter-y);\n}\n\n.col {\n flex: 1 0 0%;\n}\n\n.row-cols-auto > * {\n flex: 0 0 auto;\n width: auto;\n}\n\n.row-cols-1 > * {\n flex: 0 0 auto;\n width: 100%;\n}\n\n.row-cols-2 > * {\n flex: 0 0 auto;\n width: 50%;\n}\n\n.row-cols-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n}\n\n.row-cols-4 > * {\n flex: 0 0 auto;\n width: 25%;\n}\n\n.row-cols-5 > * {\n flex: 0 0 auto;\n width: 20%;\n}\n\n.row-cols-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n}\n\n.col-auto {\n flex: 0 0 auto;\n width: auto;\n}\n\n.col-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n}\n\n.col-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n}\n\n.col-3 {\n flex: 0 0 auto;\n width: 25%;\n}\n\n.col-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n}\n\n.col-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n}\n\n.col-6 {\n flex: 0 0 auto;\n width: 50%;\n}\n\n.col-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n}\n\n.col-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n}\n\n.col-9 {\n flex: 0 0 auto;\n width: 75%;\n}\n\n.col-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n}\n\n.col-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n}\n\n.col-12 {\n flex: 0 0 auto;\n width: 100%;\n}\n\n.offset-1 {\n margin-left: 8.33333333%;\n}\n\n.offset-2 {\n margin-left: 16.66666667%;\n}\n\n.offset-3 {\n margin-left: 25%;\n}\n\n.offset-4 {\n margin-left: 33.33333333%;\n}\n\n.offset-5 {\n margin-left: 41.66666667%;\n}\n\n.offset-6 {\n margin-left: 50%;\n}\n\n.offset-7 {\n margin-left: 58.33333333%;\n}\n\n.offset-8 {\n margin-left: 66.66666667%;\n}\n\n.offset-9 {\n margin-left: 75%;\n}\n\n.offset-10 {\n margin-left: 83.33333333%;\n}\n\n.offset-11 {\n margin-left: 91.66666667%;\n}\n\n.g-0,\n.gx-0 {\n --bs-gutter-x: 0;\n}\n\n.g-0,\n.gy-0 {\n --bs-gutter-y: 0;\n}\n\n.g-1,\n.gx-1 {\n --bs-gutter-x: 0.25rem;\n}\n\n.g-1,\n.gy-1 {\n --bs-gutter-y: 0.25rem;\n}\n\n.g-2,\n.gx-2 {\n --bs-gutter-x: 0.5rem;\n}\n\n.g-2,\n.gy-2 {\n --bs-gutter-y: 0.5rem;\n}\n\n.g-3,\n.gx-3 {\n --bs-gutter-x: 1rem;\n}\n\n.g-3,\n.gy-3 {\n --bs-gutter-y: 1rem;\n}\n\n.g-4,\n.gx-4 {\n --bs-gutter-x: 1.5rem;\n}\n\n.g-4,\n.gy-4 {\n --bs-gutter-y: 1.5rem;\n}\n\n.g-5,\n.gx-5 {\n --bs-gutter-x: 3rem;\n}\n\n.g-5,\n.gy-5 {\n --bs-gutter-y: 3rem;\n}\n\n@media (min-width: 576px) {\n .col-sm {\n flex: 1 0 0%;\n }\n\n .row-cols-sm-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-sm-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-sm-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-sm-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-sm-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-sm-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-sm-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-sm-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-sm-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-sm-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-sm-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-sm-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-sm-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-sm-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-sm-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-sm-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-sm-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-sm-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-sm-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-sm-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-sm-0 {\n margin-left: 0;\n }\n\n .offset-sm-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-sm-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-sm-3 {\n margin-left: 25%;\n }\n\n .offset-sm-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-sm-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-sm-6 {\n margin-left: 50%;\n }\n\n .offset-sm-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-sm-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-sm-9 {\n margin-left: 75%;\n }\n\n .offset-sm-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-sm-11 {\n margin-left: 91.66666667%;\n }\n\n .g-sm-0,\n.gx-sm-0 {\n --bs-gutter-x: 0;\n }\n\n .g-sm-0,\n.gy-sm-0 {\n --bs-gutter-y: 0;\n }\n\n .g-sm-1,\n.gx-sm-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-sm-1,\n.gy-sm-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-sm-2,\n.gx-sm-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-sm-2,\n.gy-sm-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-sm-3,\n.gx-sm-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-sm-3,\n.gy-sm-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-sm-4,\n.gx-sm-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-sm-4,\n.gy-sm-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-sm-5,\n.gx-sm-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-sm-5,\n.gy-sm-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 768px) {\n .col-md {\n flex: 1 0 0%;\n }\n\n .row-cols-md-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-md-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-md-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-md-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-md-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-md-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-md-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-md-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-md-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-md-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-md-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-md-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-md-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-md-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-md-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-md-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-md-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-md-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-md-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-md-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-md-0 {\n margin-left: 0;\n }\n\n .offset-md-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-md-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-md-3 {\n margin-left: 25%;\n }\n\n .offset-md-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-md-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-md-6 {\n margin-left: 50%;\n }\n\n .offset-md-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-md-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-md-9 {\n margin-left: 75%;\n }\n\n .offset-md-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-md-11 {\n margin-left: 91.66666667%;\n }\n\n .g-md-0,\n.gx-md-0 {\n --bs-gutter-x: 0;\n }\n\n .g-md-0,\n.gy-md-0 {\n --bs-gutter-y: 0;\n }\n\n .g-md-1,\n.gx-md-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-md-1,\n.gy-md-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-md-2,\n.gx-md-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-md-2,\n.gy-md-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-md-3,\n.gx-md-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-md-3,\n.gy-md-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-md-4,\n.gx-md-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-md-4,\n.gy-md-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-md-5,\n.gx-md-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-md-5,\n.gy-md-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 992px) {\n .col-lg {\n flex: 1 0 0%;\n }\n\n .row-cols-lg-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-lg-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-lg-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-lg-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-lg-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-lg-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-lg-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-lg-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-lg-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-lg-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-lg-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-lg-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-lg-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-lg-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-lg-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-lg-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-lg-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-lg-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-lg-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-lg-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-lg-0 {\n margin-left: 0;\n }\n\n .offset-lg-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-lg-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-lg-3 {\n margin-left: 25%;\n }\n\n .offset-lg-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-lg-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-lg-6 {\n margin-left: 50%;\n }\n\n .offset-lg-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-lg-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-lg-9 {\n margin-left: 75%;\n }\n\n .offset-lg-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-lg-11 {\n margin-left: 91.66666667%;\n }\n\n .g-lg-0,\n.gx-lg-0 {\n --bs-gutter-x: 0;\n }\n\n .g-lg-0,\n.gy-lg-0 {\n --bs-gutter-y: 0;\n }\n\n .g-lg-1,\n.gx-lg-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-lg-1,\n.gy-lg-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-lg-2,\n.gx-lg-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-lg-2,\n.gy-lg-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-lg-3,\n.gx-lg-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-lg-3,\n.gy-lg-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-lg-4,\n.gx-lg-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-lg-4,\n.gy-lg-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-lg-5,\n.gx-lg-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-lg-5,\n.gy-lg-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 1200px) {\n .col-xl {\n flex: 1 0 0%;\n }\n\n .row-cols-xl-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-xl-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-xl-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-xl-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-xl-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-xl-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-xl-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-xl-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-xl-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-xl-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-xl-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-xl-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-xl-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-xl-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-xl-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-xl-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-xl-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-xl-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-xl-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-xl-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-xl-0 {\n margin-left: 0;\n }\n\n .offset-xl-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-xl-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-xl-3 {\n margin-left: 25%;\n }\n\n .offset-xl-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-xl-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-xl-6 {\n margin-left: 50%;\n }\n\n .offset-xl-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-xl-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-xl-9 {\n margin-left: 75%;\n }\n\n .offset-xl-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-xl-11 {\n margin-left: 91.66666667%;\n }\n\n .g-xl-0,\n.gx-xl-0 {\n --bs-gutter-x: 0;\n }\n\n .g-xl-0,\n.gy-xl-0 {\n --bs-gutter-y: 0;\n }\n\n .g-xl-1,\n.gx-xl-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-xl-1,\n.gy-xl-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-xl-2,\n.gx-xl-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-xl-2,\n.gy-xl-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-xl-3,\n.gx-xl-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-xl-3,\n.gy-xl-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-xl-4,\n.gx-xl-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-xl-4,\n.gy-xl-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-xl-5,\n.gx-xl-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-xl-5,\n.gy-xl-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 1400px) {\n .col-xxl {\n flex: 1 0 0%;\n }\n\n .row-cols-xxl-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-xxl-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-xxl-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-xxl-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-xxl-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-xxl-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-xxl-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-xxl-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-xxl-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-xxl-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-xxl-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-xxl-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-xxl-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-xxl-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-xxl-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-xxl-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-xxl-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-xxl-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-xxl-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-xxl-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-xxl-0 {\n margin-left: 0;\n }\n\n .offset-xxl-1 {\n margin-left: 8.33333333%;\n }\n\n .offset-xxl-2 {\n margin-left: 16.66666667%;\n }\n\n .offset-xxl-3 {\n margin-left: 25%;\n }\n\n .offset-xxl-4 {\n margin-left: 33.33333333%;\n }\n\n .offset-xxl-5 {\n margin-left: 41.66666667%;\n }\n\n .offset-xxl-6 {\n margin-left: 50%;\n }\n\n .offset-xxl-7 {\n margin-left: 58.33333333%;\n }\n\n .offset-xxl-8 {\n margin-left: 66.66666667%;\n }\n\n .offset-xxl-9 {\n margin-left: 75%;\n }\n\n .offset-xxl-10 {\n margin-left: 83.33333333%;\n }\n\n .offset-xxl-11 {\n margin-left: 91.66666667%;\n }\n\n .g-xxl-0,\n.gx-xxl-0 {\n --bs-gutter-x: 0;\n }\n\n .g-xxl-0,\n.gy-xxl-0 {\n --bs-gutter-y: 0;\n }\n\n .g-xxl-1,\n.gx-xxl-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-xxl-1,\n.gy-xxl-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-xxl-2,\n.gx-xxl-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-xxl-2,\n.gy-xxl-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-xxl-3,\n.gx-xxl-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-xxl-3,\n.gy-xxl-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-xxl-4,\n.gx-xxl-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-xxl-4,\n.gy-xxl-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-xxl-5,\n.gx-xxl-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-xxl-5,\n.gy-xxl-5 {\n --bs-gutter-y: 3rem;\n }\n}\n.d-inline {\n display: inline !important;\n}\n\n.d-inline-block {\n display: inline-block !important;\n}\n\n.d-block {\n display: block !important;\n}\n\n.d-grid {\n display: grid !important;\n}\n\n.d-table {\n display: table !important;\n}\n\n.d-table-row {\n display: table-row !important;\n}\n\n.d-table-cell {\n display: table-cell !important;\n}\n\n.d-flex {\n display: flex !important;\n}\n\n.d-inline-flex {\n display: inline-flex !important;\n}\n\n.d-none {\n display: none !important;\n}\n\n.flex-fill {\n flex: 1 1 auto !important;\n}\n\n.flex-row {\n flex-direction: row !important;\n}\n\n.flex-column {\n flex-direction: column !important;\n}\n\n.flex-row-reverse {\n flex-direction: row-reverse !important;\n}\n\n.flex-column-reverse {\n flex-direction: column-reverse !important;\n}\n\n.flex-grow-0 {\n flex-grow: 0 !important;\n}\n\n.flex-grow-1 {\n flex-grow: 1 !important;\n}\n\n.flex-shrink-0 {\n flex-shrink: 0 !important;\n}\n\n.flex-shrink-1 {\n flex-shrink: 1 !important;\n}\n\n.flex-wrap {\n flex-wrap: wrap !important;\n}\n\n.flex-nowrap {\n flex-wrap: nowrap !important;\n}\n\n.flex-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n}\n\n.justify-content-start {\n justify-content: flex-start !important;\n}\n\n.justify-content-end {\n justify-content: flex-end !important;\n}\n\n.justify-content-center {\n justify-content: center !important;\n}\n\n.justify-content-between {\n justify-content: space-between !important;\n}\n\n.justify-content-around {\n justify-content: space-around !important;\n}\n\n.justify-content-evenly {\n justify-content: space-evenly !important;\n}\n\n.align-items-start {\n align-items: flex-start !important;\n}\n\n.align-items-end {\n align-items: flex-end !important;\n}\n\n.align-items-center {\n align-items: center !important;\n}\n\n.align-items-baseline {\n align-items: baseline !important;\n}\n\n.align-items-stretch {\n align-items: stretch !important;\n}\n\n.align-content-start {\n align-content: flex-start !important;\n}\n\n.align-content-end {\n align-content: flex-end !important;\n}\n\n.align-content-center {\n align-content: center !important;\n}\n\n.align-content-between {\n align-content: space-between !important;\n}\n\n.align-content-around {\n align-content: space-around !important;\n}\n\n.align-content-stretch {\n align-content: stretch !important;\n}\n\n.align-self-auto {\n align-self: auto !important;\n}\n\n.align-self-start {\n align-self: flex-start !important;\n}\n\n.align-self-end {\n align-self: flex-end !important;\n}\n\n.align-self-center {\n align-self: center !important;\n}\n\n.align-self-baseline {\n align-self: baseline !important;\n}\n\n.align-self-stretch {\n align-self: stretch !important;\n}\n\n.order-first {\n order: -1 !important;\n}\n\n.order-0 {\n order: 0 !important;\n}\n\n.order-1 {\n order: 1 !important;\n}\n\n.order-2 {\n order: 2 !important;\n}\n\n.order-3 {\n order: 3 !important;\n}\n\n.order-4 {\n order: 4 !important;\n}\n\n.order-5 {\n order: 5 !important;\n}\n\n.order-last {\n order: 6 !important;\n}\n\n.m-0 {\n margin: 0 !important;\n}\n\n.m-1 {\n margin: 0.25rem !important;\n}\n\n.m-2 {\n margin: 0.5rem !important;\n}\n\n.m-3 {\n margin: 1rem !important;\n}\n\n.m-4 {\n margin: 1.5rem !important;\n}\n\n.m-5 {\n margin: 3rem !important;\n}\n\n.m-auto {\n margin: auto !important;\n}\n\n.mx-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n}\n\n.mx-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n}\n\n.mx-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n}\n\n.mx-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n}\n\n.mx-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n}\n\n.mx-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n}\n\n.mx-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n}\n\n.my-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n}\n\n.my-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n}\n\n.my-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n}\n\n.my-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n}\n\n.my-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n}\n\n.my-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n}\n\n.my-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n}\n\n.mt-0 {\n margin-top: 0 !important;\n}\n\n.mt-1 {\n margin-top: 0.25rem !important;\n}\n\n.mt-2 {\n margin-top: 0.5rem !important;\n}\n\n.mt-3 {\n margin-top: 1rem !important;\n}\n\n.mt-4 {\n margin-top: 1.5rem !important;\n}\n\n.mt-5 {\n margin-top: 3rem !important;\n}\n\n.mt-auto {\n margin-top: auto !important;\n}\n\n.me-0 {\n margin-right: 0 !important;\n}\n\n.me-1 {\n margin-right: 0.25rem !important;\n}\n\n.me-2 {\n margin-right: 0.5rem !important;\n}\n\n.me-3 {\n margin-right: 1rem !important;\n}\n\n.me-4 {\n margin-right: 1.5rem !important;\n}\n\n.me-5 {\n margin-right: 3rem !important;\n}\n\n.me-auto {\n margin-right: auto !important;\n}\n\n.mb-0 {\n margin-bottom: 0 !important;\n}\n\n.mb-1 {\n margin-bottom: 0.25rem !important;\n}\n\n.mb-2 {\n margin-bottom: 0.5rem !important;\n}\n\n.mb-3 {\n margin-bottom: 1rem !important;\n}\n\n.mb-4 {\n margin-bottom: 1.5rem !important;\n}\n\n.mb-5 {\n margin-bottom: 3rem !important;\n}\n\n.mb-auto {\n margin-bottom: auto !important;\n}\n\n.ms-0 {\n margin-left: 0 !important;\n}\n\n.ms-1 {\n margin-left: 0.25rem !important;\n}\n\n.ms-2 {\n margin-left: 0.5rem !important;\n}\n\n.ms-3 {\n margin-left: 1rem !important;\n}\n\n.ms-4 {\n margin-left: 1.5rem !important;\n}\n\n.ms-5 {\n margin-left: 3rem !important;\n}\n\n.ms-auto {\n margin-left: auto !important;\n}\n\n.p-0 {\n padding: 0 !important;\n}\n\n.p-1 {\n padding: 0.25rem !important;\n}\n\n.p-2 {\n padding: 0.5rem !important;\n}\n\n.p-3 {\n padding: 1rem !important;\n}\n\n.p-4 {\n padding: 1.5rem !important;\n}\n\n.p-5 {\n padding: 3rem !important;\n}\n\n.px-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n}\n\n.px-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n}\n\n.px-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n}\n\n.px-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n}\n\n.px-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n}\n\n.px-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n}\n\n.py-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n}\n\n.py-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n}\n\n.py-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n}\n\n.py-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n}\n\n.py-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n}\n\n.py-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n}\n\n.pt-0 {\n padding-top: 0 !important;\n}\n\n.pt-1 {\n padding-top: 0.25rem !important;\n}\n\n.pt-2 {\n padding-top: 0.5rem !important;\n}\n\n.pt-3 {\n padding-top: 1rem !important;\n}\n\n.pt-4 {\n padding-top: 1.5rem !important;\n}\n\n.pt-5 {\n padding-top: 3rem !important;\n}\n\n.pe-0 {\n padding-right: 0 !important;\n}\n\n.pe-1 {\n padding-right: 0.25rem !important;\n}\n\n.pe-2 {\n padding-right: 0.5rem !important;\n}\n\n.pe-3 {\n padding-right: 1rem !important;\n}\n\n.pe-4 {\n padding-right: 1.5rem !important;\n}\n\n.pe-5 {\n padding-right: 3rem !important;\n}\n\n.pb-0 {\n padding-bottom: 0 !important;\n}\n\n.pb-1 {\n padding-bottom: 0.25rem !important;\n}\n\n.pb-2 {\n padding-bottom: 0.5rem !important;\n}\n\n.pb-3 {\n padding-bottom: 1rem !important;\n}\n\n.pb-4 {\n padding-bottom: 1.5rem !important;\n}\n\n.pb-5 {\n padding-bottom: 3rem !important;\n}\n\n.ps-0 {\n padding-left: 0 !important;\n}\n\n.ps-1 {\n padding-left: 0.25rem !important;\n}\n\n.ps-2 {\n padding-left: 0.5rem !important;\n}\n\n.ps-3 {\n padding-left: 1rem !important;\n}\n\n.ps-4 {\n padding-left: 1.5rem !important;\n}\n\n.ps-5 {\n padding-left: 3rem !important;\n}\n\n@media (min-width: 576px) {\n .d-sm-inline {\n display: inline !important;\n }\n\n .d-sm-inline-block {\n display: inline-block !important;\n }\n\n .d-sm-block {\n display: block !important;\n }\n\n .d-sm-grid {\n display: grid !important;\n }\n\n .d-sm-table {\n display: table !important;\n }\n\n .d-sm-table-row {\n display: table-row !important;\n }\n\n .d-sm-table-cell {\n display: table-cell !important;\n }\n\n .d-sm-flex {\n display: flex !important;\n }\n\n .d-sm-inline-flex {\n display: inline-flex !important;\n }\n\n .d-sm-none {\n display: none !important;\n }\n\n .flex-sm-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-sm-row {\n flex-direction: row !important;\n }\n\n .flex-sm-column {\n flex-direction: column !important;\n }\n\n .flex-sm-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-sm-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-sm-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-sm-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-sm-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-sm-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-sm-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-sm-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-sm-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-sm-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-sm-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-sm-center {\n justify-content: center !important;\n }\n\n .justify-content-sm-between {\n justify-content: space-between !important;\n }\n\n .justify-content-sm-around {\n justify-content: space-around !important;\n }\n\n .justify-content-sm-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-sm-start {\n align-items: flex-start !important;\n }\n\n .align-items-sm-end {\n align-items: flex-end !important;\n }\n\n .align-items-sm-center {\n align-items: center !important;\n }\n\n .align-items-sm-baseline {\n align-items: baseline !important;\n }\n\n .align-items-sm-stretch {\n align-items: stretch !important;\n }\n\n .align-content-sm-start {\n align-content: flex-start !important;\n }\n\n .align-content-sm-end {\n align-content: flex-end !important;\n }\n\n .align-content-sm-center {\n align-content: center !important;\n }\n\n .align-content-sm-between {\n align-content: space-between !important;\n }\n\n .align-content-sm-around {\n align-content: space-around !important;\n }\n\n .align-content-sm-stretch {\n align-content: stretch !important;\n }\n\n .align-self-sm-auto {\n align-self: auto !important;\n }\n\n .align-self-sm-start {\n align-self: flex-start !important;\n }\n\n .align-self-sm-end {\n align-self: flex-end !important;\n }\n\n .align-self-sm-center {\n align-self: center !important;\n }\n\n .align-self-sm-baseline {\n align-self: baseline !important;\n }\n\n .align-self-sm-stretch {\n align-self: stretch !important;\n }\n\n .order-sm-first {\n order: -1 !important;\n }\n\n .order-sm-0 {\n order: 0 !important;\n }\n\n .order-sm-1 {\n order: 1 !important;\n }\n\n .order-sm-2 {\n order: 2 !important;\n }\n\n .order-sm-3 {\n order: 3 !important;\n }\n\n .order-sm-4 {\n order: 4 !important;\n }\n\n .order-sm-5 {\n order: 5 !important;\n }\n\n .order-sm-last {\n order: 6 !important;\n }\n\n .m-sm-0 {\n margin: 0 !important;\n }\n\n .m-sm-1 {\n margin: 0.25rem !important;\n }\n\n .m-sm-2 {\n margin: 0.5rem !important;\n }\n\n .m-sm-3 {\n margin: 1rem !important;\n }\n\n .m-sm-4 {\n margin: 1.5rem !important;\n }\n\n .m-sm-5 {\n margin: 3rem !important;\n }\n\n .m-sm-auto {\n margin: auto !important;\n }\n\n .mx-sm-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-sm-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-sm-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-sm-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-sm-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-sm-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-sm-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-sm-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-sm-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-sm-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-sm-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-sm-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-sm-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-sm-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-sm-0 {\n margin-top: 0 !important;\n }\n\n .mt-sm-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-sm-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-sm-3 {\n margin-top: 1rem !important;\n }\n\n .mt-sm-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-sm-5 {\n margin-top: 3rem !important;\n }\n\n .mt-sm-auto {\n margin-top: auto !important;\n }\n\n .me-sm-0 {\n margin-right: 0 !important;\n }\n\n .me-sm-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-sm-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-sm-3 {\n margin-right: 1rem !important;\n }\n\n .me-sm-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-sm-5 {\n margin-right: 3rem !important;\n }\n\n .me-sm-auto {\n margin-right: auto !important;\n }\n\n .mb-sm-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-sm-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-sm-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-sm-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-sm-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-sm-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-sm-auto {\n margin-bottom: auto !important;\n }\n\n .ms-sm-0 {\n margin-left: 0 !important;\n }\n\n .ms-sm-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-sm-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-sm-3 {\n margin-left: 1rem !important;\n }\n\n .ms-sm-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-sm-5 {\n margin-left: 3rem !important;\n }\n\n .ms-sm-auto {\n margin-left: auto !important;\n }\n\n .p-sm-0 {\n padding: 0 !important;\n }\n\n .p-sm-1 {\n padding: 0.25rem !important;\n }\n\n .p-sm-2 {\n padding: 0.5rem !important;\n }\n\n .p-sm-3 {\n padding: 1rem !important;\n }\n\n .p-sm-4 {\n padding: 1.5rem !important;\n }\n\n .p-sm-5 {\n padding: 3rem !important;\n }\n\n .px-sm-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-sm-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-sm-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-sm-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-sm-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-sm-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-sm-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-sm-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-sm-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-sm-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-sm-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-sm-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-sm-0 {\n padding-top: 0 !important;\n }\n\n .pt-sm-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-sm-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-sm-3 {\n padding-top: 1rem !important;\n }\n\n .pt-sm-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-sm-5 {\n padding-top: 3rem !important;\n }\n\n .pe-sm-0 {\n padding-right: 0 !important;\n }\n\n .pe-sm-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-sm-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-sm-3 {\n padding-right: 1rem !important;\n }\n\n .pe-sm-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-sm-5 {\n padding-right: 3rem !important;\n }\n\n .pb-sm-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-sm-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-sm-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-sm-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-sm-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-sm-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-sm-0 {\n padding-left: 0 !important;\n }\n\n .ps-sm-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-sm-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-sm-3 {\n padding-left: 1rem !important;\n }\n\n .ps-sm-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-sm-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 768px) {\n .d-md-inline {\n display: inline !important;\n }\n\n .d-md-inline-block {\n display: inline-block !important;\n }\n\n .d-md-block {\n display: block !important;\n }\n\n .d-md-grid {\n display: grid !important;\n }\n\n .d-md-table {\n display: table !important;\n }\n\n .d-md-table-row {\n display: table-row !important;\n }\n\n .d-md-table-cell {\n display: table-cell !important;\n }\n\n .d-md-flex {\n display: flex !important;\n }\n\n .d-md-inline-flex {\n display: inline-flex !important;\n }\n\n .d-md-none {\n display: none !important;\n }\n\n .flex-md-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-md-row {\n flex-direction: row !important;\n }\n\n .flex-md-column {\n flex-direction: column !important;\n }\n\n .flex-md-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-md-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-md-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-md-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-md-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-md-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-md-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-md-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-md-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-md-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-md-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-md-center {\n justify-content: center !important;\n }\n\n .justify-content-md-between {\n justify-content: space-between !important;\n }\n\n .justify-content-md-around {\n justify-content: space-around !important;\n }\n\n .justify-content-md-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-md-start {\n align-items: flex-start !important;\n }\n\n .align-items-md-end {\n align-items: flex-end !important;\n }\n\n .align-items-md-center {\n align-items: center !important;\n }\n\n .align-items-md-baseline {\n align-items: baseline !important;\n }\n\n .align-items-md-stretch {\n align-items: stretch !important;\n }\n\n .align-content-md-start {\n align-content: flex-start !important;\n }\n\n .align-content-md-end {\n align-content: flex-end !important;\n }\n\n .align-content-md-center {\n align-content: center !important;\n }\n\n .align-content-md-between {\n align-content: space-between !important;\n }\n\n .align-content-md-around {\n align-content: space-around !important;\n }\n\n .align-content-md-stretch {\n align-content: stretch !important;\n }\n\n .align-self-md-auto {\n align-self: auto !important;\n }\n\n .align-self-md-start {\n align-self: flex-start !important;\n }\n\n .align-self-md-end {\n align-self: flex-end !important;\n }\n\n .align-self-md-center {\n align-self: center !important;\n }\n\n .align-self-md-baseline {\n align-self: baseline !important;\n }\n\n .align-self-md-stretch {\n align-self: stretch !important;\n }\n\n .order-md-first {\n order: -1 !important;\n }\n\n .order-md-0 {\n order: 0 !important;\n }\n\n .order-md-1 {\n order: 1 !important;\n }\n\n .order-md-2 {\n order: 2 !important;\n }\n\n .order-md-3 {\n order: 3 !important;\n }\n\n .order-md-4 {\n order: 4 !important;\n }\n\n .order-md-5 {\n order: 5 !important;\n }\n\n .order-md-last {\n order: 6 !important;\n }\n\n .m-md-0 {\n margin: 0 !important;\n }\n\n .m-md-1 {\n margin: 0.25rem !important;\n }\n\n .m-md-2 {\n margin: 0.5rem !important;\n }\n\n .m-md-3 {\n margin: 1rem !important;\n }\n\n .m-md-4 {\n margin: 1.5rem !important;\n }\n\n .m-md-5 {\n margin: 3rem !important;\n }\n\n .m-md-auto {\n margin: auto !important;\n }\n\n .mx-md-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-md-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-md-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-md-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-md-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-md-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-md-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-md-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-md-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-md-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-md-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-md-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-md-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-md-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-md-0 {\n margin-top: 0 !important;\n }\n\n .mt-md-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-md-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-md-3 {\n margin-top: 1rem !important;\n }\n\n .mt-md-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-md-5 {\n margin-top: 3rem !important;\n }\n\n .mt-md-auto {\n margin-top: auto !important;\n }\n\n .me-md-0 {\n margin-right: 0 !important;\n }\n\n .me-md-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-md-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-md-3 {\n margin-right: 1rem !important;\n }\n\n .me-md-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-md-5 {\n margin-right: 3rem !important;\n }\n\n .me-md-auto {\n margin-right: auto !important;\n }\n\n .mb-md-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-md-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-md-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-md-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-md-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-md-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-md-auto {\n margin-bottom: auto !important;\n }\n\n .ms-md-0 {\n margin-left: 0 !important;\n }\n\n .ms-md-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-md-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-md-3 {\n margin-left: 1rem !important;\n }\n\n .ms-md-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-md-5 {\n margin-left: 3rem !important;\n }\n\n .ms-md-auto {\n margin-left: auto !important;\n }\n\n .p-md-0 {\n padding: 0 !important;\n }\n\n .p-md-1 {\n padding: 0.25rem !important;\n }\n\n .p-md-2 {\n padding: 0.5rem !important;\n }\n\n .p-md-3 {\n padding: 1rem !important;\n }\n\n .p-md-4 {\n padding: 1.5rem !important;\n }\n\n .p-md-5 {\n padding: 3rem !important;\n }\n\n .px-md-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-md-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-md-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-md-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-md-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-md-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-md-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-md-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-md-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-md-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-md-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-md-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-md-0 {\n padding-top: 0 !important;\n }\n\n .pt-md-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-md-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-md-3 {\n padding-top: 1rem !important;\n }\n\n .pt-md-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-md-5 {\n padding-top: 3rem !important;\n }\n\n .pe-md-0 {\n padding-right: 0 !important;\n }\n\n .pe-md-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-md-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-md-3 {\n padding-right: 1rem !important;\n }\n\n .pe-md-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-md-5 {\n padding-right: 3rem !important;\n }\n\n .pb-md-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-md-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-md-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-md-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-md-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-md-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-md-0 {\n padding-left: 0 !important;\n }\n\n .ps-md-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-md-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-md-3 {\n padding-left: 1rem !important;\n }\n\n .ps-md-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-md-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 992px) {\n .d-lg-inline {\n display: inline !important;\n }\n\n .d-lg-inline-block {\n display: inline-block !important;\n }\n\n .d-lg-block {\n display: block !important;\n }\n\n .d-lg-grid {\n display: grid !important;\n }\n\n .d-lg-table {\n display: table !important;\n }\n\n .d-lg-table-row {\n display: table-row !important;\n }\n\n .d-lg-table-cell {\n display: table-cell !important;\n }\n\n .d-lg-flex {\n display: flex !important;\n }\n\n .d-lg-inline-flex {\n display: inline-flex !important;\n }\n\n .d-lg-none {\n display: none !important;\n }\n\n .flex-lg-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-lg-row {\n flex-direction: row !important;\n }\n\n .flex-lg-column {\n flex-direction: column !important;\n }\n\n .flex-lg-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-lg-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-lg-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-lg-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-lg-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-lg-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-lg-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-lg-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-lg-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-lg-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-lg-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-lg-center {\n justify-content: center !important;\n }\n\n .justify-content-lg-between {\n justify-content: space-between !important;\n }\n\n .justify-content-lg-around {\n justify-content: space-around !important;\n }\n\n .justify-content-lg-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-lg-start {\n align-items: flex-start !important;\n }\n\n .align-items-lg-end {\n align-items: flex-end !important;\n }\n\n .align-items-lg-center {\n align-items: center !important;\n }\n\n .align-items-lg-baseline {\n align-items: baseline !important;\n }\n\n .align-items-lg-stretch {\n align-items: stretch !important;\n }\n\n .align-content-lg-start {\n align-content: flex-start !important;\n }\n\n .align-content-lg-end {\n align-content: flex-end !important;\n }\n\n .align-content-lg-center {\n align-content: center !important;\n }\n\n .align-content-lg-between {\n align-content: space-between !important;\n }\n\n .align-content-lg-around {\n align-content: space-around !important;\n }\n\n .align-content-lg-stretch {\n align-content: stretch !important;\n }\n\n .align-self-lg-auto {\n align-self: auto !important;\n }\n\n .align-self-lg-start {\n align-self: flex-start !important;\n }\n\n .align-self-lg-end {\n align-self: flex-end !important;\n }\n\n .align-self-lg-center {\n align-self: center !important;\n }\n\n .align-self-lg-baseline {\n align-self: baseline !important;\n }\n\n .align-self-lg-stretch {\n align-self: stretch !important;\n }\n\n .order-lg-first {\n order: -1 !important;\n }\n\n .order-lg-0 {\n order: 0 !important;\n }\n\n .order-lg-1 {\n order: 1 !important;\n }\n\n .order-lg-2 {\n order: 2 !important;\n }\n\n .order-lg-3 {\n order: 3 !important;\n }\n\n .order-lg-4 {\n order: 4 !important;\n }\n\n .order-lg-5 {\n order: 5 !important;\n }\n\n .order-lg-last {\n order: 6 !important;\n }\n\n .m-lg-0 {\n margin: 0 !important;\n }\n\n .m-lg-1 {\n margin: 0.25rem !important;\n }\n\n .m-lg-2 {\n margin: 0.5rem !important;\n }\n\n .m-lg-3 {\n margin: 1rem !important;\n }\n\n .m-lg-4 {\n margin: 1.5rem !important;\n }\n\n .m-lg-5 {\n margin: 3rem !important;\n }\n\n .m-lg-auto {\n margin: auto !important;\n }\n\n .mx-lg-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-lg-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-lg-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-lg-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-lg-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-lg-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-lg-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-lg-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-lg-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-lg-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-lg-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-lg-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-lg-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-lg-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-lg-0 {\n margin-top: 0 !important;\n }\n\n .mt-lg-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-lg-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-lg-3 {\n margin-top: 1rem !important;\n }\n\n .mt-lg-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-lg-5 {\n margin-top: 3rem !important;\n }\n\n .mt-lg-auto {\n margin-top: auto !important;\n }\n\n .me-lg-0 {\n margin-right: 0 !important;\n }\n\n .me-lg-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-lg-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-lg-3 {\n margin-right: 1rem !important;\n }\n\n .me-lg-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-lg-5 {\n margin-right: 3rem !important;\n }\n\n .me-lg-auto {\n margin-right: auto !important;\n }\n\n .mb-lg-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-lg-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-lg-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-lg-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-lg-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-lg-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-lg-auto {\n margin-bottom: auto !important;\n }\n\n .ms-lg-0 {\n margin-left: 0 !important;\n }\n\n .ms-lg-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-lg-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-lg-3 {\n margin-left: 1rem !important;\n }\n\n .ms-lg-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-lg-5 {\n margin-left: 3rem !important;\n }\n\n .ms-lg-auto {\n margin-left: auto !important;\n }\n\n .p-lg-0 {\n padding: 0 !important;\n }\n\n .p-lg-1 {\n padding: 0.25rem !important;\n }\n\n .p-lg-2 {\n padding: 0.5rem !important;\n }\n\n .p-lg-3 {\n padding: 1rem !important;\n }\n\n .p-lg-4 {\n padding: 1.5rem !important;\n }\n\n .p-lg-5 {\n padding: 3rem !important;\n }\n\n .px-lg-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-lg-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-lg-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-lg-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-lg-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-lg-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-lg-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-lg-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-lg-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-lg-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-lg-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-lg-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-lg-0 {\n padding-top: 0 !important;\n }\n\n .pt-lg-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-lg-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-lg-3 {\n padding-top: 1rem !important;\n }\n\n .pt-lg-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-lg-5 {\n padding-top: 3rem !important;\n }\n\n .pe-lg-0 {\n padding-right: 0 !important;\n }\n\n .pe-lg-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-lg-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-lg-3 {\n padding-right: 1rem !important;\n }\n\n .pe-lg-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-lg-5 {\n padding-right: 3rem !important;\n }\n\n .pb-lg-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-lg-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-lg-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-lg-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-lg-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-lg-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-lg-0 {\n padding-left: 0 !important;\n }\n\n .ps-lg-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-lg-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-lg-3 {\n padding-left: 1rem !important;\n }\n\n .ps-lg-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-lg-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 1200px) {\n .d-xl-inline {\n display: inline !important;\n }\n\n .d-xl-inline-block {\n display: inline-block !important;\n }\n\n .d-xl-block {\n display: block !important;\n }\n\n .d-xl-grid {\n display: grid !important;\n }\n\n .d-xl-table {\n display: table !important;\n }\n\n .d-xl-table-row {\n display: table-row !important;\n }\n\n .d-xl-table-cell {\n display: table-cell !important;\n }\n\n .d-xl-flex {\n display: flex !important;\n }\n\n .d-xl-inline-flex {\n display: inline-flex !important;\n }\n\n .d-xl-none {\n display: none !important;\n }\n\n .flex-xl-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-xl-row {\n flex-direction: row !important;\n }\n\n .flex-xl-column {\n flex-direction: column !important;\n }\n\n .flex-xl-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-xl-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-xl-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-xl-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-xl-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-xl-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-xl-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-xl-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-xl-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-xl-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-xl-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-xl-center {\n justify-content: center !important;\n }\n\n .justify-content-xl-between {\n justify-content: space-between !important;\n }\n\n .justify-content-xl-around {\n justify-content: space-around !important;\n }\n\n .justify-content-xl-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-xl-start {\n align-items: flex-start !important;\n }\n\n .align-items-xl-end {\n align-items: flex-end !important;\n }\n\n .align-items-xl-center {\n align-items: center !important;\n }\n\n .align-items-xl-baseline {\n align-items: baseline !important;\n }\n\n .align-items-xl-stretch {\n align-items: stretch !important;\n }\n\n .align-content-xl-start {\n align-content: flex-start !important;\n }\n\n .align-content-xl-end {\n align-content: flex-end !important;\n }\n\n .align-content-xl-center {\n align-content: center !important;\n }\n\n .align-content-xl-between {\n align-content: space-between !important;\n }\n\n .align-content-xl-around {\n align-content: space-around !important;\n }\n\n .align-content-xl-stretch {\n align-content: stretch !important;\n }\n\n .align-self-xl-auto {\n align-self: auto !important;\n }\n\n .align-self-xl-start {\n align-self: flex-start !important;\n }\n\n .align-self-xl-end {\n align-self: flex-end !important;\n }\n\n .align-self-xl-center {\n align-self: center !important;\n }\n\n .align-self-xl-baseline {\n align-self: baseline !important;\n }\n\n .align-self-xl-stretch {\n align-self: stretch !important;\n }\n\n .order-xl-first {\n order: -1 !important;\n }\n\n .order-xl-0 {\n order: 0 !important;\n }\n\n .order-xl-1 {\n order: 1 !important;\n }\n\n .order-xl-2 {\n order: 2 !important;\n }\n\n .order-xl-3 {\n order: 3 !important;\n }\n\n .order-xl-4 {\n order: 4 !important;\n }\n\n .order-xl-5 {\n order: 5 !important;\n }\n\n .order-xl-last {\n order: 6 !important;\n }\n\n .m-xl-0 {\n margin: 0 !important;\n }\n\n .m-xl-1 {\n margin: 0.25rem !important;\n }\n\n .m-xl-2 {\n margin: 0.5rem !important;\n }\n\n .m-xl-3 {\n margin: 1rem !important;\n }\n\n .m-xl-4 {\n margin: 1.5rem !important;\n }\n\n .m-xl-5 {\n margin: 3rem !important;\n }\n\n .m-xl-auto {\n margin: auto !important;\n }\n\n .mx-xl-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-xl-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-xl-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-xl-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-xl-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-xl-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-xl-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-xl-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-xl-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-xl-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-xl-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-xl-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-xl-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-xl-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-xl-0 {\n margin-top: 0 !important;\n }\n\n .mt-xl-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-xl-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-xl-3 {\n margin-top: 1rem !important;\n }\n\n .mt-xl-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-xl-5 {\n margin-top: 3rem !important;\n }\n\n .mt-xl-auto {\n margin-top: auto !important;\n }\n\n .me-xl-0 {\n margin-right: 0 !important;\n }\n\n .me-xl-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-xl-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-xl-3 {\n margin-right: 1rem !important;\n }\n\n .me-xl-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-xl-5 {\n margin-right: 3rem !important;\n }\n\n .me-xl-auto {\n margin-right: auto !important;\n }\n\n .mb-xl-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-xl-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-xl-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-xl-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-xl-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-xl-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-xl-auto {\n margin-bottom: auto !important;\n }\n\n .ms-xl-0 {\n margin-left: 0 !important;\n }\n\n .ms-xl-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-xl-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-xl-3 {\n margin-left: 1rem !important;\n }\n\n .ms-xl-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-xl-5 {\n margin-left: 3rem !important;\n }\n\n .ms-xl-auto {\n margin-left: auto !important;\n }\n\n .p-xl-0 {\n padding: 0 !important;\n }\n\n .p-xl-1 {\n padding: 0.25rem !important;\n }\n\n .p-xl-2 {\n padding: 0.5rem !important;\n }\n\n .p-xl-3 {\n padding: 1rem !important;\n }\n\n .p-xl-4 {\n padding: 1.5rem !important;\n }\n\n .p-xl-5 {\n padding: 3rem !important;\n }\n\n .px-xl-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-xl-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-xl-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-xl-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-xl-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-xl-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-xl-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-xl-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-xl-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-xl-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-xl-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-xl-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-xl-0 {\n padding-top: 0 !important;\n }\n\n .pt-xl-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-xl-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-xl-3 {\n padding-top: 1rem !important;\n }\n\n .pt-xl-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-xl-5 {\n padding-top: 3rem !important;\n }\n\n .pe-xl-0 {\n padding-right: 0 !important;\n }\n\n .pe-xl-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-xl-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-xl-3 {\n padding-right: 1rem !important;\n }\n\n .pe-xl-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-xl-5 {\n padding-right: 3rem !important;\n }\n\n .pb-xl-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-xl-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-xl-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-xl-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-xl-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-xl-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-xl-0 {\n padding-left: 0 !important;\n }\n\n .ps-xl-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-xl-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-xl-3 {\n padding-left: 1rem !important;\n }\n\n .ps-xl-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-xl-5 {\n padding-left: 3rem !important;\n }\n}\n@media (min-width: 1400px) {\n .d-xxl-inline {\n display: inline !important;\n }\n\n .d-xxl-inline-block {\n display: inline-block !important;\n }\n\n .d-xxl-block {\n display: block !important;\n }\n\n .d-xxl-grid {\n display: grid !important;\n }\n\n .d-xxl-table {\n display: table !important;\n }\n\n .d-xxl-table-row {\n display: table-row !important;\n }\n\n .d-xxl-table-cell {\n display: table-cell !important;\n }\n\n .d-xxl-flex {\n display: flex !important;\n }\n\n .d-xxl-inline-flex {\n display: inline-flex !important;\n }\n\n .d-xxl-none {\n display: none !important;\n }\n\n .flex-xxl-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-xxl-row {\n flex-direction: row !important;\n }\n\n .flex-xxl-column {\n flex-direction: column !important;\n }\n\n .flex-xxl-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-xxl-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-xxl-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-xxl-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-xxl-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-xxl-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-xxl-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-xxl-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-xxl-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-xxl-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-xxl-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-xxl-center {\n justify-content: center !important;\n }\n\n .justify-content-xxl-between {\n justify-content: space-between !important;\n }\n\n .justify-content-xxl-around {\n justify-content: space-around !important;\n }\n\n .justify-content-xxl-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-xxl-start {\n align-items: flex-start !important;\n }\n\n .align-items-xxl-end {\n align-items: flex-end !important;\n }\n\n .align-items-xxl-center {\n align-items: center !important;\n }\n\n .align-items-xxl-baseline {\n align-items: baseline !important;\n }\n\n .align-items-xxl-stretch {\n align-items: stretch !important;\n }\n\n .align-content-xxl-start {\n align-content: flex-start !important;\n }\n\n .align-content-xxl-end {\n align-content: flex-end !important;\n }\n\n .align-content-xxl-center {\n align-content: center !important;\n }\n\n .align-content-xxl-between {\n align-content: space-between !important;\n }\n\n .align-content-xxl-around {\n align-content: space-around !important;\n }\n\n .align-content-xxl-stretch {\n align-content: stretch !important;\n }\n\n .align-self-xxl-auto {\n align-self: auto !important;\n }\n\n .align-self-xxl-start {\n align-self: flex-start !important;\n }\n\n .align-self-xxl-end {\n align-self: flex-end !important;\n }\n\n .align-self-xxl-center {\n align-self: center !important;\n }\n\n .align-self-xxl-baseline {\n align-self: baseline !important;\n }\n\n .align-self-xxl-stretch {\n align-self: stretch !important;\n }\n\n .order-xxl-first {\n order: -1 !important;\n }\n\n .order-xxl-0 {\n order: 0 !important;\n }\n\n .order-xxl-1 {\n order: 1 !important;\n }\n\n .order-xxl-2 {\n order: 2 !important;\n }\n\n .order-xxl-3 {\n order: 3 !important;\n }\n\n .order-xxl-4 {\n order: 4 !important;\n }\n\n .order-xxl-5 {\n order: 5 !important;\n }\n\n .order-xxl-last {\n order: 6 !important;\n }\n\n .m-xxl-0 {\n margin: 0 !important;\n }\n\n .m-xxl-1 {\n margin: 0.25rem !important;\n }\n\n .m-xxl-2 {\n margin: 0.5rem !important;\n }\n\n .m-xxl-3 {\n margin: 1rem !important;\n }\n\n .m-xxl-4 {\n margin: 1.5rem !important;\n }\n\n .m-xxl-5 {\n margin: 3rem !important;\n }\n\n .m-xxl-auto {\n margin: auto !important;\n }\n\n .mx-xxl-0 {\n margin-right: 0 !important;\n margin-left: 0 !important;\n }\n\n .mx-xxl-1 {\n margin-right: 0.25rem !important;\n margin-left: 0.25rem !important;\n }\n\n .mx-xxl-2 {\n margin-right: 0.5rem !important;\n margin-left: 0.5rem !important;\n }\n\n .mx-xxl-3 {\n margin-right: 1rem !important;\n margin-left: 1rem !important;\n }\n\n .mx-xxl-4 {\n margin-right: 1.5rem !important;\n margin-left: 1.5rem !important;\n }\n\n .mx-xxl-5 {\n margin-right: 3rem !important;\n margin-left: 3rem !important;\n }\n\n .mx-xxl-auto {\n margin-right: auto !important;\n margin-left: auto !important;\n }\n\n .my-xxl-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-xxl-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-xxl-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-xxl-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-xxl-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-xxl-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-xxl-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-xxl-0 {\n margin-top: 0 !important;\n }\n\n .mt-xxl-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-xxl-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-xxl-3 {\n margin-top: 1rem !important;\n }\n\n .mt-xxl-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-xxl-5 {\n margin-top: 3rem !important;\n }\n\n .mt-xxl-auto {\n margin-top: auto !important;\n }\n\n .me-xxl-0 {\n margin-right: 0 !important;\n }\n\n .me-xxl-1 {\n margin-right: 0.25rem !important;\n }\n\n .me-xxl-2 {\n margin-right: 0.5rem !important;\n }\n\n .me-xxl-3 {\n margin-right: 1rem !important;\n }\n\n .me-xxl-4 {\n margin-right: 1.5rem !important;\n }\n\n .me-xxl-5 {\n margin-right: 3rem !important;\n }\n\n .me-xxl-auto {\n margin-right: auto !important;\n }\n\n .mb-xxl-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-xxl-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-xxl-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-xxl-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-xxl-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-xxl-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-xxl-auto {\n margin-bottom: auto !important;\n }\n\n .ms-xxl-0 {\n margin-left: 0 !important;\n }\n\n .ms-xxl-1 {\n margin-left: 0.25rem !important;\n }\n\n .ms-xxl-2 {\n margin-left: 0.5rem !important;\n }\n\n .ms-xxl-3 {\n margin-left: 1rem !important;\n }\n\n .ms-xxl-4 {\n margin-left: 1.5rem !important;\n }\n\n .ms-xxl-5 {\n margin-left: 3rem !important;\n }\n\n .ms-xxl-auto {\n margin-left: auto !important;\n }\n\n .p-xxl-0 {\n padding: 0 !important;\n }\n\n .p-xxl-1 {\n padding: 0.25rem !important;\n }\n\n .p-xxl-2 {\n padding: 0.5rem !important;\n }\n\n .p-xxl-3 {\n padding: 1rem !important;\n }\n\n .p-xxl-4 {\n padding: 1.5rem !important;\n }\n\n .p-xxl-5 {\n padding: 3rem !important;\n }\n\n .px-xxl-0 {\n padding-right: 0 !important;\n padding-left: 0 !important;\n }\n\n .px-xxl-1 {\n padding-right: 0.25rem !important;\n padding-left: 0.25rem !important;\n }\n\n .px-xxl-2 {\n padding-right: 0.5rem !important;\n padding-left: 0.5rem !important;\n }\n\n .px-xxl-3 {\n padding-right: 1rem !important;\n padding-left: 1rem !important;\n }\n\n .px-xxl-4 {\n padding-right: 1.5rem !important;\n padding-left: 1.5rem !important;\n }\n\n .px-xxl-5 {\n padding-right: 3rem !important;\n padding-left: 3rem !important;\n }\n\n .py-xxl-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-xxl-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-xxl-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-xxl-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-xxl-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-xxl-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-xxl-0 {\n padding-top: 0 !important;\n }\n\n .pt-xxl-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-xxl-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-xxl-3 {\n padding-top: 1rem !important;\n }\n\n .pt-xxl-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-xxl-5 {\n padding-top: 3rem !important;\n }\n\n .pe-xxl-0 {\n padding-right: 0 !important;\n }\n\n .pe-xxl-1 {\n padding-right: 0.25rem !important;\n }\n\n .pe-xxl-2 {\n padding-right: 0.5rem !important;\n }\n\n .pe-xxl-3 {\n padding-right: 1rem !important;\n }\n\n .pe-xxl-4 {\n padding-right: 1.5rem !important;\n }\n\n .pe-xxl-5 {\n padding-right: 3rem !important;\n }\n\n .pb-xxl-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-xxl-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-xxl-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-xxl-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-xxl-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-xxl-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-xxl-0 {\n padding-left: 0 !important;\n }\n\n .ps-xxl-1 {\n padding-left: 0.25rem !important;\n }\n\n .ps-xxl-2 {\n padding-left: 0.5rem !important;\n }\n\n .ps-xxl-3 {\n padding-left: 1rem !important;\n }\n\n .ps-xxl-4 {\n padding-left: 1.5rem !important;\n }\n\n .ps-xxl-5 {\n padding-left: 3rem !important;\n }\n}\n@media print {\n .d-print-inline {\n display: inline !important;\n }\n\n .d-print-inline-block {\n display: inline-block !important;\n }\n\n .d-print-block {\n display: block !important;\n }\n\n .d-print-grid {\n display: grid !important;\n }\n\n .d-print-table {\n display: table !important;\n }\n\n .d-print-table-row {\n display: table-row !important;\n }\n\n .d-print-table-cell {\n display: table-cell !important;\n }\n\n .d-print-flex {\n display: flex !important;\n }\n\n .d-print-inline-flex {\n display: inline-flex !important;\n }\n\n .d-print-none {\n display: none !important;\n }\n}\n\n/*# sourceMappingURL=bootstrap-grid.css.map */\n","// Breakpoint viewport sizes and media queries.\n//\n// Breakpoints are defined as a map of (name: minimum width), order from small to large:\n//\n// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)\n//\n// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.\n\n// Name of the next breakpoint, or null for the last breakpoint.\n//\n// >> breakpoint-next(sm)\n// md\n// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// md\n// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))\n// md\n@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {\n $n: index($breakpoint-names, $name);\n @if not $n {\n @error \"breakpoint `#{$name}` not found in `#{$breakpoints}`\";\n }\n @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);\n}\n\n// Minimum breakpoint width. Null for the smallest (first) breakpoint.\n//\n// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// 576px\n@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {\n $min: map-get($breakpoints, $name);\n @return if($min != 0, $min, null);\n}\n\n// Maximum breakpoint width.\n// The maximum value is reduced by 0.02px to work around the limitations of\n// `min-` and `max-` prefixes and viewports with fractional widths.\n// See https://www.w3.org/TR/mediaqueries-4/#mq-min-max\n// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\n// See https://bugs.webkit.org/show_bug.cgi?id=178261\n//\n// >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// 767.98px\n@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {\n $max: map-get($breakpoints, $name);\n @return if($max and $max > 0, $max - .02, null);\n}\n\n// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.\n// Useful for making responsive utilities.\n//\n// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// \"\" (Returns a blank string)\n// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// \"-sm\"\n@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {\n @return if(breakpoint-min($name, $breakpoints) == null, \"\", \"-#{$name}\");\n}\n\n// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.\n// Makes the @content apply to the given breakpoint and wider.\n@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n @if $min {\n @media (min-width: $min) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Media of at most the maximum breakpoint width. No query for the largest breakpoint.\n// Makes the @content apply to the given breakpoint and narrower.\n@mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) {\n $max: breakpoint-max($name, $breakpoints);\n @if $max {\n @media (max-width: $max) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Media that spans multiple breakpoint widths.\n// Makes the @content apply between the min and max breakpoints\n@mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($lower, $breakpoints);\n $max: breakpoint-max($upper, $breakpoints);\n\n @if $min != null and $max != null {\n @media (min-width: $min) and (max-width: $max) {\n @content;\n }\n } @else if $max == null {\n @include media-breakpoint-up($lower, $breakpoints) {\n @content;\n }\n } @else if $min == null {\n @include media-breakpoint-down($upper, $breakpoints) {\n @content;\n }\n }\n}\n\n// Media between the breakpoint's minimum and maximum widths.\n// No minimum for the smallest breakpoint, and no maximum for the largest one.\n// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.\n@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n $next: breakpoint-next($name, $breakpoints);\n $max: breakpoint-max($next);\n\n @if $min != null and $max != null {\n @media (min-width: $min) and (max-width: $max) {\n @content;\n }\n } @else if $max == null {\n @include media-breakpoint-up($name, $breakpoints) {\n @content;\n }\n } @else if $min == null {\n @include media-breakpoint-down($next, $breakpoints) {\n @content;\n }\n }\n}\n","// Variables\n//\n// Variables should follow the `$component-state-property-size` formula for\n// consistent naming. Ex: $nav-link-disabled-color and $modal-content-box-shadow-xs.\n\n// Color system\n\n// scss-docs-start gray-color-variables\n$white: #fff !default;\n$gray-100: #f8f9fa !default;\n$gray-200: #e9ecef !default;\n$gray-300: #dee2e6 !default;\n$gray-400: #ced4da !default;\n$gray-500: #adb5bd !default;\n$gray-600: #6c757d !default;\n$gray-700: #495057 !default;\n$gray-800: #343a40 !default;\n$gray-900: #212529 !default;\n$black: #000 !default;\n// scss-docs-end gray-color-variables\n\n// fusv-disable\n// scss-docs-start gray-colors-map\n$grays: (\n \"100\": $gray-100,\n \"200\": $gray-200,\n \"300\": $gray-300,\n \"400\": $gray-400,\n \"500\": $gray-500,\n \"600\": $gray-600,\n \"700\": $gray-700,\n \"800\": $gray-800,\n \"900\": $gray-900\n) !default;\n// scss-docs-end gray-colors-map\n// fusv-enable\n\n// scss-docs-start color-variables\n$blue: #0d6efd !default;\n$indigo: #6610f2 !default;\n$purple: #6f42c1 !default;\n$pink: #d63384 !default;\n$red: #dc3545 !default;\n$orange: #fd7e14 !default;\n$yellow: #ffc107 !default;\n$green: #198754 !default;\n$teal: #20c997 !default;\n$cyan: #0dcaf0 !default;\n// scss-docs-end color-variables\n\n// scss-docs-start colors-map\n$colors: (\n \"blue\": $blue,\n \"indigo\": $indigo,\n \"purple\": $purple,\n \"pink\": $pink,\n \"red\": $red,\n \"orange\": $orange,\n \"yellow\": $yellow,\n \"green\": $green,\n \"teal\": $teal,\n \"cyan\": $cyan,\n \"white\": $white,\n \"gray\": $gray-600,\n \"gray-dark\": $gray-800\n) !default;\n// scss-docs-end colors-map\n\n// scss-docs-start theme-color-variables\n$primary: $blue !default;\n$secondary: $gray-600 !default;\n$success: $green !default;\n$info: $cyan !default;\n$warning: $yellow !default;\n$danger: $red !default;\n$light: $gray-100 !default;\n$dark: $gray-900 !default;\n// scss-docs-end theme-color-variables\n\n// scss-docs-start theme-colors-map\n$theme-colors: (\n \"primary\": $primary,\n \"secondary\": $secondary,\n \"success\": $success,\n \"info\": $info,\n \"warning\": $warning,\n \"danger\": $danger,\n \"light\": $light,\n \"dark\": $dark\n) !default;\n// scss-docs-end theme-colors-map\n\n// scss-docs-start theme-colors-rgb\n$theme-colors-rgb: map-loop($theme-colors, to-rgb, \"$value\") !default;\n// scss-docs-end theme-colors-rgb\n\n// The contrast ratio to reach against white, to determine if color changes from \"light\" to \"dark\". Acceptable values for WCAG 2.0 are 3, 4.5 and 7.\n// See https://www.w3.org/TR/WCAG20/#visual-audio-contrast-contrast\n$min-contrast-ratio: 4.5 !default;\n\n// Customize the light and dark text colors for use in our color contrast function.\n$color-contrast-dark: $black !default;\n$color-contrast-light: $white !default;\n\n// fusv-disable\n$blue-100: tint-color($blue, 80%) !default;\n$blue-200: tint-color($blue, 60%) !default;\n$blue-300: tint-color($blue, 40%) !default;\n$blue-400: tint-color($blue, 20%) !default;\n$blue-500: $blue !default;\n$blue-600: shade-color($blue, 20%) !default;\n$blue-700: shade-color($blue, 40%) !default;\n$blue-800: shade-color($blue, 60%) !default;\n$blue-900: shade-color($blue, 80%) !default;\n\n$indigo-100: tint-color($indigo, 80%) !default;\n$indigo-200: tint-color($indigo, 60%) !default;\n$indigo-300: tint-color($indigo, 40%) !default;\n$indigo-400: tint-color($indigo, 20%) !default;\n$indigo-500: $indigo !default;\n$indigo-600: shade-color($indigo, 20%) !default;\n$indigo-700: shade-color($indigo, 40%) !default;\n$indigo-800: shade-color($indigo, 60%) !default;\n$indigo-900: shade-color($indigo, 80%) !default;\n\n$purple-100: tint-color($purple, 80%) !default;\n$purple-200: tint-color($purple, 60%) !default;\n$purple-300: tint-color($purple, 40%) !default;\n$purple-400: tint-color($purple, 20%) !default;\n$purple-500: $purple !default;\n$purple-600: shade-color($purple, 20%) !default;\n$purple-700: shade-color($purple, 40%) !default;\n$purple-800: shade-color($purple, 60%) !default;\n$purple-900: shade-color($purple, 80%) !default;\n\n$pink-100: tint-color($pink, 80%) !default;\n$pink-200: tint-color($pink, 60%) !default;\n$pink-300: tint-color($pink, 40%) !default;\n$pink-400: tint-color($pink, 20%) !default;\n$pink-500: $pink !default;\n$pink-600: shade-color($pink, 20%) !default;\n$pink-700: shade-color($pink, 40%) !default;\n$pink-800: shade-color($pink, 60%) !default;\n$pink-900: shade-color($pink, 80%) !default;\n\n$red-100: tint-color($red, 80%) !default;\n$red-200: tint-color($red, 60%) !default;\n$red-300: tint-color($red, 40%) !default;\n$red-400: tint-color($red, 20%) !default;\n$red-500: $red !default;\n$red-600: shade-color($red, 20%) !default;\n$red-700: shade-color($red, 40%) !default;\n$red-800: shade-color($red, 60%) !default;\n$red-900: shade-color($red, 80%) !default;\n\n$orange-100: tint-color($orange, 80%) !default;\n$orange-200: tint-color($orange, 60%) !default;\n$orange-300: tint-color($orange, 40%) !default;\n$orange-400: tint-color($orange, 20%) !default;\n$orange-500: $orange !default;\n$orange-600: shade-color($orange, 20%) !default;\n$orange-700: shade-color($orange, 40%) !default;\n$orange-800: shade-color($orange, 60%) !default;\n$orange-900: shade-color($orange, 80%) !default;\n\n$yellow-100: tint-color($yellow, 80%) !default;\n$yellow-200: tint-color($yellow, 60%) !default;\n$yellow-300: tint-color($yellow, 40%) !default;\n$yellow-400: tint-color($yellow, 20%) !default;\n$yellow-500: $yellow !default;\n$yellow-600: shade-color($yellow, 20%) !default;\n$yellow-700: shade-color($yellow, 40%) !default;\n$yellow-800: shade-color($yellow, 60%) !default;\n$yellow-900: shade-color($yellow, 80%) !default;\n\n$green-100: tint-color($green, 80%) !default;\n$green-200: tint-color($green, 60%) !default;\n$green-300: tint-color($green, 40%) !default;\n$green-400: tint-color($green, 20%) !default;\n$green-500: $green !default;\n$green-600: shade-color($green, 20%) !default;\n$green-700: shade-color($green, 40%) !default;\n$green-800: shade-color($green, 60%) !default;\n$green-900: shade-color($green, 80%) !default;\n\n$teal-100: tint-color($teal, 80%) !default;\n$teal-200: tint-color($teal, 60%) !default;\n$teal-300: tint-color($teal, 40%) !default;\n$teal-400: tint-color($teal, 20%) !default;\n$teal-500: $teal !default;\n$teal-600: shade-color($teal, 20%) !default;\n$teal-700: shade-color($teal, 40%) !default;\n$teal-800: shade-color($teal, 60%) !default;\n$teal-900: shade-color($teal, 80%) !default;\n\n$cyan-100: tint-color($cyan, 80%) !default;\n$cyan-200: tint-color($cyan, 60%) !default;\n$cyan-300: tint-color($cyan, 40%) !default;\n$cyan-400: tint-color($cyan, 20%) !default;\n$cyan-500: $cyan !default;\n$cyan-600: shade-color($cyan, 20%) !default;\n$cyan-700: shade-color($cyan, 40%) !default;\n$cyan-800: shade-color($cyan, 60%) !default;\n$cyan-900: shade-color($cyan, 80%) !default;\n\n$blues: (\n \"blue-100\": $blue-100,\n \"blue-200\": $blue-200,\n \"blue-300\": $blue-300,\n \"blue-400\": $blue-400,\n \"blue-500\": $blue-500,\n \"blue-600\": $blue-600,\n \"blue-700\": $blue-700,\n \"blue-800\": $blue-800,\n \"blue-900\": $blue-900\n) !default;\n\n$indigos: (\n \"indigo-100\": $indigo-100,\n \"indigo-200\": $indigo-200,\n \"indigo-300\": $indigo-300,\n \"indigo-400\": $indigo-400,\n \"indigo-500\": $indigo-500,\n \"indigo-600\": $indigo-600,\n \"indigo-700\": $indigo-700,\n \"indigo-800\": $indigo-800,\n \"indigo-900\": $indigo-900\n) !default;\n\n$purples: (\n \"purple-100\": $purple-200,\n \"purple-200\": $purple-100,\n \"purple-300\": $purple-300,\n \"purple-400\": $purple-400,\n \"purple-500\": $purple-500,\n \"purple-600\": $purple-600,\n \"purple-700\": $purple-700,\n \"purple-800\": $purple-800,\n \"purple-900\": $purple-900\n) !default;\n\n$pinks: (\n \"pink-100\": $pink-100,\n \"pink-200\": $pink-200,\n \"pink-300\": $pink-300,\n \"pink-400\": $pink-400,\n \"pink-500\": $pink-500,\n \"pink-600\": $pink-600,\n \"pink-700\": $pink-700,\n \"pink-800\": $pink-800,\n \"pink-900\": $pink-900\n) !default;\n\n$reds: (\n \"red-100\": $red-100,\n \"red-200\": $red-200,\n \"red-300\": $red-300,\n \"red-400\": $red-400,\n \"red-500\": $red-500,\n \"red-600\": $red-600,\n \"red-700\": $red-700,\n \"red-800\": $red-800,\n \"red-900\": $red-900\n) !default;\n\n$oranges: (\n \"orange-100\": $orange-100,\n \"orange-200\": $orange-200,\n \"orange-300\": $orange-300,\n \"orange-400\": $orange-400,\n \"orange-500\": $orange-500,\n \"orange-600\": $orange-600,\n \"orange-700\": $orange-700,\n \"orange-800\": $orange-800,\n \"orange-900\": $orange-900\n) !default;\n\n$yellows: (\n \"yellow-100\": $yellow-100,\n \"yellow-200\": $yellow-200,\n \"yellow-300\": $yellow-300,\n \"yellow-400\": $yellow-400,\n \"yellow-500\": $yellow-500,\n \"yellow-600\": $yellow-600,\n \"yellow-700\": $yellow-700,\n \"yellow-800\": $yellow-800,\n \"yellow-900\": $yellow-900\n) !default;\n\n$greens: (\n \"green-100\": $green-100,\n \"green-200\": $green-200,\n \"green-300\": $green-300,\n \"green-400\": $green-400,\n \"green-500\": $green-500,\n \"green-600\": $green-600,\n \"green-700\": $green-700,\n \"green-800\": $green-800,\n \"green-900\": $green-900\n) !default;\n\n$teals: (\n \"teal-100\": $teal-100,\n \"teal-200\": $teal-200,\n \"teal-300\": $teal-300,\n \"teal-400\": $teal-400,\n \"teal-500\": $teal-500,\n \"teal-600\": $teal-600,\n \"teal-700\": $teal-700,\n \"teal-800\": $teal-800,\n \"teal-900\": $teal-900\n) !default;\n\n$cyans: (\n \"cyan-100\": $cyan-100,\n \"cyan-200\": $cyan-200,\n \"cyan-300\": $cyan-300,\n \"cyan-400\": $cyan-400,\n \"cyan-500\": $cyan-500,\n \"cyan-600\": $cyan-600,\n \"cyan-700\": $cyan-700,\n \"cyan-800\": $cyan-800,\n \"cyan-900\": $cyan-900\n) !default;\n// fusv-enable\n\n// Characters which are escaped by the escape-svg function\n$escaped-characters: (\n (\"<\", \"%3c\"),\n (\">\", \"%3e\"),\n (\"#\", \"%23\"),\n (\"(\", \"%28\"),\n (\")\", \"%29\"),\n) !default;\n\n// Options\n//\n// Quickly modify global styling by enabling or disabling optional features.\n\n$enable-caret: true !default;\n$enable-rounded: true !default;\n$enable-shadows: false !default;\n$enable-gradients: false !default;\n$enable-transitions: true !default;\n$enable-reduced-motion: true !default;\n$enable-smooth-scroll: true !default;\n$enable-grid-classes: true !default;\n$enable-cssgrid: false !default;\n$enable-button-pointers: true !default;\n$enable-rfs: true !default;\n$enable-validation-icons: true !default;\n$enable-negative-margins: false !default;\n$enable-deprecation-messages: true !default;\n$enable-important-utilities: true !default;\n\n// Prefix for :root CSS variables\n\n$variable-prefix: bs- !default;\n\n// Gradient\n//\n// The gradient which is added to components if `$enable-gradients` is `true`\n// This gradient is also added to elements with `.bg-gradient`\n// scss-docs-start variable-gradient\n$gradient: linear-gradient(180deg, rgba($white, .15), rgba($white, 0)) !default;\n// scss-docs-end variable-gradient\n\n// Spacing\n//\n// Control the default styling of most Bootstrap elements by modifying these\n// variables. Mostly focused on spacing.\n// You can add more entries to the $spacers map, should you need more variation.\n\n// scss-docs-start spacer-variables-maps\n$spacer: 1rem !default;\n$spacers: (\n 0: 0,\n 1: $spacer * .25,\n 2: $spacer * .5,\n 3: $spacer,\n 4: $spacer * 1.5,\n 5: $spacer * 3,\n) !default;\n\n$negative-spacers: if($enable-negative-margins, negativify-map($spacers), null) !default;\n// scss-docs-end spacer-variables-maps\n\n// Position\n//\n// Define the edge positioning anchors of the position utilities.\n\n// scss-docs-start position-map\n$position-values: (\n 0: 0,\n 50: 50%,\n 100: 100%\n) !default;\n// scss-docs-end position-map\n\n// Body\n//\n// Settings for the `` element.\n\n$body-bg: $white !default;\n$body-color: $gray-900 !default;\n$body-text-align: null !default;\n\n// Utilities maps\n//\n// Extends the default `$theme-colors` maps to help create our utilities.\n\n// scss-docs-start utilities-colors\n$utilities-colors: map-merge(\n $theme-colors-rgb,\n (\n \"black\": to-rgb($black),\n \"white\": to-rgb($white),\n \"body\": to-rgb($body-color)\n )\n) !default;\n// scss-docs-end utilities-colors\n\n// scss-docs-start utilities-text-colors\n$utilities-text-colors: map-loop($utilities-colors, rgba-css-var, \"$key\", \"text\") !default;\n// scss-docs-end utilities-text-colors\n\n// scss-docs-start utilities-bg-colors\n$utilities-bg-colors: map-loop($utilities-colors, rgba-css-var, \"$key\", \"bg\") !default;\n// scss-docs-end utilities-bg-colors\n\n// Links\n//\n// Style anchor elements.\n\n$link-color: $primary !default;\n$link-decoration: underline !default;\n$link-shade-percentage: 20% !default;\n$link-hover-color: shift-color($link-color, $link-shade-percentage) !default;\n$link-hover-decoration: null !default;\n\n$stretched-link-pseudo-element: after !default;\n$stretched-link-z-index: 1 !default;\n\n// Paragraphs\n//\n// Style p element.\n\n$paragraph-margin-bottom: 1rem !default;\n\n\n// Grid breakpoints\n//\n// Define the minimum dimensions at which your layout will change,\n// adapting to different screen sizes, for use in media queries.\n\n// scss-docs-start grid-breakpoints\n$grid-breakpoints: (\n xs: 0,\n sm: 576px,\n md: 768px,\n lg: 992px,\n xl: 1200px,\n xxl: 1400px\n) !default;\n// scss-docs-end grid-breakpoints\n\n@include _assert-ascending($grid-breakpoints, \"$grid-breakpoints\");\n@include _assert-starts-at-zero($grid-breakpoints, \"$grid-breakpoints\");\n\n\n// Grid containers\n//\n// Define the maximum width of `.container` for different screen sizes.\n\n// scss-docs-start container-max-widths\n$container-max-widths: (\n sm: 540px,\n md: 720px,\n lg: 960px,\n xl: 1140px,\n xxl: 1320px\n) !default;\n// scss-docs-end container-max-widths\n\n@include _assert-ascending($container-max-widths, \"$container-max-widths\");\n\n\n// Grid columns\n//\n// Set the number of columns and specify the width of the gutters.\n\n$grid-columns: 12 !default;\n$grid-gutter-width: 1.5rem !default;\n$grid-row-columns: 6 !default;\n\n$gutters: $spacers !default;\n\n// Container padding\n\n$container-padding-x: $grid-gutter-width * .5 !default;\n\n\n// Components\n//\n// Define common padding and border radius sizes and more.\n\n// scss-docs-start border-variables\n$border-width: 1px !default;\n$border-widths: (\n 1: 1px,\n 2: 2px,\n 3: 3px,\n 4: 4px,\n 5: 5px\n) !default;\n\n$border-color: $gray-300 !default;\n// scss-docs-end border-variables\n\n// scss-docs-start border-radius-variables\n$border-radius: .25rem !default;\n$border-radius-sm: .2rem !default;\n$border-radius-lg: .3rem !default;\n$border-radius-pill: 50rem !default;\n// scss-docs-end border-radius-variables\n\n// scss-docs-start box-shadow-variables\n$box-shadow: 0 .5rem 1rem rgba($black, .15) !default;\n$box-shadow-sm: 0 .125rem .25rem rgba($black, .075) !default;\n$box-shadow-lg: 0 1rem 3rem rgba($black, .175) !default;\n$box-shadow-inset: inset 0 1px 2px rgba($black, .075) !default;\n// scss-docs-end box-shadow-variables\n\n$component-active-color: $white !default;\n$component-active-bg: $primary !default;\n\n// scss-docs-start caret-variables\n$caret-width: .3em !default;\n$caret-vertical-align: $caret-width * .85 !default;\n$caret-spacing: $caret-width * .85 !default;\n// scss-docs-end caret-variables\n\n$transition-base: all .2s ease-in-out !default;\n$transition-fade: opacity .15s linear !default;\n// scss-docs-start collapse-transition\n$transition-collapse: height .35s ease !default;\n$transition-collapse-width: width .35s ease !default;\n// scss-docs-end collapse-transition\n\n// stylelint-disable function-disallowed-list\n// scss-docs-start aspect-ratios\n$aspect-ratios: (\n \"1x1\": 100%,\n \"4x3\": calc(3 / 4 * 100%),\n \"16x9\": calc(9 / 16 * 100%),\n \"21x9\": calc(9 / 21 * 100%)\n) !default;\n// scss-docs-end aspect-ratios\n// stylelint-enable function-disallowed-list\n\n// Typography\n//\n// Font, line-height, and color for body text, headings, and more.\n\n// scss-docs-start font-variables\n// stylelint-disable value-keyword-case\n$font-family-sans-serif: system-ui, -apple-system, \"Segoe UI\", Roboto, \"Helvetica Neue\", Arial, \"Noto Sans\", \"Liberation Sans\", sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\" !default;\n$font-family-monospace: SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace !default;\n// stylelint-enable value-keyword-case\n$font-family-base: var(--#{$variable-prefix}font-sans-serif) !default;\n$font-family-code: var(--#{$variable-prefix}font-monospace) !default;\n\n// $font-size-root affects the value of `rem`, which is used for as well font sizes, paddings, and margins\n// $font-size-base affects the font size of the body text\n$font-size-root: null !default;\n$font-size-base: 1rem !default; // Assumes the browser default, typically `16px`\n$font-size-sm: $font-size-base * .875 !default;\n$font-size-lg: $font-size-base * 1.25 !default;\n\n$font-weight-lighter: lighter !default;\n$font-weight-light: 300 !default;\n$font-weight-normal: 400 !default;\n$font-weight-bold: 700 !default;\n$font-weight-bolder: bolder !default;\n\n$font-weight-base: $font-weight-normal !default;\n\n$line-height-base: 1.5 !default;\n$line-height-sm: 1.25 !default;\n$line-height-lg: 2 !default;\n\n$h1-font-size: $font-size-base * 2.5 !default;\n$h2-font-size: $font-size-base * 2 !default;\n$h3-font-size: $font-size-base * 1.75 !default;\n$h4-font-size: $font-size-base * 1.5 !default;\n$h5-font-size: $font-size-base * 1.25 !default;\n$h6-font-size: $font-size-base !default;\n// scss-docs-end font-variables\n\n// scss-docs-start font-sizes\n$font-sizes: (\n 1: $h1-font-size,\n 2: $h2-font-size,\n 3: $h3-font-size,\n 4: $h4-font-size,\n 5: $h5-font-size,\n 6: $h6-font-size\n) !default;\n// scss-docs-end font-sizes\n\n// scss-docs-start headings-variables\n$headings-margin-bottom: $spacer * .5 !default;\n$headings-font-family: null !default;\n$headings-font-style: null !default;\n$headings-font-weight: 500 !default;\n$headings-line-height: 1.2 !default;\n$headings-color: null !default;\n// scss-docs-end headings-variables\n\n// scss-docs-start display-headings\n$display-font-sizes: (\n 1: 5rem,\n 2: 4.5rem,\n 3: 4rem,\n 4: 3.5rem,\n 5: 3rem,\n 6: 2.5rem\n) !default;\n\n$display-font-weight: 300 !default;\n$display-line-height: $headings-line-height !default;\n// scss-docs-end display-headings\n\n// scss-docs-start type-variables\n$lead-font-size: $font-size-base * 1.25 !default;\n$lead-font-weight: 300 !default;\n\n$small-font-size: .875em !default;\n\n$sub-sup-font-size: .75em !default;\n\n$text-muted: $gray-600 !default;\n\n$initialism-font-size: $small-font-size !default;\n\n$blockquote-margin-y: $spacer !default;\n$blockquote-font-size: $font-size-base * 1.25 !default;\n$blockquote-footer-color: $gray-600 !default;\n$blockquote-footer-font-size: $small-font-size !default;\n\n$hr-margin-y: $spacer !default;\n$hr-color: inherit !default;\n$hr-height: $border-width !default;\n$hr-opacity: .25 !default;\n\n$legend-margin-bottom: .5rem !default;\n$legend-font-size: 1.5rem !default;\n$legend-font-weight: null !default;\n\n$mark-padding: .2em !default;\n\n$dt-font-weight: $font-weight-bold !default;\n\n$nested-kbd-font-weight: $font-weight-bold !default;\n\n$list-inline-padding: .5rem !default;\n\n$mark-bg: #fcf8e3 !default;\n// scss-docs-end type-variables\n\n\n// Tables\n//\n// Customizes the `.table` component with basic values, each used across all table variations.\n\n// scss-docs-start table-variables\n$table-cell-padding-y: .5rem !default;\n$table-cell-padding-x: .5rem !default;\n$table-cell-padding-y-sm: .25rem !default;\n$table-cell-padding-x-sm: .25rem !default;\n\n$table-cell-vertical-align: top !default;\n\n$table-color: $body-color !default;\n$table-bg: transparent !default;\n$table-accent-bg: transparent !default;\n\n$table-th-font-weight: null !default;\n\n$table-striped-color: $table-color !default;\n$table-striped-bg-factor: .05 !default;\n$table-striped-bg: rgba($black, $table-striped-bg-factor) !default;\n\n$table-active-color: $table-color !default;\n$table-active-bg-factor: .1 !default;\n$table-active-bg: rgba($black, $table-active-bg-factor) !default;\n\n$table-hover-color: $table-color !default;\n$table-hover-bg-factor: .075 !default;\n$table-hover-bg: rgba($black, $table-hover-bg-factor) !default;\n\n$table-border-factor: .1 !default;\n$table-border-width: $border-width !default;\n$table-border-color: $border-color !default;\n\n$table-striped-order: odd !default;\n\n$table-group-separator-color: currentColor !default;\n\n$table-caption-color: $text-muted !default;\n\n$table-bg-scale: -80% !default;\n// scss-docs-end table-variables\n\n// scss-docs-start table-loop\n$table-variants: (\n \"primary\": shift-color($primary, $table-bg-scale),\n \"secondary\": shift-color($secondary, $table-bg-scale),\n \"success\": shift-color($success, $table-bg-scale),\n \"info\": shift-color($info, $table-bg-scale),\n \"warning\": shift-color($warning, $table-bg-scale),\n \"danger\": shift-color($danger, $table-bg-scale),\n \"light\": $light,\n \"dark\": $dark,\n) !default;\n// scss-docs-end table-loop\n\n\n// Buttons + Forms\n//\n// Shared variables that are reassigned to `$input-` and `$btn-` specific variables.\n\n// scss-docs-start input-btn-variables\n$input-btn-padding-y: .375rem !default;\n$input-btn-padding-x: .75rem !default;\n$input-btn-font-family: null !default;\n$input-btn-font-size: $font-size-base !default;\n$input-btn-line-height: $line-height-base !default;\n\n$input-btn-focus-width: .25rem !default;\n$input-btn-focus-color-opacity: .25 !default;\n$input-btn-focus-color: rgba($component-active-bg, $input-btn-focus-color-opacity) !default;\n$input-btn-focus-blur: 0 !default;\n$input-btn-focus-box-shadow: 0 0 $input-btn-focus-blur $input-btn-focus-width $input-btn-focus-color !default;\n\n$input-btn-padding-y-sm: .25rem !default;\n$input-btn-padding-x-sm: .5rem !default;\n$input-btn-font-size-sm: $font-size-sm !default;\n\n$input-btn-padding-y-lg: .5rem !default;\n$input-btn-padding-x-lg: 1rem !default;\n$input-btn-font-size-lg: $font-size-lg !default;\n\n$input-btn-border-width: $border-width !default;\n// scss-docs-end input-btn-variables\n\n\n// Buttons\n//\n// For each of Bootstrap's buttons, define text, background, and border color.\n\n// scss-docs-start btn-variables\n$btn-padding-y: $input-btn-padding-y !default;\n$btn-padding-x: $input-btn-padding-x !default;\n$btn-font-family: $input-btn-font-family !default;\n$btn-font-size: $input-btn-font-size !default;\n$btn-line-height: $input-btn-line-height !default;\n$btn-white-space: null !default; // Set to `nowrap` to prevent text wrapping\n\n$btn-padding-y-sm: $input-btn-padding-y-sm !default;\n$btn-padding-x-sm: $input-btn-padding-x-sm !default;\n$btn-font-size-sm: $input-btn-font-size-sm !default;\n\n$btn-padding-y-lg: $input-btn-padding-y-lg !default;\n$btn-padding-x-lg: $input-btn-padding-x-lg !default;\n$btn-font-size-lg: $input-btn-font-size-lg !default;\n\n$btn-border-width: $input-btn-border-width !default;\n\n$btn-font-weight: $font-weight-normal !default;\n$btn-box-shadow: inset 0 1px 0 rgba($white, .15), 0 1px 1px rgba($black, .075) !default;\n$btn-focus-width: $input-btn-focus-width !default;\n$btn-focus-box-shadow: $input-btn-focus-box-shadow !default;\n$btn-disabled-opacity: .65 !default;\n$btn-active-box-shadow: inset 0 3px 5px rgba($black, .125) !default;\n\n$btn-link-color: $link-color !default;\n$btn-link-hover-color: $link-hover-color !default;\n$btn-link-disabled-color: $gray-600 !default;\n\n// Allows for customizing button radius independently from global border radius\n$btn-border-radius: $border-radius !default;\n$btn-border-radius-sm: $border-radius-sm !default;\n$btn-border-radius-lg: $border-radius-lg !default;\n\n$btn-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;\n\n$btn-hover-bg-shade-amount: 15% !default;\n$btn-hover-bg-tint-amount: 15% !default;\n$btn-hover-border-shade-amount: 20% !default;\n$btn-hover-border-tint-amount: 10% !default;\n$btn-active-bg-shade-amount: 20% !default;\n$btn-active-bg-tint-amount: 20% !default;\n$btn-active-border-shade-amount: 25% !default;\n$btn-active-border-tint-amount: 10% !default;\n// scss-docs-end btn-variables\n\n\n// Forms\n\n// scss-docs-start form-text-variables\n$form-text-margin-top: .25rem !default;\n$form-text-font-size: $small-font-size !default;\n$form-text-font-style: null !default;\n$form-text-font-weight: null !default;\n$form-text-color: $text-muted !default;\n// scss-docs-end form-text-variables\n\n// scss-docs-start form-label-variables\n$form-label-margin-bottom: .5rem !default;\n$form-label-font-size: null !default;\n$form-label-font-style: null !default;\n$form-label-font-weight: null !default;\n$form-label-color: null !default;\n// scss-docs-end form-label-variables\n\n// scss-docs-start form-input-variables\n$input-padding-y: $input-btn-padding-y !default;\n$input-padding-x: $input-btn-padding-x !default;\n$input-font-family: $input-btn-font-family !default;\n$input-font-size: $input-btn-font-size !default;\n$input-font-weight: $font-weight-base !default;\n$input-line-height: $input-btn-line-height !default;\n\n$input-padding-y-sm: $input-btn-padding-y-sm !default;\n$input-padding-x-sm: $input-btn-padding-x-sm !default;\n$input-font-size-sm: $input-btn-font-size-sm !default;\n\n$input-padding-y-lg: $input-btn-padding-y-lg !default;\n$input-padding-x-lg: $input-btn-padding-x-lg !default;\n$input-font-size-lg: $input-btn-font-size-lg !default;\n\n$input-bg: $body-bg !default;\n$input-disabled-bg: $gray-200 !default;\n$input-disabled-border-color: null !default;\n\n$input-color: $body-color !default;\n$input-border-color: $gray-400 !default;\n$input-border-width: $input-btn-border-width !default;\n$input-box-shadow: $box-shadow-inset !default;\n\n$input-border-radius: $border-radius !default;\n$input-border-radius-sm: $border-radius-sm !default;\n$input-border-radius-lg: $border-radius-lg !default;\n\n$input-focus-bg: $input-bg !default;\n$input-focus-border-color: tint-color($component-active-bg, 50%) !default;\n$input-focus-color: $input-color !default;\n$input-focus-width: $input-btn-focus-width !default;\n$input-focus-box-shadow: $input-btn-focus-box-shadow !default;\n\n$input-placeholder-color: $gray-600 !default;\n$input-plaintext-color: $body-color !default;\n\n$input-height-border: $input-border-width * 2 !default;\n\n$input-height-inner: add($input-line-height * 1em, $input-padding-y * 2) !default;\n$input-height-inner-half: add($input-line-height * .5em, $input-padding-y) !default;\n$input-height-inner-quarter: add($input-line-height * .25em, $input-padding-y * .5) !default;\n\n$input-height: add($input-line-height * 1em, add($input-padding-y * 2, $input-height-border, false)) !default;\n$input-height-sm: add($input-line-height * 1em, add($input-padding-y-sm * 2, $input-height-border, false)) !default;\n$input-height-lg: add($input-line-height * 1em, add($input-padding-y-lg * 2, $input-height-border, false)) !default;\n\n$input-transition: border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;\n\n$form-color-width: 3rem !default;\n// scss-docs-end form-input-variables\n\n// scss-docs-start form-check-variables\n$form-check-input-width: 1em !default;\n$form-check-min-height: $font-size-base * $line-height-base !default;\n$form-check-padding-start: $form-check-input-width + .5em !default;\n$form-check-margin-bottom: .125rem !default;\n$form-check-label-color: null !default;\n$form-check-label-cursor: null !default;\n$form-check-transition: null !default;\n\n$form-check-input-active-filter: brightness(90%) !default;\n\n$form-check-input-bg: $input-bg !default;\n$form-check-input-border: 1px solid rgba($black, .25) !default;\n$form-check-input-border-radius: .25em !default;\n$form-check-radio-border-radius: 50% !default;\n$form-check-input-focus-border: $input-focus-border-color !default;\n$form-check-input-focus-box-shadow: $input-btn-focus-box-shadow !default;\n\n$form-check-input-checked-color: $component-active-color !default;\n$form-check-input-checked-bg-color: $component-active-bg !default;\n$form-check-input-checked-border-color: $form-check-input-checked-bg-color !default;\n$form-check-input-checked-bg-image: url(\"data:image/svg+xml,\") !default;\n$form-check-radio-checked-bg-image: url(\"data:image/svg+xml,\") !default;\n\n$form-check-input-indeterminate-color: $component-active-color !default;\n$form-check-input-indeterminate-bg-color: $component-active-bg !default;\n$form-check-input-indeterminate-border-color: $form-check-input-indeterminate-bg-color !default;\n$form-check-input-indeterminate-bg-image: url(\"data:image/svg+xml,\") !default;\n\n$form-check-input-disabled-opacity: .5 !default;\n$form-check-label-disabled-opacity: $form-check-input-disabled-opacity !default;\n$form-check-btn-check-disabled-opacity: $btn-disabled-opacity !default;\n\n$form-check-inline-margin-end: 1rem !default;\n// scss-docs-end form-check-variables\n\n// scss-docs-start form-switch-variables\n$form-switch-color: rgba(0, 0, 0, .25) !default;\n$form-switch-width: 2em !default;\n$form-switch-padding-start: $form-switch-width + .5em !default;\n$form-switch-bg-image: url(\"data:image/svg+xml,\") !default;\n$form-switch-border-radius: $form-switch-width !default;\n$form-switch-transition: background-position .15s ease-in-out !default;\n\n$form-switch-focus-color: $input-focus-border-color !default;\n$form-switch-focus-bg-image: url(\"data:image/svg+xml,\") !default;\n\n$form-switch-checked-color: $component-active-color !default;\n$form-switch-checked-bg-image: url(\"data:image/svg+xml,\") !default;\n$form-switch-checked-bg-position: right center !default;\n// scss-docs-end form-switch-variables\n\n// scss-docs-start input-group-variables\n$input-group-addon-padding-y: $input-padding-y !default;\n$input-group-addon-padding-x: $input-padding-x !default;\n$input-group-addon-font-weight: $input-font-weight !default;\n$input-group-addon-color: $input-color !default;\n$input-group-addon-bg: $gray-200 !default;\n$input-group-addon-border-color: $input-border-color !default;\n// scss-docs-end input-group-variables\n\n// scss-docs-start form-select-variables\n$form-select-padding-y: $input-padding-y !default;\n$form-select-padding-x: $input-padding-x !default;\n$form-select-font-family: $input-font-family !default;\n$form-select-font-size: $input-font-size !default;\n$form-select-indicator-padding: $form-select-padding-x * 3 !default; // Extra padding for background-image\n$form-select-font-weight: $input-font-weight !default;\n$form-select-line-height: $input-line-height !default;\n$form-select-color: $input-color !default;\n$form-select-bg: $input-bg !default;\n$form-select-disabled-color: null !default;\n$form-select-disabled-bg: $gray-200 !default;\n$form-select-disabled-border-color: $input-disabled-border-color !default;\n$form-select-bg-position: right $form-select-padding-x center !default;\n$form-select-bg-size: 16px 12px !default; // In pixels because image dimensions\n$form-select-indicator-color: $gray-800 !default;\n$form-select-indicator: url(\"data:image/svg+xml,\") !default;\n\n$form-select-feedback-icon-padding-end: $form-select-padding-x * 2.5 + $form-select-indicator-padding !default;\n$form-select-feedback-icon-position: center right $form-select-indicator-padding !default;\n$form-select-feedback-icon-size: $input-height-inner-half $input-height-inner-half !default;\n\n$form-select-border-width: $input-border-width !default;\n$form-select-border-color: $input-border-color !default;\n$form-select-border-radius: $border-radius !default;\n$form-select-box-shadow: $box-shadow-inset !default;\n\n$form-select-focus-border-color: $input-focus-border-color !default;\n$form-select-focus-width: $input-focus-width !default;\n$form-select-focus-box-shadow: 0 0 0 $form-select-focus-width $input-btn-focus-color !default;\n\n$form-select-padding-y-sm: $input-padding-y-sm !default;\n$form-select-padding-x-sm: $input-padding-x-sm !default;\n$form-select-font-size-sm: $input-font-size-sm !default;\n\n$form-select-padding-y-lg: $input-padding-y-lg !default;\n$form-select-padding-x-lg: $input-padding-x-lg !default;\n$form-select-font-size-lg: $input-font-size-lg !default;\n\n$form-select-transition: $input-transition !default;\n// scss-docs-end form-select-variables\n\n// scss-docs-start form-range-variables\n$form-range-track-width: 100% !default;\n$form-range-track-height: .5rem !default;\n$form-range-track-cursor: pointer !default;\n$form-range-track-bg: $gray-300 !default;\n$form-range-track-border-radius: 1rem !default;\n$form-range-track-box-shadow: $box-shadow-inset !default;\n\n$form-range-thumb-width: 1rem !default;\n$form-range-thumb-height: $form-range-thumb-width !default;\n$form-range-thumb-bg: $component-active-bg !default;\n$form-range-thumb-border: 0 !default;\n$form-range-thumb-border-radius: 1rem !default;\n$form-range-thumb-box-shadow: 0 .1rem .25rem rgba($black, .1) !default;\n$form-range-thumb-focus-box-shadow: 0 0 0 1px $body-bg, $input-focus-box-shadow !default;\n$form-range-thumb-focus-box-shadow-width: $input-focus-width !default; // For focus box shadow issue in Edge\n$form-range-thumb-active-bg: tint-color($component-active-bg, 70%) !default;\n$form-range-thumb-disabled-bg: $gray-500 !default;\n$form-range-thumb-transition: background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;\n// scss-docs-end form-range-variables\n\n// scss-docs-start form-file-variables\n$form-file-button-color: $input-color !default;\n$form-file-button-bg: $input-group-addon-bg !default;\n$form-file-button-hover-bg: shade-color($form-file-button-bg, 5%) !default;\n// scss-docs-end form-file-variables\n\n// scss-docs-start form-floating-variables\n$form-floating-height: add(3.5rem, $input-height-border) !default;\n$form-floating-line-height: 1.25 !default;\n$form-floating-padding-x: $input-padding-x !default;\n$form-floating-padding-y: 1rem !default;\n$form-floating-input-padding-t: 1.625rem !default;\n$form-floating-input-padding-b: .625rem !default;\n$form-floating-label-opacity: .65 !default;\n$form-floating-label-transform: scale(.85) translateY(-.5rem) translateX(.15rem) !default;\n$form-floating-transition: opacity .1s ease-in-out, transform .1s ease-in-out !default;\n// scss-docs-end form-floating-variables\n\n// Form validation\n\n// scss-docs-start form-feedback-variables\n$form-feedback-margin-top: $form-text-margin-top !default;\n$form-feedback-font-size: $form-text-font-size !default;\n$form-feedback-font-style: $form-text-font-style !default;\n$form-feedback-valid-color: $success !default;\n$form-feedback-invalid-color: $danger !default;\n\n$form-feedback-icon-valid-color: $form-feedback-valid-color !default;\n$form-feedback-icon-valid: url(\"data:image/svg+xml,\") !default;\n$form-feedback-icon-invalid-color: $form-feedback-invalid-color !default;\n$form-feedback-icon-invalid: url(\"data:image/svg+xml,\") !default;\n// scss-docs-end form-feedback-variables\n\n// scss-docs-start form-validation-states\n$form-validation-states: (\n \"valid\": (\n \"color\": $form-feedback-valid-color,\n \"icon\": $form-feedback-icon-valid\n ),\n \"invalid\": (\n \"color\": $form-feedback-invalid-color,\n \"icon\": $form-feedback-icon-invalid\n )\n) !default;\n// scss-docs-end form-validation-states\n\n// Z-index master list\n//\n// Warning: Avoid customizing these values. They're used for a bird's eye view\n// of components dependent on the z-axis and are designed to all work together.\n\n// scss-docs-start zindex-stack\n$zindex-dropdown: 1000 !default;\n$zindex-sticky: 1020 !default;\n$zindex-fixed: 1030 !default;\n$zindex-offcanvas-backdrop: 1040 !default;\n$zindex-offcanvas: 1045 !default;\n$zindex-modal-backdrop: 1050 !default;\n$zindex-modal: 1055 !default;\n$zindex-popover: 1070 !default;\n$zindex-tooltip: 1080 !default;\n// scss-docs-end zindex-stack\n\n\n// Navs\n\n// scss-docs-start nav-variables\n$nav-link-padding-y: .5rem !default;\n$nav-link-padding-x: 1rem !default;\n$nav-link-font-size: null !default;\n$nav-link-font-weight: null !default;\n$nav-link-color: $link-color !default;\n$nav-link-hover-color: $link-hover-color !default;\n$nav-link-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out !default;\n$nav-link-disabled-color: $gray-600 !default;\n\n$nav-tabs-border-color: $gray-300 !default;\n$nav-tabs-border-width: $border-width !default;\n$nav-tabs-border-radius: $border-radius !default;\n$nav-tabs-link-hover-border-color: $gray-200 $gray-200 $nav-tabs-border-color !default;\n$nav-tabs-link-active-color: $gray-700 !default;\n$nav-tabs-link-active-bg: $body-bg !default;\n$nav-tabs-link-active-border-color: $gray-300 $gray-300 $nav-tabs-link-active-bg !default;\n\n$nav-pills-border-radius: $border-radius !default;\n$nav-pills-link-active-color: $component-active-color !default;\n$nav-pills-link-active-bg: $component-active-bg !default;\n// scss-docs-end nav-variables\n\n\n// Navbar\n\n// scss-docs-start navbar-variables\n$navbar-padding-y: $spacer * .5 !default;\n$navbar-padding-x: null !default;\n\n$navbar-nav-link-padding-x: .5rem !default;\n\n$navbar-brand-font-size: $font-size-lg !default;\n// Compute the navbar-brand padding-y so the navbar-brand will have the same height as navbar-text and nav-link\n$nav-link-height: $font-size-base * $line-height-base + $nav-link-padding-y * 2 !default;\n$navbar-brand-height: $navbar-brand-font-size * $line-height-base !default;\n$navbar-brand-padding-y: ($nav-link-height - $navbar-brand-height) * .5 !default;\n$navbar-brand-margin-end: 1rem !default;\n\n$navbar-toggler-padding-y: .25rem !default;\n$navbar-toggler-padding-x: .75rem !default;\n$navbar-toggler-font-size: $font-size-lg !default;\n$navbar-toggler-border-radius: $btn-border-radius !default;\n$navbar-toggler-focus-width: $btn-focus-width !default;\n$navbar-toggler-transition: box-shadow .15s ease-in-out !default;\n// scss-docs-end navbar-variables\n\n// scss-docs-start navbar-theme-variables\n$navbar-dark-color: rgba($white, .55) !default;\n$navbar-dark-hover-color: rgba($white, .75) !default;\n$navbar-dark-active-color: $white !default;\n$navbar-dark-disabled-color: rgba($white, .25) !default;\n$navbar-dark-toggler-icon-bg: url(\"data:image/svg+xml,\") !default;\n$navbar-dark-toggler-border-color: rgba($white, .1) !default;\n\n$navbar-light-color: rgba($black, .55) !default;\n$navbar-light-hover-color: rgba($black, .7) !default;\n$navbar-light-active-color: rgba($black, .9) !default;\n$navbar-light-disabled-color: rgba($black, .3) !default;\n$navbar-light-toggler-icon-bg: url(\"data:image/svg+xml,\") !default;\n$navbar-light-toggler-border-color: rgba($black, .1) !default;\n\n$navbar-light-brand-color: $navbar-light-active-color !default;\n$navbar-light-brand-hover-color: $navbar-light-active-color !default;\n$navbar-dark-brand-color: $navbar-dark-active-color !default;\n$navbar-dark-brand-hover-color: $navbar-dark-active-color !default;\n// scss-docs-end navbar-theme-variables\n\n\n// Dropdowns\n//\n// Dropdown menu container and contents.\n\n// scss-docs-start dropdown-variables\n$dropdown-min-width: 10rem !default;\n$dropdown-padding-x: 0 !default;\n$dropdown-padding-y: .5rem !default;\n$dropdown-spacer: .125rem !default;\n$dropdown-font-size: $font-size-base !default;\n$dropdown-color: $body-color !default;\n$dropdown-bg: $white !default;\n$dropdown-border-color: rgba($black, .15) !default;\n$dropdown-border-radius: $border-radius !default;\n$dropdown-border-width: $border-width !default;\n$dropdown-inner-border-radius: subtract($dropdown-border-radius, $dropdown-border-width) !default;\n$dropdown-divider-bg: $dropdown-border-color !default;\n$dropdown-divider-margin-y: $spacer * .5 !default;\n$dropdown-box-shadow: $box-shadow !default;\n\n$dropdown-link-color: $gray-900 !default;\n$dropdown-link-hover-color: shade-color($gray-900, 10%) !default;\n$dropdown-link-hover-bg: $gray-200 !default;\n\n$dropdown-link-active-color: $component-active-color !default;\n$dropdown-link-active-bg: $component-active-bg !default;\n\n$dropdown-link-disabled-color: $gray-500 !default;\n\n$dropdown-item-padding-y: $spacer * .25 !default;\n$dropdown-item-padding-x: $spacer !default;\n\n$dropdown-header-color: $gray-600 !default;\n$dropdown-header-padding: $dropdown-padding-y $dropdown-item-padding-x !default;\n// scss-docs-end dropdown-variables\n\n// scss-docs-start dropdown-dark-variables\n$dropdown-dark-color: $gray-300 !default;\n$dropdown-dark-bg: $gray-800 !default;\n$dropdown-dark-border-color: $dropdown-border-color !default;\n$dropdown-dark-divider-bg: $dropdown-divider-bg !default;\n$dropdown-dark-box-shadow: null !default;\n$dropdown-dark-link-color: $dropdown-dark-color !default;\n$dropdown-dark-link-hover-color: $white !default;\n$dropdown-dark-link-hover-bg: rgba($white, .15) !default;\n$dropdown-dark-link-active-color: $dropdown-link-active-color !default;\n$dropdown-dark-link-active-bg: $dropdown-link-active-bg !default;\n$dropdown-dark-link-disabled-color: $gray-500 !default;\n$dropdown-dark-header-color: $gray-500 !default;\n// scss-docs-end dropdown-dark-variables\n\n\n// Pagination\n\n// scss-docs-start pagination-variables\n$pagination-padding-y: .375rem !default;\n$pagination-padding-x: .75rem !default;\n$pagination-padding-y-sm: .25rem !default;\n$pagination-padding-x-sm: .5rem !default;\n$pagination-padding-y-lg: .75rem !default;\n$pagination-padding-x-lg: 1.5rem !default;\n\n$pagination-color: $link-color !default;\n$pagination-bg: $white !default;\n$pagination-border-width: $border-width !default;\n$pagination-border-radius: $border-radius !default;\n$pagination-margin-start: -$pagination-border-width !default;\n$pagination-border-color: $gray-300 !default;\n\n$pagination-focus-color: $link-hover-color !default;\n$pagination-focus-bg: $gray-200 !default;\n$pagination-focus-box-shadow: $input-btn-focus-box-shadow !default;\n$pagination-focus-outline: 0 !default;\n\n$pagination-hover-color: $link-hover-color !default;\n$pagination-hover-bg: $gray-200 !default;\n$pagination-hover-border-color: $gray-300 !default;\n\n$pagination-active-color: $component-active-color !default;\n$pagination-active-bg: $component-active-bg !default;\n$pagination-active-border-color: $pagination-active-bg !default;\n\n$pagination-disabled-color: $gray-600 !default;\n$pagination-disabled-bg: $white !default;\n$pagination-disabled-border-color: $gray-300 !default;\n\n$pagination-transition: color .15s ease-in-out, background-color .15s ease-in-out, border-color .15s ease-in-out, box-shadow .15s ease-in-out !default;\n\n$pagination-border-radius-sm: $border-radius-sm !default;\n$pagination-border-radius-lg: $border-radius-lg !default;\n// scss-docs-end pagination-variables\n\n\n// Placeholders\n\n// scss-docs-start placeholders\n$placeholder-opacity-max: .5 !default;\n$placeholder-opacity-min: .2 !default;\n// scss-docs-end placeholders\n\n// Cards\n\n// scss-docs-start card-variables\n$card-spacer-y: $spacer !default;\n$card-spacer-x: $spacer !default;\n$card-title-spacer-y: $spacer * .5 !default;\n$card-border-width: $border-width !default;\n$card-border-color: rgba($black, .125) !default;\n$card-border-radius: $border-radius !default;\n$card-box-shadow: null !default;\n$card-inner-border-radius: subtract($card-border-radius, $card-border-width) !default;\n$card-cap-padding-y: $card-spacer-y * .5 !default;\n$card-cap-padding-x: $card-spacer-x !default;\n$card-cap-bg: rgba($black, .03) !default;\n$card-cap-color: null !default;\n$card-height: null !default;\n$card-color: null !default;\n$card-bg: $white !default;\n$card-img-overlay-padding: $spacer !default;\n$card-group-margin: $grid-gutter-width * .5 !default;\n// scss-docs-end card-variables\n\n// Accordion\n\n// scss-docs-start accordion-variables\n$accordion-padding-y: 1rem !default;\n$accordion-padding-x: 1.25rem !default;\n$accordion-color: $body-color !default;\n$accordion-bg: $body-bg !default;\n$accordion-border-width: $border-width !default;\n$accordion-border-color: rgba($black, .125) !default;\n$accordion-border-radius: $border-radius !default;\n$accordion-inner-border-radius: subtract($accordion-border-radius, $accordion-border-width) !default;\n\n$accordion-body-padding-y: $accordion-padding-y !default;\n$accordion-body-padding-x: $accordion-padding-x !default;\n\n$accordion-button-padding-y: $accordion-padding-y !default;\n$accordion-button-padding-x: $accordion-padding-x !default;\n$accordion-button-color: $accordion-color !default;\n$accordion-button-bg: $accordion-bg !default;\n$accordion-transition: $btn-transition, border-radius .15s ease !default;\n$accordion-button-active-bg: tint-color($component-active-bg, 90%) !default;\n$accordion-button-active-color: shade-color($primary, 10%) !default;\n\n$accordion-button-focus-border-color: $input-focus-border-color !default;\n$accordion-button-focus-box-shadow: $btn-focus-box-shadow !default;\n\n$accordion-icon-width: 1.25rem !default;\n$accordion-icon-color: $accordion-button-color !default;\n$accordion-icon-active-color: $accordion-button-active-color !default;\n$accordion-icon-transition: transform .2s ease-in-out !default;\n$accordion-icon-transform: rotate(-180deg) !default;\n\n$accordion-button-icon: url(\"data:image/svg+xml,\") !default;\n$accordion-button-active-icon: url(\"data:image/svg+xml,\") !default;\n// scss-docs-end accordion-variables\n\n// Tooltips\n\n// scss-docs-start tooltip-variables\n$tooltip-font-size: $font-size-sm !default;\n$tooltip-max-width: 200px !default;\n$tooltip-color: $white !default;\n$tooltip-bg: $black !default;\n$tooltip-border-radius: $border-radius !default;\n$tooltip-opacity: .9 !default;\n$tooltip-padding-y: $spacer * .25 !default;\n$tooltip-padding-x: $spacer * .5 !default;\n$tooltip-margin: 0 !default;\n\n$tooltip-arrow-width: .8rem !default;\n$tooltip-arrow-height: .4rem !default;\n$tooltip-arrow-color: $tooltip-bg !default;\n// scss-docs-end tooltip-variables\n\n// Form tooltips must come after regular tooltips\n// scss-docs-start tooltip-feedback-variables\n$form-feedback-tooltip-padding-y: $tooltip-padding-y !default;\n$form-feedback-tooltip-padding-x: $tooltip-padding-x !default;\n$form-feedback-tooltip-font-size: $tooltip-font-size !default;\n$form-feedback-tooltip-line-height: null !default;\n$form-feedback-tooltip-opacity: $tooltip-opacity !default;\n$form-feedback-tooltip-border-radius: $tooltip-border-radius !default;\n// scss-docs-end tooltip-feedback-variables\n\n\n// Popovers\n\n// scss-docs-start popover-variables\n$popover-font-size: $font-size-sm !default;\n$popover-bg: $white !default;\n$popover-max-width: 276px !default;\n$popover-border-width: $border-width !default;\n$popover-border-color: rgba($black, .2) !default;\n$popover-border-radius: $border-radius-lg !default;\n$popover-inner-border-radius: subtract($popover-border-radius, $popover-border-width) !default;\n$popover-box-shadow: $box-shadow !default;\n\n$popover-header-bg: shade-color($popover-bg, 6%) !default;\n$popover-header-color: $headings-color !default;\n$popover-header-padding-y: .5rem !default;\n$popover-header-padding-x: $spacer !default;\n\n$popover-body-color: $body-color !default;\n$popover-body-padding-y: $spacer !default;\n$popover-body-padding-x: $spacer !default;\n\n$popover-arrow-width: 1rem !default;\n$popover-arrow-height: .5rem !default;\n$popover-arrow-color: $popover-bg !default;\n\n$popover-arrow-outer-color: fade-in($popover-border-color, .05) !default;\n// scss-docs-end popover-variables\n\n\n// Toasts\n\n// scss-docs-start toast-variables\n$toast-max-width: 350px !default;\n$toast-padding-x: .75rem !default;\n$toast-padding-y: .5rem !default;\n$toast-font-size: .875rem !default;\n$toast-color: null !default;\n$toast-background-color: rgba($white, .85) !default;\n$toast-border-width: 1px !default;\n$toast-border-color: rgba(0, 0, 0, .1) !default;\n$toast-border-radius: $border-radius !default;\n$toast-box-shadow: $box-shadow !default;\n$toast-spacing: $container-padding-x !default;\n\n$toast-header-color: $gray-600 !default;\n$toast-header-background-color: rgba($white, .85) !default;\n$toast-header-border-color: rgba(0, 0, 0, .05) !default;\n// scss-docs-end toast-variables\n\n\n// Badges\n\n// scss-docs-start badge-variables\n$badge-font-size: .75em !default;\n$badge-font-weight: $font-weight-bold !default;\n$badge-color: $white !default;\n$badge-padding-y: .35em !default;\n$badge-padding-x: .65em !default;\n$badge-border-radius: $border-radius !default;\n// scss-docs-end badge-variables\n\n\n// Modals\n\n// scss-docs-start modal-variables\n$modal-inner-padding: $spacer !default;\n\n$modal-footer-margin-between: .5rem !default;\n\n$modal-dialog-margin: .5rem !default;\n$modal-dialog-margin-y-sm-up: 1.75rem !default;\n\n$modal-title-line-height: $line-height-base !default;\n\n$modal-content-color: null !default;\n$modal-content-bg: $white !default;\n$modal-content-border-color: rgba($black, .2) !default;\n$modal-content-border-width: $border-width !default;\n$modal-content-border-radius: $border-radius-lg !default;\n$modal-content-inner-border-radius: subtract($modal-content-border-radius, $modal-content-border-width) !default;\n$modal-content-box-shadow-xs: $box-shadow-sm !default;\n$modal-content-box-shadow-sm-up: $box-shadow !default;\n\n$modal-backdrop-bg: $black !default;\n$modal-backdrop-opacity: .5 !default;\n$modal-header-border-color: $border-color !default;\n$modal-footer-border-color: $modal-header-border-color !default;\n$modal-header-border-width: $modal-content-border-width !default;\n$modal-footer-border-width: $modal-header-border-width !default;\n$modal-header-padding-y: $modal-inner-padding !default;\n$modal-header-padding-x: $modal-inner-padding !default;\n$modal-header-padding: $modal-header-padding-y $modal-header-padding-x !default; // Keep this for backwards compatibility\n\n$modal-sm: 300px !default;\n$modal-md: 500px !default;\n$modal-lg: 800px !default;\n$modal-xl: 1140px !default;\n\n$modal-fade-transform: translate(0, -50px) !default;\n$modal-show-transform: none !default;\n$modal-transition: transform .3s ease-out !default;\n$modal-scale-transform: scale(1.02) !default;\n// scss-docs-end modal-variables\n\n\n// Alerts\n//\n// Define alert colors, border radius, and padding.\n\n// scss-docs-start alert-variables\n$alert-padding-y: $spacer !default;\n$alert-padding-x: $spacer !default;\n$alert-margin-bottom: 1rem !default;\n$alert-border-radius: $border-radius !default;\n$alert-link-font-weight: $font-weight-bold !default;\n$alert-border-width: $border-width !default;\n$alert-bg-scale: -80% !default;\n$alert-border-scale: -70% !default;\n$alert-color-scale: 40% !default;\n$alert-dismissible-padding-r: $alert-padding-x * 3 !default; // 3x covers width of x plus default padding on either side\n// scss-docs-end alert-variables\n\n\n// Progress bars\n\n// scss-docs-start progress-variables\n$progress-height: 1rem !default;\n$progress-font-size: $font-size-base * .75 !default;\n$progress-bg: $gray-200 !default;\n$progress-border-radius: $border-radius !default;\n$progress-box-shadow: $box-shadow-inset !default;\n$progress-bar-color: $white !default;\n$progress-bar-bg: $primary !default;\n$progress-bar-animation-timing: 1s linear infinite !default;\n$progress-bar-transition: width .6s ease !default;\n// scss-docs-end progress-variables\n\n\n// List group\n\n// scss-docs-start list-group-variables\n$list-group-color: $gray-900 !default;\n$list-group-bg: $white !default;\n$list-group-border-color: rgba($black, .125) !default;\n$list-group-border-width: $border-width !default;\n$list-group-border-radius: $border-radius !default;\n\n$list-group-item-padding-y: $spacer * .5 !default;\n$list-group-item-padding-x: $spacer !default;\n$list-group-item-bg-scale: -80% !default;\n$list-group-item-color-scale: 40% !default;\n\n$list-group-hover-bg: $gray-100 !default;\n$list-group-active-color: $component-active-color !default;\n$list-group-active-bg: $component-active-bg !default;\n$list-group-active-border-color: $list-group-active-bg !default;\n\n$list-group-disabled-color: $gray-600 !default;\n$list-group-disabled-bg: $list-group-bg !default;\n\n$list-group-action-color: $gray-700 !default;\n$list-group-action-hover-color: $list-group-action-color !default;\n\n$list-group-action-active-color: $body-color !default;\n$list-group-action-active-bg: $gray-200 !default;\n// scss-docs-end list-group-variables\n\n\n// Image thumbnails\n\n// scss-docs-start thumbnail-variables\n$thumbnail-padding: .25rem !default;\n$thumbnail-bg: $body-bg !default;\n$thumbnail-border-width: $border-width !default;\n$thumbnail-border-color: $gray-300 !default;\n$thumbnail-border-radius: $border-radius !default;\n$thumbnail-box-shadow: $box-shadow-sm !default;\n// scss-docs-end thumbnail-variables\n\n\n// Figures\n\n// scss-docs-start figure-variables\n$figure-caption-font-size: $small-font-size !default;\n$figure-caption-color: $gray-600 !default;\n// scss-docs-end figure-variables\n\n\n// Breadcrumbs\n\n// scss-docs-start breadcrumb-variables\n$breadcrumb-font-size: null !default;\n$breadcrumb-padding-y: 0 !default;\n$breadcrumb-padding-x: 0 !default;\n$breadcrumb-item-padding-x: .5rem !default;\n$breadcrumb-margin-bottom: 1rem !default;\n$breadcrumb-bg: null !default;\n$breadcrumb-divider-color: $gray-600 !default;\n$breadcrumb-active-color: $gray-600 !default;\n$breadcrumb-divider: quote(\"/\") !default;\n$breadcrumb-divider-flipped: $breadcrumb-divider !default;\n$breadcrumb-border-radius: null !default;\n// scss-docs-end breadcrumb-variables\n\n// Carousel\n\n// scss-docs-start carousel-variables\n$carousel-control-color: $white !default;\n$carousel-control-width: 15% !default;\n$carousel-control-opacity: .5 !default;\n$carousel-control-hover-opacity: .9 !default;\n$carousel-control-transition: opacity .15s ease !default;\n\n$carousel-indicator-width: 30px !default;\n$carousel-indicator-height: 3px !default;\n$carousel-indicator-hit-area-height: 10px !default;\n$carousel-indicator-spacer: 3px !default;\n$carousel-indicator-opacity: .5 !default;\n$carousel-indicator-active-bg: $white !default;\n$carousel-indicator-active-opacity: 1 !default;\n$carousel-indicator-transition: opacity .6s ease !default;\n\n$carousel-caption-width: 70% !default;\n$carousel-caption-color: $white !default;\n$carousel-caption-padding-y: 1.25rem !default;\n$carousel-caption-spacer: 1.25rem !default;\n\n$carousel-control-icon-width: 2rem !default;\n\n$carousel-control-prev-icon-bg: url(\"data:image/svg+xml,\") !default;\n$carousel-control-next-icon-bg: url(\"data:image/svg+xml,\") !default;\n\n$carousel-transition-duration: .6s !default;\n$carousel-transition: transform $carousel-transition-duration ease-in-out !default; // Define transform transition first if using multiple transitions (e.g., `transform 2s ease, opacity .5s ease-out`)\n\n$carousel-dark-indicator-active-bg: $black !default;\n$carousel-dark-caption-color: $black !default;\n$carousel-dark-control-icon-filter: invert(1) grayscale(100) !default;\n// scss-docs-end carousel-variables\n\n\n// Spinners\n\n// scss-docs-start spinner-variables\n$spinner-width: 2rem !default;\n$spinner-height: $spinner-width !default;\n$spinner-vertical-align: -.125em !default;\n$spinner-border-width: .25em !default;\n$spinner-animation-speed: .75s !default;\n\n$spinner-width-sm: 1rem !default;\n$spinner-height-sm: $spinner-width-sm !default;\n$spinner-border-width-sm: .2em !default;\n// scss-docs-end spinner-variables\n\n\n// Close\n\n// scss-docs-start close-variables\n$btn-close-width: 1em !default;\n$btn-close-height: $btn-close-width !default;\n$btn-close-padding-x: .25em !default;\n$btn-close-padding-y: $btn-close-padding-x !default;\n$btn-close-color: $black !default;\n$btn-close-bg: url(\"data:image/svg+xml,\") !default;\n$btn-close-focus-shadow: $input-btn-focus-box-shadow !default;\n$btn-close-opacity: .5 !default;\n$btn-close-hover-opacity: .75 !default;\n$btn-close-focus-opacity: 1 !default;\n$btn-close-disabled-opacity: .25 !default;\n$btn-close-white-filter: invert(1) grayscale(100%) brightness(200%) !default;\n// scss-docs-end close-variables\n\n\n// Offcanvas\n\n// scss-docs-start offcanvas-variables\n$offcanvas-padding-y: $modal-inner-padding !default;\n$offcanvas-padding-x: $modal-inner-padding !default;\n$offcanvas-horizontal-width: 400px !default;\n$offcanvas-vertical-height: 30vh !default;\n$offcanvas-transition-duration: .3s !default;\n$offcanvas-border-color: $modal-content-border-color !default;\n$offcanvas-border-width: $modal-content-border-width !default;\n$offcanvas-title-line-height: $modal-title-line-height !default;\n$offcanvas-bg-color: $modal-content-bg !default;\n$offcanvas-color: $modal-content-color !default;\n$offcanvas-box-shadow: $modal-content-box-shadow-xs !default;\n$offcanvas-backdrop-bg: $modal-backdrop-bg !default;\n$offcanvas-backdrop-opacity: $modal-backdrop-opacity !default;\n// scss-docs-end offcanvas-variables\n\n// Code\n\n$code-font-size: $small-font-size !default;\n$code-color: $pink !default;\n\n$kbd-padding-y: .2rem !default;\n$kbd-padding-x: .4rem !default;\n$kbd-font-size: $code-font-size !default;\n$kbd-color: $white !default;\n$kbd-bg: $gray-900 !default;\n\n$pre-color: null !default;\n","// Row\n//\n// Rows contain your columns.\n\n@if $enable-grid-classes {\n .row {\n @include make-row();\n\n > * {\n @include make-col-ready();\n }\n }\n}\n\n@if $enable-cssgrid {\n .grid {\n display: grid;\n grid-template-rows: repeat(var(--#{$variable-prefix}rows, 1), 1fr);\n grid-template-columns: repeat(var(--#{$variable-prefix}columns, #{$grid-columns}), 1fr);\n gap: var(--#{$variable-prefix}gap, #{$grid-gutter-width});\n\n @include make-cssgrid();\n }\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n@if $enable-grid-classes {\n @include make-grid-columns();\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n@mixin make-row($gutter: $grid-gutter-width) {\n --#{$variable-prefix}gutter-x: #{$gutter};\n --#{$variable-prefix}gutter-y: 0;\n display: flex;\n flex-wrap: wrap;\n margin-top: calc(var(--#{$variable-prefix}gutter-y) * -1); // stylelint-disable-line function-disallowed-list\n margin-right: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list\n margin-left: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list\n}\n\n@mixin make-col-ready($gutter: $grid-gutter-width) {\n // Add box sizing if only the grid is loaded\n box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);\n // Prevent columns from becoming too narrow when at smaller grid tiers by\n // always setting `width: 100%;`. This works because we set the width\n // later on to override this initial width.\n flex-shrink: 0;\n width: 100%;\n max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid\n padding-right: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n padding-left: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n margin-top: var(--#{$variable-prefix}gutter-y);\n}\n\n@mixin make-col($size: false, $columns: $grid-columns) {\n @if $size {\n flex: 0 0 auto;\n width: percentage(divide($size, $columns));\n\n } @else {\n flex: 1 1 0;\n max-width: 100%;\n }\n}\n\n@mixin make-col-auto() {\n flex: 0 0 auto;\n width: auto;\n}\n\n@mixin make-col-offset($size, $columns: $grid-columns) {\n $num: divide($size, $columns);\n margin-left: if($num == 0, 0, percentage($num));\n}\n\n// Row columns\n//\n// Specify on a parent element(e.g., .row) to force immediate children into NN\n// numberof columns. Supports wrapping to new lines, but does not do a Masonry\n// style grid.\n@mixin row-cols($count) {\n > * {\n flex: 0 0 auto;\n width: divide(100%, $count);\n }\n}\n\n// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `$grid-columns`.\n\n@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {\n @each $breakpoint in map-keys($breakpoints) {\n $infix: breakpoint-infix($breakpoint, $breakpoints);\n\n @include media-breakpoint-up($breakpoint, $breakpoints) {\n // Provide basic `.col-{bp}` classes for equal-width flexbox columns\n .col#{$infix} {\n flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4\n }\n\n .row-cols#{$infix}-auto > * {\n @include make-col-auto();\n }\n\n @if $grid-row-columns > 0 {\n @for $i from 1 through $grid-row-columns {\n .row-cols#{$infix}-#{$i} {\n @include row-cols($i);\n }\n }\n }\n\n .col#{$infix}-auto {\n @include make-col-auto();\n }\n\n @if $columns > 0 {\n @for $i from 1 through $columns {\n .col#{$infix}-#{$i} {\n @include make-col($i, $columns);\n }\n }\n\n // `$columns - 1` because offsetting by the width of an entire row isn't possible\n @for $i from 0 through ($columns - 1) {\n @if not ($infix == \"\" and $i == 0) { // Avoid emitting useless .offset-0\n .offset#{$infix}-#{$i} {\n @include make-col-offset($i, $columns);\n }\n }\n }\n }\n\n // Gutters\n //\n // Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.\n @each $key, $value in $gutters {\n .g#{$infix}-#{$key},\n .gx#{$infix}-#{$key} {\n --#{$variable-prefix}gutter-x: #{$value};\n }\n\n .g#{$infix}-#{$key},\n .gy#{$infix}-#{$key} {\n --#{$variable-prefix}gutter-y: #{$value};\n }\n }\n }\n }\n}\n\n@mixin make-cssgrid($columns: $grid-columns, $breakpoints: $grid-breakpoints) {\n @each $breakpoint in map-keys($breakpoints) {\n $infix: breakpoint-infix($breakpoint, $breakpoints);\n\n @include media-breakpoint-up($breakpoint, $breakpoints) {\n @if $columns > 0 {\n @for $i from 1 through $columns {\n .g-col#{$infix}-#{$i} {\n grid-column: auto / span $i;\n }\n }\n\n // Start with `1` because `0` is and invalid value.\n // Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible.\n @for $i from 1 through ($columns - 1) {\n .g-start#{$infix}-#{$i} {\n grid-column-start: $i;\n }\n }\n }\n }\n }\n}\n","// Utility generator\n// Used to generate utilities & print utilities\n@mixin generate-utility($utility, $infix, $is-rfs-media-query: false) {\n $values: map-get($utility, values);\n\n // If the values are a list or string, convert it into a map\n @if type-of($values) == \"string\" or type-of(nth($values, 1)) != \"list\" {\n $values: zip($values, $values);\n }\n\n @each $key, $value in $values {\n $properties: map-get($utility, property);\n\n // Multiple properties are possible, for example with vertical or horizontal margins or paddings\n @if type-of($properties) == \"string\" {\n $properties: append((), $properties);\n }\n\n // Use custom class if present\n $property-class: if(map-has-key($utility, class), map-get($utility, class), nth($properties, 1));\n $property-class: if($property-class == null, \"\", $property-class);\n\n // State params to generate pseudo-classes\n $state: if(map-has-key($utility, state), map-get($utility, state), ());\n\n $infix: if($property-class == \"\" and str-slice($infix, 1, 1) == \"-\", str-slice($infix, 2), $infix);\n\n // Don't prefix if value key is null (eg. with shadow class)\n $property-class-modifier: if($key, if($property-class == \"\" and $infix == \"\", \"\", \"-\") + $key, \"\");\n\n @if map-get($utility, rfs) {\n // Inside the media query\n @if $is-rfs-media-query {\n $val: rfs-value($value);\n\n // Do not render anything if fluid and non fluid values are the same\n $value: if($val == rfs-fluid-value($value), null, $val);\n }\n @else {\n $value: rfs-fluid-value($value);\n }\n }\n\n $is-css-var: map-get($utility, css-var);\n $is-local-vars: map-get($utility, local-vars);\n $is-rtl: map-get($utility, rtl);\n\n @if $value != null {\n @if $is-rtl == false {\n /* rtl:begin:remove */\n }\n\n @if $is-css-var {\n .#{$property-class + $infix + $property-class-modifier} {\n --#{$variable-prefix}#{$property-class}: #{$value};\n }\n\n @each $pseudo in $state {\n .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {\n --#{$variable-prefix}#{$property-class}: #{$value};\n }\n }\n } @else {\n .#{$property-class + $infix + $property-class-modifier} {\n @each $property in $properties {\n @if $is-local-vars {\n @each $local-var, $value in $is-local-vars {\n --#{$variable-prefix}#{$local-var}: #{$value};\n }\n }\n #{$property}: $value if($enable-important-utilities, !important, null);\n }\n }\n\n @each $pseudo in $state {\n .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {\n @each $property in $properties {\n #{$property}: $value if($enable-important-utilities, !important, null);\n }\n }\n }\n }\n\n @if $is-rtl == false {\n /* rtl:end:remove */\n }\n }\n }\n}\n","// Loop over each breakpoint\n@each $breakpoint in map-keys($grid-breakpoints) {\n\n // Generate media query if needed\n @include media-breakpoint-up($breakpoint) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n // Loop over each utility property\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Only proceed if responsive media queries are enabled or if it's the base media query\n @if type-of($utility) == \"map\" and (map-get($utility, responsive) or $infix == \"\") {\n @include generate-utility($utility, $infix);\n }\n }\n }\n}\n\n// RFS rescaling\n@media (min-width: $rfs-mq-value) {\n @each $breakpoint in map-keys($grid-breakpoints) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n @if (map-get($grid-breakpoints, $breakpoint) < $rfs-breakpoint) {\n // Loop over each utility property\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Only proceed if responsive media queries are enabled or if it's the base media query\n @if type-of($utility) == \"map\" and map-get($utility, rfs) and (map-get($utility, responsive) or $infix == \"\") {\n @include generate-utility($utility, $infix, true);\n }\n }\n }\n }\n}\n\n\n// Print utilities\n@media print {\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Then check if the utility needs print styles\n @if type-of($utility) == \"map\" and map-get($utility, print) == true {\n @include generate-utility($utility, \"-print\");\n }\n }\n}\n"]} \ No newline at end of file diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css new file mode 100644 index 0000000..d3dfc1b --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css @@ -0,0 +1,7 @@ +/*! + * Bootstrap Grid v5.1.0 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors + * Copyright 2011-2021 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + */.container,.container-fluid,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{width:100%;padding-left:var(--bs-gutter-x,.75rem);padding-right:var(--bs-gutter-x,.75rem);margin-left:auto;margin-right:auto}@media (min-width:576px){.container,.container-sm{max-width:540px}}@media (min-width:768px){.container,.container-md,.container-sm{max-width:720px}}@media (min-width:992px){.container,.container-lg,.container-md,.container-sm{max-width:960px}}@media (min-width:1200px){.container,.container-lg,.container-md,.container-sm,.container-xl{max-width:1140px}}@media (min-width:1400px){.container,.container-lg,.container-md,.container-sm,.container-xl,.container-xxl{max-width:1320px}}.row{--bs-gutter-x:1.5rem;--bs-gutter-y:0;display:flex;flex-wrap:wrap;margin-top:calc(var(--bs-gutter-y) * -1);margin-left:calc(var(--bs-gutter-x) * -.5);margin-right:calc(var(--bs-gutter-x) * -.5)}.row>*{box-sizing:border-box;flex-shrink:0;width:100%;max-width:100%;padding-left:calc(var(--bs-gutter-x) * .5);padding-right:calc(var(--bs-gutter-x) * .5);margin-top:var(--bs-gutter-y)}.col{flex:1 0 0%}.row-cols-auto>*{flex:0 0 auto;width:auto}.row-cols-1>*{flex:0 0 auto;width:100%}.row-cols-2>*{flex:0 0 auto;width:50%}.row-cols-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-4>*{flex:0 0 auto;width:25%}.row-cols-5>*{flex:0 0 auto;width:20%}.row-cols-6>*{flex:0 0 auto;width:16.6666666667%}.col-auto{flex:0 0 auto;width:auto}.col-1{flex:0 0 auto;width:8.33333333%}.col-2{flex:0 0 auto;width:16.66666667%}.col-3{flex:0 0 auto;width:25%}.col-4{flex:0 0 auto;width:33.33333333%}.col-5{flex:0 0 auto;width:41.66666667%}.col-6{flex:0 0 auto;width:50%}.col-7{flex:0 0 auto;width:58.33333333%}.col-8{flex:0 0 auto;width:66.66666667%}.col-9{flex:0 0 auto;width:75%}.col-10{flex:0 0 auto;width:83.33333333%}.col-11{flex:0 0 auto;width:91.66666667%}.col-12{flex:0 0 auto;width:100%}.offset-1{margin-right:8.33333333%}.offset-2{margin-right:16.66666667%}.offset-3{margin-right:25%}.offset-4{margin-right:33.33333333%}.offset-5{margin-right:41.66666667%}.offset-6{margin-right:50%}.offset-7{margin-right:58.33333333%}.offset-8{margin-right:66.66666667%}.offset-9{margin-right:75%}.offset-10{margin-right:83.33333333%}.offset-11{margin-right:91.66666667%}.g-0,.gx-0{--bs-gutter-x:0}.g-0,.gy-0{--bs-gutter-y:0}.g-1,.gx-1{--bs-gutter-x:0.25rem}.g-1,.gy-1{--bs-gutter-y:0.25rem}.g-2,.gx-2{--bs-gutter-x:0.5rem}.g-2,.gy-2{--bs-gutter-y:0.5rem}.g-3,.gx-3{--bs-gutter-x:1rem}.g-3,.gy-3{--bs-gutter-y:1rem}.g-4,.gx-4{--bs-gutter-x:1.5rem}.g-4,.gy-4{--bs-gutter-y:1.5rem}.g-5,.gx-5{--bs-gutter-x:3rem}.g-5,.gy-5{--bs-gutter-y:3rem}@media (min-width:576px){.col-sm{flex:1 0 0%}.row-cols-sm-auto>*{flex:0 0 auto;width:auto}.row-cols-sm-1>*{flex:0 0 auto;width:100%}.row-cols-sm-2>*{flex:0 0 auto;width:50%}.row-cols-sm-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-sm-4>*{flex:0 0 auto;width:25%}.row-cols-sm-5>*{flex:0 0 auto;width:20%}.row-cols-sm-6>*{flex:0 0 auto;width:16.6666666667%}.col-sm-auto{flex:0 0 auto;width:auto}.col-sm-1{flex:0 0 auto;width:8.33333333%}.col-sm-2{flex:0 0 auto;width:16.66666667%}.col-sm-3{flex:0 0 auto;width:25%}.col-sm-4{flex:0 0 auto;width:33.33333333%}.col-sm-5{flex:0 0 auto;width:41.66666667%}.col-sm-6{flex:0 0 auto;width:50%}.col-sm-7{flex:0 0 auto;width:58.33333333%}.col-sm-8{flex:0 0 auto;width:66.66666667%}.col-sm-9{flex:0 0 auto;width:75%}.col-sm-10{flex:0 0 auto;width:83.33333333%}.col-sm-11{flex:0 0 auto;width:91.66666667%}.col-sm-12{flex:0 0 auto;width:100%}.offset-sm-0{margin-right:0}.offset-sm-1{margin-right:8.33333333%}.offset-sm-2{margin-right:16.66666667%}.offset-sm-3{margin-right:25%}.offset-sm-4{margin-right:33.33333333%}.offset-sm-5{margin-right:41.66666667%}.offset-sm-6{margin-right:50%}.offset-sm-7{margin-right:58.33333333%}.offset-sm-8{margin-right:66.66666667%}.offset-sm-9{margin-right:75%}.offset-sm-10{margin-right:83.33333333%}.offset-sm-11{margin-right:91.66666667%}.g-sm-0,.gx-sm-0{--bs-gutter-x:0}.g-sm-0,.gy-sm-0{--bs-gutter-y:0}.g-sm-1,.gx-sm-1{--bs-gutter-x:0.25rem}.g-sm-1,.gy-sm-1{--bs-gutter-y:0.25rem}.g-sm-2,.gx-sm-2{--bs-gutter-x:0.5rem}.g-sm-2,.gy-sm-2{--bs-gutter-y:0.5rem}.g-sm-3,.gx-sm-3{--bs-gutter-x:1rem}.g-sm-3,.gy-sm-3{--bs-gutter-y:1rem}.g-sm-4,.gx-sm-4{--bs-gutter-x:1.5rem}.g-sm-4,.gy-sm-4{--bs-gutter-y:1.5rem}.g-sm-5,.gx-sm-5{--bs-gutter-x:3rem}.g-sm-5,.gy-sm-5{--bs-gutter-y:3rem}}@media (min-width:768px){.col-md{flex:1 0 0%}.row-cols-md-auto>*{flex:0 0 auto;width:auto}.row-cols-md-1>*{flex:0 0 auto;width:100%}.row-cols-md-2>*{flex:0 0 auto;width:50%}.row-cols-md-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-md-4>*{flex:0 0 auto;width:25%}.row-cols-md-5>*{flex:0 0 auto;width:20%}.row-cols-md-6>*{flex:0 0 auto;width:16.6666666667%}.col-md-auto{flex:0 0 auto;width:auto}.col-md-1{flex:0 0 auto;width:8.33333333%}.col-md-2{flex:0 0 auto;width:16.66666667%}.col-md-3{flex:0 0 auto;width:25%}.col-md-4{flex:0 0 auto;width:33.33333333%}.col-md-5{flex:0 0 auto;width:41.66666667%}.col-md-6{flex:0 0 auto;width:50%}.col-md-7{flex:0 0 auto;width:58.33333333%}.col-md-8{flex:0 0 auto;width:66.66666667%}.col-md-9{flex:0 0 auto;width:75%}.col-md-10{flex:0 0 auto;width:83.33333333%}.col-md-11{flex:0 0 auto;width:91.66666667%}.col-md-12{flex:0 0 auto;width:100%}.offset-md-0{margin-right:0}.offset-md-1{margin-right:8.33333333%}.offset-md-2{margin-right:16.66666667%}.offset-md-3{margin-right:25%}.offset-md-4{margin-right:33.33333333%}.offset-md-5{margin-right:41.66666667%}.offset-md-6{margin-right:50%}.offset-md-7{margin-right:58.33333333%}.offset-md-8{margin-right:66.66666667%}.offset-md-9{margin-right:75%}.offset-md-10{margin-right:83.33333333%}.offset-md-11{margin-right:91.66666667%}.g-md-0,.gx-md-0{--bs-gutter-x:0}.g-md-0,.gy-md-0{--bs-gutter-y:0}.g-md-1,.gx-md-1{--bs-gutter-x:0.25rem}.g-md-1,.gy-md-1{--bs-gutter-y:0.25rem}.g-md-2,.gx-md-2{--bs-gutter-x:0.5rem}.g-md-2,.gy-md-2{--bs-gutter-y:0.5rem}.g-md-3,.gx-md-3{--bs-gutter-x:1rem}.g-md-3,.gy-md-3{--bs-gutter-y:1rem}.g-md-4,.gx-md-4{--bs-gutter-x:1.5rem}.g-md-4,.gy-md-4{--bs-gutter-y:1.5rem}.g-md-5,.gx-md-5{--bs-gutter-x:3rem}.g-md-5,.gy-md-5{--bs-gutter-y:3rem}}@media (min-width:992px){.col-lg{flex:1 0 0%}.row-cols-lg-auto>*{flex:0 0 auto;width:auto}.row-cols-lg-1>*{flex:0 0 auto;width:100%}.row-cols-lg-2>*{flex:0 0 auto;width:50%}.row-cols-lg-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-lg-4>*{flex:0 0 auto;width:25%}.row-cols-lg-5>*{flex:0 0 auto;width:20%}.row-cols-lg-6>*{flex:0 0 auto;width:16.6666666667%}.col-lg-auto{flex:0 0 auto;width:auto}.col-lg-1{flex:0 0 auto;width:8.33333333%}.col-lg-2{flex:0 0 auto;width:16.66666667%}.col-lg-3{flex:0 0 auto;width:25%}.col-lg-4{flex:0 0 auto;width:33.33333333%}.col-lg-5{flex:0 0 auto;width:41.66666667%}.col-lg-6{flex:0 0 auto;width:50%}.col-lg-7{flex:0 0 auto;width:58.33333333%}.col-lg-8{flex:0 0 auto;width:66.66666667%}.col-lg-9{flex:0 0 auto;width:75%}.col-lg-10{flex:0 0 auto;width:83.33333333%}.col-lg-11{flex:0 0 auto;width:91.66666667%}.col-lg-12{flex:0 0 auto;width:100%}.offset-lg-0{margin-right:0}.offset-lg-1{margin-right:8.33333333%}.offset-lg-2{margin-right:16.66666667%}.offset-lg-3{margin-right:25%}.offset-lg-4{margin-right:33.33333333%}.offset-lg-5{margin-right:41.66666667%}.offset-lg-6{margin-right:50%}.offset-lg-7{margin-right:58.33333333%}.offset-lg-8{margin-right:66.66666667%}.offset-lg-9{margin-right:75%}.offset-lg-10{margin-right:83.33333333%}.offset-lg-11{margin-right:91.66666667%}.g-lg-0,.gx-lg-0{--bs-gutter-x:0}.g-lg-0,.gy-lg-0{--bs-gutter-y:0}.g-lg-1,.gx-lg-1{--bs-gutter-x:0.25rem}.g-lg-1,.gy-lg-1{--bs-gutter-y:0.25rem}.g-lg-2,.gx-lg-2{--bs-gutter-x:0.5rem}.g-lg-2,.gy-lg-2{--bs-gutter-y:0.5rem}.g-lg-3,.gx-lg-3{--bs-gutter-x:1rem}.g-lg-3,.gy-lg-3{--bs-gutter-y:1rem}.g-lg-4,.gx-lg-4{--bs-gutter-x:1.5rem}.g-lg-4,.gy-lg-4{--bs-gutter-y:1.5rem}.g-lg-5,.gx-lg-5{--bs-gutter-x:3rem}.g-lg-5,.gy-lg-5{--bs-gutter-y:3rem}}@media (min-width:1200px){.col-xl{flex:1 0 0%}.row-cols-xl-auto>*{flex:0 0 auto;width:auto}.row-cols-xl-1>*{flex:0 0 auto;width:100%}.row-cols-xl-2>*{flex:0 0 auto;width:50%}.row-cols-xl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xl-4>*{flex:0 0 auto;width:25%}.row-cols-xl-5>*{flex:0 0 auto;width:20%}.row-cols-xl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xl-auto{flex:0 0 auto;width:auto}.col-xl-1{flex:0 0 auto;width:8.33333333%}.col-xl-2{flex:0 0 auto;width:16.66666667%}.col-xl-3{flex:0 0 auto;width:25%}.col-xl-4{flex:0 0 auto;width:33.33333333%}.col-xl-5{flex:0 0 auto;width:41.66666667%}.col-xl-6{flex:0 0 auto;width:50%}.col-xl-7{flex:0 0 auto;width:58.33333333%}.col-xl-8{flex:0 0 auto;width:66.66666667%}.col-xl-9{flex:0 0 auto;width:75%}.col-xl-10{flex:0 0 auto;width:83.33333333%}.col-xl-11{flex:0 0 auto;width:91.66666667%}.col-xl-12{flex:0 0 auto;width:100%}.offset-xl-0{margin-right:0}.offset-xl-1{margin-right:8.33333333%}.offset-xl-2{margin-right:16.66666667%}.offset-xl-3{margin-right:25%}.offset-xl-4{margin-right:33.33333333%}.offset-xl-5{margin-right:41.66666667%}.offset-xl-6{margin-right:50%}.offset-xl-7{margin-right:58.33333333%}.offset-xl-8{margin-right:66.66666667%}.offset-xl-9{margin-right:75%}.offset-xl-10{margin-right:83.33333333%}.offset-xl-11{margin-right:91.66666667%}.g-xl-0,.gx-xl-0{--bs-gutter-x:0}.g-xl-0,.gy-xl-0{--bs-gutter-y:0}.g-xl-1,.gx-xl-1{--bs-gutter-x:0.25rem}.g-xl-1,.gy-xl-1{--bs-gutter-y:0.25rem}.g-xl-2,.gx-xl-2{--bs-gutter-x:0.5rem}.g-xl-2,.gy-xl-2{--bs-gutter-y:0.5rem}.g-xl-3,.gx-xl-3{--bs-gutter-x:1rem}.g-xl-3,.gy-xl-3{--bs-gutter-y:1rem}.g-xl-4,.gx-xl-4{--bs-gutter-x:1.5rem}.g-xl-4,.gy-xl-4{--bs-gutter-y:1.5rem}.g-xl-5,.gx-xl-5{--bs-gutter-x:3rem}.g-xl-5,.gy-xl-5{--bs-gutter-y:3rem}}@media (min-width:1400px){.col-xxl{flex:1 0 0%}.row-cols-xxl-auto>*{flex:0 0 auto;width:auto}.row-cols-xxl-1>*{flex:0 0 auto;width:100%}.row-cols-xxl-2>*{flex:0 0 auto;width:50%}.row-cols-xxl-3>*{flex:0 0 auto;width:33.3333333333%}.row-cols-xxl-4>*{flex:0 0 auto;width:25%}.row-cols-xxl-5>*{flex:0 0 auto;width:20%}.row-cols-xxl-6>*{flex:0 0 auto;width:16.6666666667%}.col-xxl-auto{flex:0 0 auto;width:auto}.col-xxl-1{flex:0 0 auto;width:8.33333333%}.col-xxl-2{flex:0 0 auto;width:16.66666667%}.col-xxl-3{flex:0 0 auto;width:25%}.col-xxl-4{flex:0 0 auto;width:33.33333333%}.col-xxl-5{flex:0 0 auto;width:41.66666667%}.col-xxl-6{flex:0 0 auto;width:50%}.col-xxl-7{flex:0 0 auto;width:58.33333333%}.col-xxl-8{flex:0 0 auto;width:66.66666667%}.col-xxl-9{flex:0 0 auto;width:75%}.col-xxl-10{flex:0 0 auto;width:83.33333333%}.col-xxl-11{flex:0 0 auto;width:91.66666667%}.col-xxl-12{flex:0 0 auto;width:100%}.offset-xxl-0{margin-right:0}.offset-xxl-1{margin-right:8.33333333%}.offset-xxl-2{margin-right:16.66666667%}.offset-xxl-3{margin-right:25%}.offset-xxl-4{margin-right:33.33333333%}.offset-xxl-5{margin-right:41.66666667%}.offset-xxl-6{margin-right:50%}.offset-xxl-7{margin-right:58.33333333%}.offset-xxl-8{margin-right:66.66666667%}.offset-xxl-9{margin-right:75%}.offset-xxl-10{margin-right:83.33333333%}.offset-xxl-11{margin-right:91.66666667%}.g-xxl-0,.gx-xxl-0{--bs-gutter-x:0}.g-xxl-0,.gy-xxl-0{--bs-gutter-y:0}.g-xxl-1,.gx-xxl-1{--bs-gutter-x:0.25rem}.g-xxl-1,.gy-xxl-1{--bs-gutter-y:0.25rem}.g-xxl-2,.gx-xxl-2{--bs-gutter-x:0.5rem}.g-xxl-2,.gy-xxl-2{--bs-gutter-y:0.5rem}.g-xxl-3,.gx-xxl-3{--bs-gutter-x:1rem}.g-xxl-3,.gy-xxl-3{--bs-gutter-y:1rem}.g-xxl-4,.gx-xxl-4{--bs-gutter-x:1.5rem}.g-xxl-4,.gy-xxl-4{--bs-gutter-y:1.5rem}.g-xxl-5,.gx-xxl-5{--bs-gutter-x:3rem}.g-xxl-5,.gy-xxl-5{--bs-gutter-y:3rem}}.d-inline{display:inline!important}.d-inline-block{display:inline-block!important}.d-block{display:block!important}.d-grid{display:grid!important}.d-table{display:table!important}.d-table-row{display:table-row!important}.d-table-cell{display:table-cell!important}.d-flex{display:flex!important}.d-inline-flex{display:inline-flex!important}.d-none{display:none!important}.flex-fill{flex:1 1 auto!important}.flex-row{flex-direction:row!important}.flex-column{flex-direction:column!important}.flex-row-reverse{flex-direction:row-reverse!important}.flex-column-reverse{flex-direction:column-reverse!important}.flex-grow-0{flex-grow:0!important}.flex-grow-1{flex-grow:1!important}.flex-shrink-0{flex-shrink:0!important}.flex-shrink-1{flex-shrink:1!important}.flex-wrap{flex-wrap:wrap!important}.flex-nowrap{flex-wrap:nowrap!important}.flex-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-start{justify-content:flex-start!important}.justify-content-end{justify-content:flex-end!important}.justify-content-center{justify-content:center!important}.justify-content-between{justify-content:space-between!important}.justify-content-around{justify-content:space-around!important}.justify-content-evenly{justify-content:space-evenly!important}.align-items-start{align-items:flex-start!important}.align-items-end{align-items:flex-end!important}.align-items-center{align-items:center!important}.align-items-baseline{align-items:baseline!important}.align-items-stretch{align-items:stretch!important}.align-content-start{align-content:flex-start!important}.align-content-end{align-content:flex-end!important}.align-content-center{align-content:center!important}.align-content-between{align-content:space-between!important}.align-content-around{align-content:space-around!important}.align-content-stretch{align-content:stretch!important}.align-self-auto{align-self:auto!important}.align-self-start{align-self:flex-start!important}.align-self-end{align-self:flex-end!important}.align-self-center{align-self:center!important}.align-self-baseline{align-self:baseline!important}.align-self-stretch{align-self:stretch!important}.order-first{order:-1!important}.order-0{order:0!important}.order-1{order:1!important}.order-2{order:2!important}.order-3{order:3!important}.order-4{order:4!important}.order-5{order:5!important}.order-last{order:6!important}.m-0{margin:0!important}.m-1{margin:.25rem!important}.m-2{margin:.5rem!important}.m-3{margin:1rem!important}.m-4{margin:1.5rem!important}.m-5{margin:3rem!important}.m-auto{margin:auto!important}.mx-0{margin-left:0!important;margin-right:0!important}.mx-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-3{margin-left:1rem!important;margin-right:1rem!important}.mx-4{margin-left:1.5rem!important;margin-right:1.5rem!important}.mx-5{margin-left:3rem!important;margin-right:3rem!important}.mx-auto{margin-left:auto!important;margin-right:auto!important}.my-0{margin-top:0!important;margin-bottom:0!important}.my-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-0{margin-top:0!important}.mt-1{margin-top:.25rem!important}.mt-2{margin-top:.5rem!important}.mt-3{margin-top:1rem!important}.mt-4{margin-top:1.5rem!important}.mt-5{margin-top:3rem!important}.mt-auto{margin-top:auto!important}.me-0{margin-left:0!important}.me-1{margin-left:.25rem!important}.me-2{margin-left:.5rem!important}.me-3{margin-left:1rem!important}.me-4{margin-left:1.5rem!important}.me-5{margin-left:3rem!important}.me-auto{margin-left:auto!important}.mb-0{margin-bottom:0!important}.mb-1{margin-bottom:.25rem!important}.mb-2{margin-bottom:.5rem!important}.mb-3{margin-bottom:1rem!important}.mb-4{margin-bottom:1.5rem!important}.mb-5{margin-bottom:3rem!important}.mb-auto{margin-bottom:auto!important}.ms-0{margin-right:0!important}.ms-1{margin-right:.25rem!important}.ms-2{margin-right:.5rem!important}.ms-3{margin-right:1rem!important}.ms-4{margin-right:1.5rem!important}.ms-5{margin-right:3rem!important}.ms-auto{margin-right:auto!important}.p-0{padding:0!important}.p-1{padding:.25rem!important}.p-2{padding:.5rem!important}.p-3{padding:1rem!important}.p-4{padding:1.5rem!important}.p-5{padding:3rem!important}.px-0{padding-left:0!important;padding-right:0!important}.px-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-3{padding-left:1rem!important;padding-right:1rem!important}.px-4{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-5{padding-left:3rem!important;padding-right:3rem!important}.py-0{padding-top:0!important;padding-bottom:0!important}.py-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-0{padding-top:0!important}.pt-1{padding-top:.25rem!important}.pt-2{padding-top:.5rem!important}.pt-3{padding-top:1rem!important}.pt-4{padding-top:1.5rem!important}.pt-5{padding-top:3rem!important}.pe-0{padding-left:0!important}.pe-1{padding-left:.25rem!important}.pe-2{padding-left:.5rem!important}.pe-3{padding-left:1rem!important}.pe-4{padding-left:1.5rem!important}.pe-5{padding-left:3rem!important}.pb-0{padding-bottom:0!important}.pb-1{padding-bottom:.25rem!important}.pb-2{padding-bottom:.5rem!important}.pb-3{padding-bottom:1rem!important}.pb-4{padding-bottom:1.5rem!important}.pb-5{padding-bottom:3rem!important}.ps-0{padding-right:0!important}.ps-1{padding-right:.25rem!important}.ps-2{padding-right:.5rem!important}.ps-3{padding-right:1rem!important}.ps-4{padding-right:1.5rem!important}.ps-5{padding-right:3rem!important}@media (min-width:576px){.d-sm-inline{display:inline!important}.d-sm-inline-block{display:inline-block!important}.d-sm-block{display:block!important}.d-sm-grid{display:grid!important}.d-sm-table{display:table!important}.d-sm-table-row{display:table-row!important}.d-sm-table-cell{display:table-cell!important}.d-sm-flex{display:flex!important}.d-sm-inline-flex{display:inline-flex!important}.d-sm-none{display:none!important}.flex-sm-fill{flex:1 1 auto!important}.flex-sm-row{flex-direction:row!important}.flex-sm-column{flex-direction:column!important}.flex-sm-row-reverse{flex-direction:row-reverse!important}.flex-sm-column-reverse{flex-direction:column-reverse!important}.flex-sm-grow-0{flex-grow:0!important}.flex-sm-grow-1{flex-grow:1!important}.flex-sm-shrink-0{flex-shrink:0!important}.flex-sm-shrink-1{flex-shrink:1!important}.flex-sm-wrap{flex-wrap:wrap!important}.flex-sm-nowrap{flex-wrap:nowrap!important}.flex-sm-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-sm-start{justify-content:flex-start!important}.justify-content-sm-end{justify-content:flex-end!important}.justify-content-sm-center{justify-content:center!important}.justify-content-sm-between{justify-content:space-between!important}.justify-content-sm-around{justify-content:space-around!important}.justify-content-sm-evenly{justify-content:space-evenly!important}.align-items-sm-start{align-items:flex-start!important}.align-items-sm-end{align-items:flex-end!important}.align-items-sm-center{align-items:center!important}.align-items-sm-baseline{align-items:baseline!important}.align-items-sm-stretch{align-items:stretch!important}.align-content-sm-start{align-content:flex-start!important}.align-content-sm-end{align-content:flex-end!important}.align-content-sm-center{align-content:center!important}.align-content-sm-between{align-content:space-between!important}.align-content-sm-around{align-content:space-around!important}.align-content-sm-stretch{align-content:stretch!important}.align-self-sm-auto{align-self:auto!important}.align-self-sm-start{align-self:flex-start!important}.align-self-sm-end{align-self:flex-end!important}.align-self-sm-center{align-self:center!important}.align-self-sm-baseline{align-self:baseline!important}.align-self-sm-stretch{align-self:stretch!important}.order-sm-first{order:-1!important}.order-sm-0{order:0!important}.order-sm-1{order:1!important}.order-sm-2{order:2!important}.order-sm-3{order:3!important}.order-sm-4{order:4!important}.order-sm-5{order:5!important}.order-sm-last{order:6!important}.m-sm-0{margin:0!important}.m-sm-1{margin:.25rem!important}.m-sm-2{margin:.5rem!important}.m-sm-3{margin:1rem!important}.m-sm-4{margin:1.5rem!important}.m-sm-5{margin:3rem!important}.m-sm-auto{margin:auto!important}.mx-sm-0{margin-left:0!important;margin-right:0!important}.mx-sm-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-sm-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-sm-3{margin-left:1rem!important;margin-right:1rem!important}.mx-sm-4{margin-left:1.5rem!important;margin-right:1.5rem!important}.mx-sm-5{margin-left:3rem!important;margin-right:3rem!important}.mx-sm-auto{margin-left:auto!important;margin-right:auto!important}.my-sm-0{margin-top:0!important;margin-bottom:0!important}.my-sm-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-sm-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-sm-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-sm-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-sm-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-sm-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-sm-0{margin-top:0!important}.mt-sm-1{margin-top:.25rem!important}.mt-sm-2{margin-top:.5rem!important}.mt-sm-3{margin-top:1rem!important}.mt-sm-4{margin-top:1.5rem!important}.mt-sm-5{margin-top:3rem!important}.mt-sm-auto{margin-top:auto!important}.me-sm-0{margin-left:0!important}.me-sm-1{margin-left:.25rem!important}.me-sm-2{margin-left:.5rem!important}.me-sm-3{margin-left:1rem!important}.me-sm-4{margin-left:1.5rem!important}.me-sm-5{margin-left:3rem!important}.me-sm-auto{margin-left:auto!important}.mb-sm-0{margin-bottom:0!important}.mb-sm-1{margin-bottom:.25rem!important}.mb-sm-2{margin-bottom:.5rem!important}.mb-sm-3{margin-bottom:1rem!important}.mb-sm-4{margin-bottom:1.5rem!important}.mb-sm-5{margin-bottom:3rem!important}.mb-sm-auto{margin-bottom:auto!important}.ms-sm-0{margin-right:0!important}.ms-sm-1{margin-right:.25rem!important}.ms-sm-2{margin-right:.5rem!important}.ms-sm-3{margin-right:1rem!important}.ms-sm-4{margin-right:1.5rem!important}.ms-sm-5{margin-right:3rem!important}.ms-sm-auto{margin-right:auto!important}.p-sm-0{padding:0!important}.p-sm-1{padding:.25rem!important}.p-sm-2{padding:.5rem!important}.p-sm-3{padding:1rem!important}.p-sm-4{padding:1.5rem!important}.p-sm-5{padding:3rem!important}.px-sm-0{padding-left:0!important;padding-right:0!important}.px-sm-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-sm-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-sm-3{padding-left:1rem!important;padding-right:1rem!important}.px-sm-4{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-sm-5{padding-left:3rem!important;padding-right:3rem!important}.py-sm-0{padding-top:0!important;padding-bottom:0!important}.py-sm-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-sm-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-sm-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-sm-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-sm-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-sm-0{padding-top:0!important}.pt-sm-1{padding-top:.25rem!important}.pt-sm-2{padding-top:.5rem!important}.pt-sm-3{padding-top:1rem!important}.pt-sm-4{padding-top:1.5rem!important}.pt-sm-5{padding-top:3rem!important}.pe-sm-0{padding-left:0!important}.pe-sm-1{padding-left:.25rem!important}.pe-sm-2{padding-left:.5rem!important}.pe-sm-3{padding-left:1rem!important}.pe-sm-4{padding-left:1.5rem!important}.pe-sm-5{padding-left:3rem!important}.pb-sm-0{padding-bottom:0!important}.pb-sm-1{padding-bottom:.25rem!important}.pb-sm-2{padding-bottom:.5rem!important}.pb-sm-3{padding-bottom:1rem!important}.pb-sm-4{padding-bottom:1.5rem!important}.pb-sm-5{padding-bottom:3rem!important}.ps-sm-0{padding-right:0!important}.ps-sm-1{padding-right:.25rem!important}.ps-sm-2{padding-right:.5rem!important}.ps-sm-3{padding-right:1rem!important}.ps-sm-4{padding-right:1.5rem!important}.ps-sm-5{padding-right:3rem!important}}@media (min-width:768px){.d-md-inline{display:inline!important}.d-md-inline-block{display:inline-block!important}.d-md-block{display:block!important}.d-md-grid{display:grid!important}.d-md-table{display:table!important}.d-md-table-row{display:table-row!important}.d-md-table-cell{display:table-cell!important}.d-md-flex{display:flex!important}.d-md-inline-flex{display:inline-flex!important}.d-md-none{display:none!important}.flex-md-fill{flex:1 1 auto!important}.flex-md-row{flex-direction:row!important}.flex-md-column{flex-direction:column!important}.flex-md-row-reverse{flex-direction:row-reverse!important}.flex-md-column-reverse{flex-direction:column-reverse!important}.flex-md-grow-0{flex-grow:0!important}.flex-md-grow-1{flex-grow:1!important}.flex-md-shrink-0{flex-shrink:0!important}.flex-md-shrink-1{flex-shrink:1!important}.flex-md-wrap{flex-wrap:wrap!important}.flex-md-nowrap{flex-wrap:nowrap!important}.flex-md-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-md-start{justify-content:flex-start!important}.justify-content-md-end{justify-content:flex-end!important}.justify-content-md-center{justify-content:center!important}.justify-content-md-between{justify-content:space-between!important}.justify-content-md-around{justify-content:space-around!important}.justify-content-md-evenly{justify-content:space-evenly!important}.align-items-md-start{align-items:flex-start!important}.align-items-md-end{align-items:flex-end!important}.align-items-md-center{align-items:center!important}.align-items-md-baseline{align-items:baseline!important}.align-items-md-stretch{align-items:stretch!important}.align-content-md-start{align-content:flex-start!important}.align-content-md-end{align-content:flex-end!important}.align-content-md-center{align-content:center!important}.align-content-md-between{align-content:space-between!important}.align-content-md-around{align-content:space-around!important}.align-content-md-stretch{align-content:stretch!important}.align-self-md-auto{align-self:auto!important}.align-self-md-start{align-self:flex-start!important}.align-self-md-end{align-self:flex-end!important}.align-self-md-center{align-self:center!important}.align-self-md-baseline{align-self:baseline!important}.align-self-md-stretch{align-self:stretch!important}.order-md-first{order:-1!important}.order-md-0{order:0!important}.order-md-1{order:1!important}.order-md-2{order:2!important}.order-md-3{order:3!important}.order-md-4{order:4!important}.order-md-5{order:5!important}.order-md-last{order:6!important}.m-md-0{margin:0!important}.m-md-1{margin:.25rem!important}.m-md-2{margin:.5rem!important}.m-md-3{margin:1rem!important}.m-md-4{margin:1.5rem!important}.m-md-5{margin:3rem!important}.m-md-auto{margin:auto!important}.mx-md-0{margin-left:0!important;margin-right:0!important}.mx-md-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-md-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-md-3{margin-left:1rem!important;margin-right:1rem!important}.mx-md-4{margin-left:1.5rem!important;margin-right:1.5rem!important}.mx-md-5{margin-left:3rem!important;margin-right:3rem!important}.mx-md-auto{margin-left:auto!important;margin-right:auto!important}.my-md-0{margin-top:0!important;margin-bottom:0!important}.my-md-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-md-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-md-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-md-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-md-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-md-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-md-0{margin-top:0!important}.mt-md-1{margin-top:.25rem!important}.mt-md-2{margin-top:.5rem!important}.mt-md-3{margin-top:1rem!important}.mt-md-4{margin-top:1.5rem!important}.mt-md-5{margin-top:3rem!important}.mt-md-auto{margin-top:auto!important}.me-md-0{margin-left:0!important}.me-md-1{margin-left:.25rem!important}.me-md-2{margin-left:.5rem!important}.me-md-3{margin-left:1rem!important}.me-md-4{margin-left:1.5rem!important}.me-md-5{margin-left:3rem!important}.me-md-auto{margin-left:auto!important}.mb-md-0{margin-bottom:0!important}.mb-md-1{margin-bottom:.25rem!important}.mb-md-2{margin-bottom:.5rem!important}.mb-md-3{margin-bottom:1rem!important}.mb-md-4{margin-bottom:1.5rem!important}.mb-md-5{margin-bottom:3rem!important}.mb-md-auto{margin-bottom:auto!important}.ms-md-0{margin-right:0!important}.ms-md-1{margin-right:.25rem!important}.ms-md-2{margin-right:.5rem!important}.ms-md-3{margin-right:1rem!important}.ms-md-4{margin-right:1.5rem!important}.ms-md-5{margin-right:3rem!important}.ms-md-auto{margin-right:auto!important}.p-md-0{padding:0!important}.p-md-1{padding:.25rem!important}.p-md-2{padding:.5rem!important}.p-md-3{padding:1rem!important}.p-md-4{padding:1.5rem!important}.p-md-5{padding:3rem!important}.px-md-0{padding-left:0!important;padding-right:0!important}.px-md-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-md-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-md-3{padding-left:1rem!important;padding-right:1rem!important}.px-md-4{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-md-5{padding-left:3rem!important;padding-right:3rem!important}.py-md-0{padding-top:0!important;padding-bottom:0!important}.py-md-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-md-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-md-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-md-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-md-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-md-0{padding-top:0!important}.pt-md-1{padding-top:.25rem!important}.pt-md-2{padding-top:.5rem!important}.pt-md-3{padding-top:1rem!important}.pt-md-4{padding-top:1.5rem!important}.pt-md-5{padding-top:3rem!important}.pe-md-0{padding-left:0!important}.pe-md-1{padding-left:.25rem!important}.pe-md-2{padding-left:.5rem!important}.pe-md-3{padding-left:1rem!important}.pe-md-4{padding-left:1.5rem!important}.pe-md-5{padding-left:3rem!important}.pb-md-0{padding-bottom:0!important}.pb-md-1{padding-bottom:.25rem!important}.pb-md-2{padding-bottom:.5rem!important}.pb-md-3{padding-bottom:1rem!important}.pb-md-4{padding-bottom:1.5rem!important}.pb-md-5{padding-bottom:3rem!important}.ps-md-0{padding-right:0!important}.ps-md-1{padding-right:.25rem!important}.ps-md-2{padding-right:.5rem!important}.ps-md-3{padding-right:1rem!important}.ps-md-4{padding-right:1.5rem!important}.ps-md-5{padding-right:3rem!important}}@media (min-width:992px){.d-lg-inline{display:inline!important}.d-lg-inline-block{display:inline-block!important}.d-lg-block{display:block!important}.d-lg-grid{display:grid!important}.d-lg-table{display:table!important}.d-lg-table-row{display:table-row!important}.d-lg-table-cell{display:table-cell!important}.d-lg-flex{display:flex!important}.d-lg-inline-flex{display:inline-flex!important}.d-lg-none{display:none!important}.flex-lg-fill{flex:1 1 auto!important}.flex-lg-row{flex-direction:row!important}.flex-lg-column{flex-direction:column!important}.flex-lg-row-reverse{flex-direction:row-reverse!important}.flex-lg-column-reverse{flex-direction:column-reverse!important}.flex-lg-grow-0{flex-grow:0!important}.flex-lg-grow-1{flex-grow:1!important}.flex-lg-shrink-0{flex-shrink:0!important}.flex-lg-shrink-1{flex-shrink:1!important}.flex-lg-wrap{flex-wrap:wrap!important}.flex-lg-nowrap{flex-wrap:nowrap!important}.flex-lg-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-lg-start{justify-content:flex-start!important}.justify-content-lg-end{justify-content:flex-end!important}.justify-content-lg-center{justify-content:center!important}.justify-content-lg-between{justify-content:space-between!important}.justify-content-lg-around{justify-content:space-around!important}.justify-content-lg-evenly{justify-content:space-evenly!important}.align-items-lg-start{align-items:flex-start!important}.align-items-lg-end{align-items:flex-end!important}.align-items-lg-center{align-items:center!important}.align-items-lg-baseline{align-items:baseline!important}.align-items-lg-stretch{align-items:stretch!important}.align-content-lg-start{align-content:flex-start!important}.align-content-lg-end{align-content:flex-end!important}.align-content-lg-center{align-content:center!important}.align-content-lg-between{align-content:space-between!important}.align-content-lg-around{align-content:space-around!important}.align-content-lg-stretch{align-content:stretch!important}.align-self-lg-auto{align-self:auto!important}.align-self-lg-start{align-self:flex-start!important}.align-self-lg-end{align-self:flex-end!important}.align-self-lg-center{align-self:center!important}.align-self-lg-baseline{align-self:baseline!important}.align-self-lg-stretch{align-self:stretch!important}.order-lg-first{order:-1!important}.order-lg-0{order:0!important}.order-lg-1{order:1!important}.order-lg-2{order:2!important}.order-lg-3{order:3!important}.order-lg-4{order:4!important}.order-lg-5{order:5!important}.order-lg-last{order:6!important}.m-lg-0{margin:0!important}.m-lg-1{margin:.25rem!important}.m-lg-2{margin:.5rem!important}.m-lg-3{margin:1rem!important}.m-lg-4{margin:1.5rem!important}.m-lg-5{margin:3rem!important}.m-lg-auto{margin:auto!important}.mx-lg-0{margin-left:0!important;margin-right:0!important}.mx-lg-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-lg-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-lg-3{margin-left:1rem!important;margin-right:1rem!important}.mx-lg-4{margin-left:1.5rem!important;margin-right:1.5rem!important}.mx-lg-5{margin-left:3rem!important;margin-right:3rem!important}.mx-lg-auto{margin-left:auto!important;margin-right:auto!important}.my-lg-0{margin-top:0!important;margin-bottom:0!important}.my-lg-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-lg-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-lg-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-lg-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-lg-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-lg-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-lg-0{margin-top:0!important}.mt-lg-1{margin-top:.25rem!important}.mt-lg-2{margin-top:.5rem!important}.mt-lg-3{margin-top:1rem!important}.mt-lg-4{margin-top:1.5rem!important}.mt-lg-5{margin-top:3rem!important}.mt-lg-auto{margin-top:auto!important}.me-lg-0{margin-left:0!important}.me-lg-1{margin-left:.25rem!important}.me-lg-2{margin-left:.5rem!important}.me-lg-3{margin-left:1rem!important}.me-lg-4{margin-left:1.5rem!important}.me-lg-5{margin-left:3rem!important}.me-lg-auto{margin-left:auto!important}.mb-lg-0{margin-bottom:0!important}.mb-lg-1{margin-bottom:.25rem!important}.mb-lg-2{margin-bottom:.5rem!important}.mb-lg-3{margin-bottom:1rem!important}.mb-lg-4{margin-bottom:1.5rem!important}.mb-lg-5{margin-bottom:3rem!important}.mb-lg-auto{margin-bottom:auto!important}.ms-lg-0{margin-right:0!important}.ms-lg-1{margin-right:.25rem!important}.ms-lg-2{margin-right:.5rem!important}.ms-lg-3{margin-right:1rem!important}.ms-lg-4{margin-right:1.5rem!important}.ms-lg-5{margin-right:3rem!important}.ms-lg-auto{margin-right:auto!important}.p-lg-0{padding:0!important}.p-lg-1{padding:.25rem!important}.p-lg-2{padding:.5rem!important}.p-lg-3{padding:1rem!important}.p-lg-4{padding:1.5rem!important}.p-lg-5{padding:3rem!important}.px-lg-0{padding-left:0!important;padding-right:0!important}.px-lg-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-lg-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-lg-3{padding-left:1rem!important;padding-right:1rem!important}.px-lg-4{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-lg-5{padding-left:3rem!important;padding-right:3rem!important}.py-lg-0{padding-top:0!important;padding-bottom:0!important}.py-lg-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-lg-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-lg-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-lg-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-lg-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-lg-0{padding-top:0!important}.pt-lg-1{padding-top:.25rem!important}.pt-lg-2{padding-top:.5rem!important}.pt-lg-3{padding-top:1rem!important}.pt-lg-4{padding-top:1.5rem!important}.pt-lg-5{padding-top:3rem!important}.pe-lg-0{padding-left:0!important}.pe-lg-1{padding-left:.25rem!important}.pe-lg-2{padding-left:.5rem!important}.pe-lg-3{padding-left:1rem!important}.pe-lg-4{padding-left:1.5rem!important}.pe-lg-5{padding-left:3rem!important}.pb-lg-0{padding-bottom:0!important}.pb-lg-1{padding-bottom:.25rem!important}.pb-lg-2{padding-bottom:.5rem!important}.pb-lg-3{padding-bottom:1rem!important}.pb-lg-4{padding-bottom:1.5rem!important}.pb-lg-5{padding-bottom:3rem!important}.ps-lg-0{padding-right:0!important}.ps-lg-1{padding-right:.25rem!important}.ps-lg-2{padding-right:.5rem!important}.ps-lg-3{padding-right:1rem!important}.ps-lg-4{padding-right:1.5rem!important}.ps-lg-5{padding-right:3rem!important}}@media (min-width:1200px){.d-xl-inline{display:inline!important}.d-xl-inline-block{display:inline-block!important}.d-xl-block{display:block!important}.d-xl-grid{display:grid!important}.d-xl-table{display:table!important}.d-xl-table-row{display:table-row!important}.d-xl-table-cell{display:table-cell!important}.d-xl-flex{display:flex!important}.d-xl-inline-flex{display:inline-flex!important}.d-xl-none{display:none!important}.flex-xl-fill{flex:1 1 auto!important}.flex-xl-row{flex-direction:row!important}.flex-xl-column{flex-direction:column!important}.flex-xl-row-reverse{flex-direction:row-reverse!important}.flex-xl-column-reverse{flex-direction:column-reverse!important}.flex-xl-grow-0{flex-grow:0!important}.flex-xl-grow-1{flex-grow:1!important}.flex-xl-shrink-0{flex-shrink:0!important}.flex-xl-shrink-1{flex-shrink:1!important}.flex-xl-wrap{flex-wrap:wrap!important}.flex-xl-nowrap{flex-wrap:nowrap!important}.flex-xl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xl-start{justify-content:flex-start!important}.justify-content-xl-end{justify-content:flex-end!important}.justify-content-xl-center{justify-content:center!important}.justify-content-xl-between{justify-content:space-between!important}.justify-content-xl-around{justify-content:space-around!important}.justify-content-xl-evenly{justify-content:space-evenly!important}.align-items-xl-start{align-items:flex-start!important}.align-items-xl-end{align-items:flex-end!important}.align-items-xl-center{align-items:center!important}.align-items-xl-baseline{align-items:baseline!important}.align-items-xl-stretch{align-items:stretch!important}.align-content-xl-start{align-content:flex-start!important}.align-content-xl-end{align-content:flex-end!important}.align-content-xl-center{align-content:center!important}.align-content-xl-between{align-content:space-between!important}.align-content-xl-around{align-content:space-around!important}.align-content-xl-stretch{align-content:stretch!important}.align-self-xl-auto{align-self:auto!important}.align-self-xl-start{align-self:flex-start!important}.align-self-xl-end{align-self:flex-end!important}.align-self-xl-center{align-self:center!important}.align-self-xl-baseline{align-self:baseline!important}.align-self-xl-stretch{align-self:stretch!important}.order-xl-first{order:-1!important}.order-xl-0{order:0!important}.order-xl-1{order:1!important}.order-xl-2{order:2!important}.order-xl-3{order:3!important}.order-xl-4{order:4!important}.order-xl-5{order:5!important}.order-xl-last{order:6!important}.m-xl-0{margin:0!important}.m-xl-1{margin:.25rem!important}.m-xl-2{margin:.5rem!important}.m-xl-3{margin:1rem!important}.m-xl-4{margin:1.5rem!important}.m-xl-5{margin:3rem!important}.m-xl-auto{margin:auto!important}.mx-xl-0{margin-left:0!important;margin-right:0!important}.mx-xl-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-xl-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-xl-3{margin-left:1rem!important;margin-right:1rem!important}.mx-xl-4{margin-left:1.5rem!important;margin-right:1.5rem!important}.mx-xl-5{margin-left:3rem!important;margin-right:3rem!important}.mx-xl-auto{margin-left:auto!important;margin-right:auto!important}.my-xl-0{margin-top:0!important;margin-bottom:0!important}.my-xl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xl-0{margin-top:0!important}.mt-xl-1{margin-top:.25rem!important}.mt-xl-2{margin-top:.5rem!important}.mt-xl-3{margin-top:1rem!important}.mt-xl-4{margin-top:1.5rem!important}.mt-xl-5{margin-top:3rem!important}.mt-xl-auto{margin-top:auto!important}.me-xl-0{margin-left:0!important}.me-xl-1{margin-left:.25rem!important}.me-xl-2{margin-left:.5rem!important}.me-xl-3{margin-left:1rem!important}.me-xl-4{margin-left:1.5rem!important}.me-xl-5{margin-left:3rem!important}.me-xl-auto{margin-left:auto!important}.mb-xl-0{margin-bottom:0!important}.mb-xl-1{margin-bottom:.25rem!important}.mb-xl-2{margin-bottom:.5rem!important}.mb-xl-3{margin-bottom:1rem!important}.mb-xl-4{margin-bottom:1.5rem!important}.mb-xl-5{margin-bottom:3rem!important}.mb-xl-auto{margin-bottom:auto!important}.ms-xl-0{margin-right:0!important}.ms-xl-1{margin-right:.25rem!important}.ms-xl-2{margin-right:.5rem!important}.ms-xl-3{margin-right:1rem!important}.ms-xl-4{margin-right:1.5rem!important}.ms-xl-5{margin-right:3rem!important}.ms-xl-auto{margin-right:auto!important}.p-xl-0{padding:0!important}.p-xl-1{padding:.25rem!important}.p-xl-2{padding:.5rem!important}.p-xl-3{padding:1rem!important}.p-xl-4{padding:1.5rem!important}.p-xl-5{padding:3rem!important}.px-xl-0{padding-left:0!important;padding-right:0!important}.px-xl-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-xl-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-xl-3{padding-left:1rem!important;padding-right:1rem!important}.px-xl-4{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-xl-5{padding-left:3rem!important;padding-right:3rem!important}.py-xl-0{padding-top:0!important;padding-bottom:0!important}.py-xl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xl-0{padding-top:0!important}.pt-xl-1{padding-top:.25rem!important}.pt-xl-2{padding-top:.5rem!important}.pt-xl-3{padding-top:1rem!important}.pt-xl-4{padding-top:1.5rem!important}.pt-xl-5{padding-top:3rem!important}.pe-xl-0{padding-left:0!important}.pe-xl-1{padding-left:.25rem!important}.pe-xl-2{padding-left:.5rem!important}.pe-xl-3{padding-left:1rem!important}.pe-xl-4{padding-left:1.5rem!important}.pe-xl-5{padding-left:3rem!important}.pb-xl-0{padding-bottom:0!important}.pb-xl-1{padding-bottom:.25rem!important}.pb-xl-2{padding-bottom:.5rem!important}.pb-xl-3{padding-bottom:1rem!important}.pb-xl-4{padding-bottom:1.5rem!important}.pb-xl-5{padding-bottom:3rem!important}.ps-xl-0{padding-right:0!important}.ps-xl-1{padding-right:.25rem!important}.ps-xl-2{padding-right:.5rem!important}.ps-xl-3{padding-right:1rem!important}.ps-xl-4{padding-right:1.5rem!important}.ps-xl-5{padding-right:3rem!important}}@media (min-width:1400px){.d-xxl-inline{display:inline!important}.d-xxl-inline-block{display:inline-block!important}.d-xxl-block{display:block!important}.d-xxl-grid{display:grid!important}.d-xxl-table{display:table!important}.d-xxl-table-row{display:table-row!important}.d-xxl-table-cell{display:table-cell!important}.d-xxl-flex{display:flex!important}.d-xxl-inline-flex{display:inline-flex!important}.d-xxl-none{display:none!important}.flex-xxl-fill{flex:1 1 auto!important}.flex-xxl-row{flex-direction:row!important}.flex-xxl-column{flex-direction:column!important}.flex-xxl-row-reverse{flex-direction:row-reverse!important}.flex-xxl-column-reverse{flex-direction:column-reverse!important}.flex-xxl-grow-0{flex-grow:0!important}.flex-xxl-grow-1{flex-grow:1!important}.flex-xxl-shrink-0{flex-shrink:0!important}.flex-xxl-shrink-1{flex-shrink:1!important}.flex-xxl-wrap{flex-wrap:wrap!important}.flex-xxl-nowrap{flex-wrap:nowrap!important}.flex-xxl-wrap-reverse{flex-wrap:wrap-reverse!important}.justify-content-xxl-start{justify-content:flex-start!important}.justify-content-xxl-end{justify-content:flex-end!important}.justify-content-xxl-center{justify-content:center!important}.justify-content-xxl-between{justify-content:space-between!important}.justify-content-xxl-around{justify-content:space-around!important}.justify-content-xxl-evenly{justify-content:space-evenly!important}.align-items-xxl-start{align-items:flex-start!important}.align-items-xxl-end{align-items:flex-end!important}.align-items-xxl-center{align-items:center!important}.align-items-xxl-baseline{align-items:baseline!important}.align-items-xxl-stretch{align-items:stretch!important}.align-content-xxl-start{align-content:flex-start!important}.align-content-xxl-end{align-content:flex-end!important}.align-content-xxl-center{align-content:center!important}.align-content-xxl-between{align-content:space-between!important}.align-content-xxl-around{align-content:space-around!important}.align-content-xxl-stretch{align-content:stretch!important}.align-self-xxl-auto{align-self:auto!important}.align-self-xxl-start{align-self:flex-start!important}.align-self-xxl-end{align-self:flex-end!important}.align-self-xxl-center{align-self:center!important}.align-self-xxl-baseline{align-self:baseline!important}.align-self-xxl-stretch{align-self:stretch!important}.order-xxl-first{order:-1!important}.order-xxl-0{order:0!important}.order-xxl-1{order:1!important}.order-xxl-2{order:2!important}.order-xxl-3{order:3!important}.order-xxl-4{order:4!important}.order-xxl-5{order:5!important}.order-xxl-last{order:6!important}.m-xxl-0{margin:0!important}.m-xxl-1{margin:.25rem!important}.m-xxl-2{margin:.5rem!important}.m-xxl-3{margin:1rem!important}.m-xxl-4{margin:1.5rem!important}.m-xxl-5{margin:3rem!important}.m-xxl-auto{margin:auto!important}.mx-xxl-0{margin-left:0!important;margin-right:0!important}.mx-xxl-1{margin-left:.25rem!important;margin-right:.25rem!important}.mx-xxl-2{margin-left:.5rem!important;margin-right:.5rem!important}.mx-xxl-3{margin-left:1rem!important;margin-right:1rem!important}.mx-xxl-4{margin-left:1.5rem!important;margin-right:1.5rem!important}.mx-xxl-5{margin-left:3rem!important;margin-right:3rem!important}.mx-xxl-auto{margin-left:auto!important;margin-right:auto!important}.my-xxl-0{margin-top:0!important;margin-bottom:0!important}.my-xxl-1{margin-top:.25rem!important;margin-bottom:.25rem!important}.my-xxl-2{margin-top:.5rem!important;margin-bottom:.5rem!important}.my-xxl-3{margin-top:1rem!important;margin-bottom:1rem!important}.my-xxl-4{margin-top:1.5rem!important;margin-bottom:1.5rem!important}.my-xxl-5{margin-top:3rem!important;margin-bottom:3rem!important}.my-xxl-auto{margin-top:auto!important;margin-bottom:auto!important}.mt-xxl-0{margin-top:0!important}.mt-xxl-1{margin-top:.25rem!important}.mt-xxl-2{margin-top:.5rem!important}.mt-xxl-3{margin-top:1rem!important}.mt-xxl-4{margin-top:1.5rem!important}.mt-xxl-5{margin-top:3rem!important}.mt-xxl-auto{margin-top:auto!important}.me-xxl-0{margin-left:0!important}.me-xxl-1{margin-left:.25rem!important}.me-xxl-2{margin-left:.5rem!important}.me-xxl-3{margin-left:1rem!important}.me-xxl-4{margin-left:1.5rem!important}.me-xxl-5{margin-left:3rem!important}.me-xxl-auto{margin-left:auto!important}.mb-xxl-0{margin-bottom:0!important}.mb-xxl-1{margin-bottom:.25rem!important}.mb-xxl-2{margin-bottom:.5rem!important}.mb-xxl-3{margin-bottom:1rem!important}.mb-xxl-4{margin-bottom:1.5rem!important}.mb-xxl-5{margin-bottom:3rem!important}.mb-xxl-auto{margin-bottom:auto!important}.ms-xxl-0{margin-right:0!important}.ms-xxl-1{margin-right:.25rem!important}.ms-xxl-2{margin-right:.5rem!important}.ms-xxl-3{margin-right:1rem!important}.ms-xxl-4{margin-right:1.5rem!important}.ms-xxl-5{margin-right:3rem!important}.ms-xxl-auto{margin-right:auto!important}.p-xxl-0{padding:0!important}.p-xxl-1{padding:.25rem!important}.p-xxl-2{padding:.5rem!important}.p-xxl-3{padding:1rem!important}.p-xxl-4{padding:1.5rem!important}.p-xxl-5{padding:3rem!important}.px-xxl-0{padding-left:0!important;padding-right:0!important}.px-xxl-1{padding-left:.25rem!important;padding-right:.25rem!important}.px-xxl-2{padding-left:.5rem!important;padding-right:.5rem!important}.px-xxl-3{padding-left:1rem!important;padding-right:1rem!important}.px-xxl-4{padding-left:1.5rem!important;padding-right:1.5rem!important}.px-xxl-5{padding-left:3rem!important;padding-right:3rem!important}.py-xxl-0{padding-top:0!important;padding-bottom:0!important}.py-xxl-1{padding-top:.25rem!important;padding-bottom:.25rem!important}.py-xxl-2{padding-top:.5rem!important;padding-bottom:.5rem!important}.py-xxl-3{padding-top:1rem!important;padding-bottom:1rem!important}.py-xxl-4{padding-top:1.5rem!important;padding-bottom:1.5rem!important}.py-xxl-5{padding-top:3rem!important;padding-bottom:3rem!important}.pt-xxl-0{padding-top:0!important}.pt-xxl-1{padding-top:.25rem!important}.pt-xxl-2{padding-top:.5rem!important}.pt-xxl-3{padding-top:1rem!important}.pt-xxl-4{padding-top:1.5rem!important}.pt-xxl-5{padding-top:3rem!important}.pe-xxl-0{padding-left:0!important}.pe-xxl-1{padding-left:.25rem!important}.pe-xxl-2{padding-left:.5rem!important}.pe-xxl-3{padding-left:1rem!important}.pe-xxl-4{padding-left:1.5rem!important}.pe-xxl-5{padding-left:3rem!important}.pb-xxl-0{padding-bottom:0!important}.pb-xxl-1{padding-bottom:.25rem!important}.pb-xxl-2{padding-bottom:.5rem!important}.pb-xxl-3{padding-bottom:1rem!important}.pb-xxl-4{padding-bottom:1.5rem!important}.pb-xxl-5{padding-bottom:3rem!important}.ps-xxl-0{padding-right:0!important}.ps-xxl-1{padding-right:.25rem!important}.ps-xxl-2{padding-right:.5rem!important}.ps-xxl-3{padding-right:1rem!important}.ps-xxl-4{padding-right:1.5rem!important}.ps-xxl-5{padding-right:3rem!important}}@media print{.d-print-inline{display:inline!important}.d-print-inline-block{display:inline-block!important}.d-print-block{display:block!important}.d-print-grid{display:grid!important}.d-print-table{display:table!important}.d-print-table-row{display:table-row!important}.d-print-table-cell{display:table-cell!important}.d-print-flex{display:flex!important}.d-print-inline-flex{display:inline-flex!important}.d-print-none{display:none!important}} +/*# sourceMappingURL=bootstrap-grid.rtl.min.css.map */ \ No newline at end of file diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map new file mode 100644 index 0000000..86d302a --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-grid.rtl.min.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../scss/bootstrap-grid.scss","../../scss/_containers.scss","dist/css/bootstrap-grid.rtl.css","../../scss/mixins/_container.scss","../../scss/mixins/_breakpoints.scss","../../scss/_grid.scss","../../scss/mixins/_grid.scss","../../scss/mixins/_utilities.scss","../../scss/utilities/_api.scss"],"names":[],"mappings":"AAAA;;;;;ACME,WCCF,iBAGA,cACA,cACA,cAHA,cADA,eCLE,MAAA,KACA,aAAA,0BACA,cAAA,0BACA,YAAA,KACA,aAAA,KCwDE,yBH5CE,WAAA,cACE,UAAA,OG2CJ,yBH5CE,WAAA,cAAA,cACE,UAAA,OG2CJ,yBH5CE,WAAA,cAAA,cAAA,cACE,UAAA,OG2CJ,0BH5CE,WAAA,cAAA,cAAA,cAAA,cACE,UAAA,QG2CJ,0BH5CE,WAAA,cAAA,cAAA,cAAA,cAAA,eACE,UAAA,QIfN,KCAA,cAAA,OACA,cAAA,EACA,QAAA,KACA,UAAA,KACA,WAAA,8BACA,YAAA,+BACA,aAAA,+BDHE,OCQF,WAAA,WAIA,YAAA,EACA,MAAA,KACA,UAAA,KACA,aAAA,8BACA,cAAA,8BACA,WAAA,mBA+CI,KACE,KAAA,EAAA,EAAA,GAGF,iBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,cACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,cACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,UAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,OAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,QAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,QAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,QAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,UAxDV,aAAA,YAwDU,UAxDV,aAAA,aAwDU,UAxDV,aAAA,IAwDU,UAxDV,aAAA,aAwDU,UAxDV,aAAA,aAwDU,UAxDV,aAAA,IAwDU,UAxDV,aAAA,aAwDU,UAxDV,aAAA,aAwDU,UAxDV,aAAA,IAwDU,WAxDV,aAAA,aAwDU,WAxDV,aAAA,aAmEM,KJoGR,MIlGU,cAAA,EAGF,KJoGR,MIlGU,cAAA,EAPF,KJ8GR,MI5GU,cAAA,QAGF,KJ8GR,MI5GU,cAAA,QAPF,KJwHR,MItHU,cAAA,OAGF,KJwHR,MItHU,cAAA,OAPF,KJkIR,MIhIU,cAAA,KAGF,KJkIR,MIhIU,cAAA,KAPF,KJ4IR,MI1IU,cAAA,OAGF,KJ4IR,MI1IU,cAAA,OAPF,KJsJR,MIpJU,cAAA,KAGF,KJsJR,MIpJU,cAAA,KFzDN,yBESE,QACE,KAAA,EAAA,EAAA,GAGF,oBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,aAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,aAxDV,aAAA,EAwDU,aAxDV,aAAA,YAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,cAxDV,aAAA,aAwDU,cAxDV,aAAA,aAmEM,QJyTR,SIvTU,cAAA,EAGF,QJyTR,SIvTU,cAAA,EAPF,QJmUR,SIjUU,cAAA,QAGF,QJmUR,SIjUU,cAAA,QAPF,QJ6UR,SI3UU,cAAA,OAGF,QJ6UR,SI3UU,cAAA,OAPF,QJuVR,SIrVU,cAAA,KAGF,QJuVR,SIrVU,cAAA,KAPF,QJiWR,SI/VU,cAAA,OAGF,QJiWR,SI/VU,cAAA,OAPF,QJ2WR,SIzWU,cAAA,KAGF,QJ2WR,SIzWU,cAAA,MFzDN,yBESE,QACE,KAAA,EAAA,EAAA,GAGF,oBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,aAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,aAxDV,aAAA,EAwDU,aAxDV,aAAA,YAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,cAxDV,aAAA,aAwDU,cAxDV,aAAA,aAmEM,QJ8gBR,SI5gBU,cAAA,EAGF,QJ8gBR,SI5gBU,cAAA,EAPF,QJwhBR,SIthBU,cAAA,QAGF,QJwhBR,SIthBU,cAAA,QAPF,QJkiBR,SIhiBU,cAAA,OAGF,QJkiBR,SIhiBU,cAAA,OAPF,QJ4iBR,SI1iBU,cAAA,KAGF,QJ4iBR,SI1iBU,cAAA,KAPF,QJsjBR,SIpjBU,cAAA,OAGF,QJsjBR,SIpjBU,cAAA,OAPF,QJgkBR,SI9jBU,cAAA,KAGF,QJgkBR,SI9jBU,cAAA,MFzDN,yBESE,QACE,KAAA,EAAA,EAAA,GAGF,oBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,aAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,aAxDV,aAAA,EAwDU,aAxDV,aAAA,YAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,cAxDV,aAAA,aAwDU,cAxDV,aAAA,aAmEM,QJmuBR,SIjuBU,cAAA,EAGF,QJmuBR,SIjuBU,cAAA,EAPF,QJ6uBR,SI3uBU,cAAA,QAGF,QJ6uBR,SI3uBU,cAAA,QAPF,QJuvBR,SIrvBU,cAAA,OAGF,QJuvBR,SIrvBU,cAAA,OAPF,QJiwBR,SI/vBU,cAAA,KAGF,QJiwBR,SI/vBU,cAAA,KAPF,QJ2wBR,SIzwBU,cAAA,OAGF,QJ2wBR,SIzwBU,cAAA,OAPF,QJqxBR,SInxBU,cAAA,KAGF,QJqxBR,SInxBU,cAAA,MFzDN,0BESE,QACE,KAAA,EAAA,EAAA,GAGF,oBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,iBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,aAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,UAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,aAxDV,aAAA,EAwDU,aAxDV,aAAA,YAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,aAwDU,aAxDV,aAAA,IAwDU,cAxDV,aAAA,aAwDU,cAxDV,aAAA,aAmEM,QJw7BR,SIt7BU,cAAA,EAGF,QJw7BR,SIt7BU,cAAA,EAPF,QJk8BR,SIh8BU,cAAA,QAGF,QJk8BR,SIh8BU,cAAA,QAPF,QJ48BR,SI18BU,cAAA,OAGF,QJ48BR,SI18BU,cAAA,OAPF,QJs9BR,SIp9BU,cAAA,KAGF,QJs9BR,SIp9BU,cAAA,KAPF,QJg+BR,SI99BU,cAAA,OAGF,QJg+BR,SI99BU,cAAA,OAPF,QJ0+BR,SIx+BU,cAAA,KAGF,QJ0+BR,SIx+BU,cAAA,MFzDN,0BESE,SACE,KAAA,EAAA,EAAA,GAGF,qBApCJ,KAAA,EAAA,EAAA,KACA,MAAA,KAcA,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,KAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,eAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,IAFF,kBACE,KAAA,EAAA,EAAA,KACA,MAAA,eA+BE,cAhDJ,KAAA,EAAA,EAAA,KACA,MAAA,KAqDQ,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,YA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,WAhEN,KAAA,EAAA,EAAA,KACA,MAAA,IA+DM,YAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,YAhEN,KAAA,EAAA,EAAA,KACA,MAAA,aA+DM,YAhEN,KAAA,EAAA,EAAA,KACA,MAAA,KAuEQ,cAxDV,aAAA,EAwDU,cAxDV,aAAA,YAwDU,cAxDV,aAAA,aAwDU,cAxDV,aAAA,IAwDU,cAxDV,aAAA,aAwDU,cAxDV,aAAA,aAwDU,cAxDV,aAAA,IAwDU,cAxDV,aAAA,aAwDU,cAxDV,aAAA,aAwDU,cAxDV,aAAA,IAwDU,eAxDV,aAAA,aAwDU,eAxDV,aAAA,aAmEM,SJ6oCR,UI3oCU,cAAA,EAGF,SJ6oCR,UI3oCU,cAAA,EAPF,SJupCR,UIrpCU,cAAA,QAGF,SJupCR,UIrpCU,cAAA,QAPF,SJiqCR,UI/pCU,cAAA,OAGF,SJiqCR,UI/pCU,cAAA,OAPF,SJ2qCR,UIzqCU,cAAA,KAGF,SJ2qCR,UIzqCU,cAAA,KAPF,SJqrCR,UInrCU,cAAA,OAGF,SJqrCR,UInrCU,cAAA,OAPF,SJ+rCR,UI7rCU,cAAA,KAGF,SJ+rCR,UI7rCU,cAAA,MCzDF,UAOI,QAAA,iBAPJ,gBAOI,QAAA,uBAPJ,SAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,SAOI,QAAA,gBAPJ,aAOI,QAAA,oBAPJ,cAOI,QAAA,qBAPJ,QAOI,QAAA,eAPJ,eAOI,QAAA,sBAPJ,QAOI,QAAA,eAPJ,WAOI,KAAA,EAAA,EAAA,eAPJ,UAOI,eAAA,cAPJ,aAOI,eAAA,iBAPJ,kBAOI,eAAA,sBAPJ,qBAOI,eAAA,yBAPJ,aAOI,UAAA,YAPJ,aAOI,UAAA,YAPJ,eAOI,YAAA,YAPJ,eAOI,YAAA,YAPJ,WAOI,UAAA,eAPJ,aAOI,UAAA,iBAPJ,mBAOI,UAAA,uBAPJ,uBAOI,gBAAA,qBAPJ,qBAOI,gBAAA,mBAPJ,wBAOI,gBAAA,iBAPJ,yBAOI,gBAAA,wBAPJ,wBAOI,gBAAA,uBAPJ,wBAOI,gBAAA,uBAPJ,mBAOI,YAAA,qBAPJ,iBAOI,YAAA,mBAPJ,oBAOI,YAAA,iBAPJ,sBAOI,YAAA,mBAPJ,qBAOI,YAAA,kBAPJ,qBAOI,cAAA,qBAPJ,mBAOI,cAAA,mBAPJ,sBAOI,cAAA,iBAPJ,uBAOI,cAAA,wBAPJ,sBAOI,cAAA,uBAPJ,uBAOI,cAAA,kBAPJ,iBAOI,WAAA,eAPJ,kBAOI,WAAA,qBAPJ,gBAOI,WAAA,mBAPJ,mBAOI,WAAA,iBAPJ,qBAOI,WAAA,mBAPJ,oBAOI,WAAA,kBAPJ,aAOI,MAAA,aAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,SAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,KAOI,OAAA,YAPJ,KAOI,OAAA,iBAPJ,KAOI,OAAA,gBAPJ,KAOI,OAAA,eAPJ,KAOI,OAAA,iBAPJ,KAOI,OAAA,eAPJ,QAOI,OAAA,eAPJ,MAOI,YAAA,YAAA,aAAA,YAPJ,MAOI,YAAA,iBAAA,aAAA,iBAPJ,MAOI,YAAA,gBAAA,aAAA,gBAPJ,MAOI,YAAA,eAAA,aAAA,eAPJ,MAOI,YAAA,iBAAA,aAAA,iBAPJ,MAOI,YAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,eAAA,aAAA,eAPJ,MAOI,WAAA,YAAA,cAAA,YAPJ,MAOI,WAAA,iBAAA,cAAA,iBAPJ,MAOI,WAAA,gBAAA,cAAA,gBAPJ,MAOI,WAAA,eAAA,cAAA,eAPJ,MAOI,WAAA,iBAAA,cAAA,iBAPJ,MAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,MAOI,WAAA,YAPJ,MAOI,WAAA,iBAPJ,MAOI,WAAA,gBAPJ,MAOI,WAAA,eAPJ,MAOI,WAAA,iBAPJ,MAOI,WAAA,eAPJ,SAOI,WAAA,eAPJ,MAOI,YAAA,YAPJ,MAOI,YAAA,iBAPJ,MAOI,YAAA,gBAPJ,MAOI,YAAA,eAPJ,MAOI,YAAA,iBAPJ,MAOI,YAAA,eAPJ,SAOI,YAAA,eAPJ,MAOI,cAAA,YAPJ,MAOI,cAAA,iBAPJ,MAOI,cAAA,gBAPJ,MAOI,cAAA,eAPJ,MAOI,cAAA,iBAPJ,MAOI,cAAA,eAPJ,SAOI,cAAA,eAPJ,MAOI,aAAA,YAPJ,MAOI,aAAA,iBAPJ,MAOI,aAAA,gBAPJ,MAOI,aAAA,eAPJ,MAOI,aAAA,iBAPJ,MAOI,aAAA,eAPJ,SAOI,aAAA,eAPJ,KAOI,QAAA,YAPJ,KAOI,QAAA,iBAPJ,KAOI,QAAA,gBAPJ,KAOI,QAAA,eAPJ,KAOI,QAAA,iBAPJ,KAOI,QAAA,eAPJ,MAOI,aAAA,YAAA,cAAA,YAPJ,MAOI,aAAA,iBAAA,cAAA,iBAPJ,MAOI,aAAA,gBAAA,cAAA,gBAPJ,MAOI,aAAA,eAAA,cAAA,eAPJ,MAOI,aAAA,iBAAA,cAAA,iBAPJ,MAOI,aAAA,eAAA,cAAA,eAPJ,MAOI,YAAA,YAAA,eAAA,YAPJ,MAOI,YAAA,iBAAA,eAAA,iBAPJ,MAOI,YAAA,gBAAA,eAAA,gBAPJ,MAOI,YAAA,eAAA,eAAA,eAPJ,MAOI,YAAA,iBAAA,eAAA,iBAPJ,MAOI,YAAA,eAAA,eAAA,eAPJ,MAOI,YAAA,YAPJ,MAOI,YAAA,iBAPJ,MAOI,YAAA,gBAPJ,MAOI,YAAA,eAPJ,MAOI,YAAA,iBAPJ,MAOI,YAAA,eAPJ,MAOI,aAAA,YAPJ,MAOI,aAAA,iBAPJ,MAOI,aAAA,gBAPJ,MAOI,aAAA,eAPJ,MAOI,aAAA,iBAPJ,MAOI,aAAA,eAPJ,MAOI,eAAA,YAPJ,MAOI,eAAA,iBAPJ,MAOI,eAAA,gBAPJ,MAOI,eAAA,eAPJ,MAOI,eAAA,iBAPJ,MAOI,eAAA,eAPJ,MAOI,cAAA,YAPJ,MAOI,cAAA,iBAPJ,MAOI,cAAA,gBAPJ,MAOI,cAAA,eAPJ,MAOI,cAAA,iBAPJ,MAOI,cAAA,eHPR,yBGAI,aAOI,QAAA,iBAPJ,mBAOI,QAAA,uBAPJ,YAOI,QAAA,gBAPJ,WAOI,QAAA,eAPJ,YAOI,QAAA,gBAPJ,gBAOI,QAAA,oBAPJ,iBAOI,QAAA,qBAPJ,WAOI,QAAA,eAPJ,kBAOI,QAAA,sBAPJ,WAOI,QAAA,eAPJ,cAOI,KAAA,EAAA,EAAA,eAPJ,aAOI,eAAA,cAPJ,gBAOI,eAAA,iBAPJ,qBAOI,eAAA,sBAPJ,wBAOI,eAAA,yBAPJ,gBAOI,UAAA,YAPJ,gBAOI,UAAA,YAPJ,kBAOI,YAAA,YAPJ,kBAOI,YAAA,YAPJ,cAOI,UAAA,eAPJ,gBAOI,UAAA,iBAPJ,sBAOI,UAAA,uBAPJ,0BAOI,gBAAA,qBAPJ,wBAOI,gBAAA,mBAPJ,2BAOI,gBAAA,iBAPJ,4BAOI,gBAAA,wBAPJ,2BAOI,gBAAA,uBAPJ,2BAOI,gBAAA,uBAPJ,sBAOI,YAAA,qBAPJ,oBAOI,YAAA,mBAPJ,uBAOI,YAAA,iBAPJ,yBAOI,YAAA,mBAPJ,wBAOI,YAAA,kBAPJ,wBAOI,cAAA,qBAPJ,sBAOI,cAAA,mBAPJ,yBAOI,cAAA,iBAPJ,0BAOI,cAAA,wBAPJ,yBAOI,cAAA,uBAPJ,0BAOI,cAAA,kBAPJ,oBAOI,WAAA,eAPJ,qBAOI,WAAA,qBAPJ,mBAOI,WAAA,mBAPJ,sBAOI,WAAA,iBAPJ,wBAOI,WAAA,mBAPJ,uBAOI,WAAA,kBAPJ,gBAOI,MAAA,aAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,eAOI,MAAA,YAPJ,QAOI,OAAA,YAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,gBAPJ,QAOI,OAAA,eAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,eAPJ,WAOI,OAAA,eAPJ,SAOI,YAAA,YAAA,aAAA,YAPJ,SAOI,YAAA,iBAAA,aAAA,iBAPJ,SAOI,YAAA,gBAAA,aAAA,gBAPJ,SAOI,YAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,iBAAA,aAAA,iBAPJ,SAOI,YAAA,eAAA,aAAA,eAPJ,YAOI,YAAA,eAAA,aAAA,eAPJ,SAOI,WAAA,YAAA,cAAA,YAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,gBAAA,cAAA,gBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,YAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,YAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,gBAPJ,SAOI,WAAA,eAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,eAPJ,YAOI,WAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,YAOI,YAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,YAOI,cAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,YAOI,aAAA,eAPJ,QAOI,QAAA,YAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,eAPJ,SAOI,aAAA,YAAA,cAAA,YAPJ,SAOI,aAAA,iBAAA,cAAA,iBAPJ,SAOI,aAAA,gBAAA,cAAA,gBAPJ,SAOI,aAAA,eAAA,cAAA,eAPJ,SAOI,aAAA,iBAAA,cAAA,iBAPJ,SAOI,aAAA,eAAA,cAAA,eAPJ,SAOI,YAAA,YAAA,eAAA,YAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,gBAAA,eAAA,gBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,SAOI,eAAA,YAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,gBAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBHPR,yBGAI,aAOI,QAAA,iBAPJ,mBAOI,QAAA,uBAPJ,YAOI,QAAA,gBAPJ,WAOI,QAAA,eAPJ,YAOI,QAAA,gBAPJ,gBAOI,QAAA,oBAPJ,iBAOI,QAAA,qBAPJ,WAOI,QAAA,eAPJ,kBAOI,QAAA,sBAPJ,WAOI,QAAA,eAPJ,cAOI,KAAA,EAAA,EAAA,eAPJ,aAOI,eAAA,cAPJ,gBAOI,eAAA,iBAPJ,qBAOI,eAAA,sBAPJ,wBAOI,eAAA,yBAPJ,gBAOI,UAAA,YAPJ,gBAOI,UAAA,YAPJ,kBAOI,YAAA,YAPJ,kBAOI,YAAA,YAPJ,cAOI,UAAA,eAPJ,gBAOI,UAAA,iBAPJ,sBAOI,UAAA,uBAPJ,0BAOI,gBAAA,qBAPJ,wBAOI,gBAAA,mBAPJ,2BAOI,gBAAA,iBAPJ,4BAOI,gBAAA,wBAPJ,2BAOI,gBAAA,uBAPJ,2BAOI,gBAAA,uBAPJ,sBAOI,YAAA,qBAPJ,oBAOI,YAAA,mBAPJ,uBAOI,YAAA,iBAPJ,yBAOI,YAAA,mBAPJ,wBAOI,YAAA,kBAPJ,wBAOI,cAAA,qBAPJ,sBAOI,cAAA,mBAPJ,yBAOI,cAAA,iBAPJ,0BAOI,cAAA,wBAPJ,yBAOI,cAAA,uBAPJ,0BAOI,cAAA,kBAPJ,oBAOI,WAAA,eAPJ,qBAOI,WAAA,qBAPJ,mBAOI,WAAA,mBAPJ,sBAOI,WAAA,iBAPJ,wBAOI,WAAA,mBAPJ,uBAOI,WAAA,kBAPJ,gBAOI,MAAA,aAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,eAOI,MAAA,YAPJ,QAOI,OAAA,YAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,gBAPJ,QAOI,OAAA,eAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,eAPJ,WAOI,OAAA,eAPJ,SAOI,YAAA,YAAA,aAAA,YAPJ,SAOI,YAAA,iBAAA,aAAA,iBAPJ,SAOI,YAAA,gBAAA,aAAA,gBAPJ,SAOI,YAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,iBAAA,aAAA,iBAPJ,SAOI,YAAA,eAAA,aAAA,eAPJ,YAOI,YAAA,eAAA,aAAA,eAPJ,SAOI,WAAA,YAAA,cAAA,YAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,gBAAA,cAAA,gBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,YAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,YAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,gBAPJ,SAOI,WAAA,eAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,eAPJ,YAOI,WAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,YAOI,YAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,YAOI,cAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,YAOI,aAAA,eAPJ,QAOI,QAAA,YAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,eAPJ,SAOI,aAAA,YAAA,cAAA,YAPJ,SAOI,aAAA,iBAAA,cAAA,iBAPJ,SAOI,aAAA,gBAAA,cAAA,gBAPJ,SAOI,aAAA,eAAA,cAAA,eAPJ,SAOI,aAAA,iBAAA,cAAA,iBAPJ,SAOI,aAAA,eAAA,cAAA,eAPJ,SAOI,YAAA,YAAA,eAAA,YAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,gBAAA,eAAA,gBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,SAOI,eAAA,YAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,gBAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBHPR,yBGAI,aAOI,QAAA,iBAPJ,mBAOI,QAAA,uBAPJ,YAOI,QAAA,gBAPJ,WAOI,QAAA,eAPJ,YAOI,QAAA,gBAPJ,gBAOI,QAAA,oBAPJ,iBAOI,QAAA,qBAPJ,WAOI,QAAA,eAPJ,kBAOI,QAAA,sBAPJ,WAOI,QAAA,eAPJ,cAOI,KAAA,EAAA,EAAA,eAPJ,aAOI,eAAA,cAPJ,gBAOI,eAAA,iBAPJ,qBAOI,eAAA,sBAPJ,wBAOI,eAAA,yBAPJ,gBAOI,UAAA,YAPJ,gBAOI,UAAA,YAPJ,kBAOI,YAAA,YAPJ,kBAOI,YAAA,YAPJ,cAOI,UAAA,eAPJ,gBAOI,UAAA,iBAPJ,sBAOI,UAAA,uBAPJ,0BAOI,gBAAA,qBAPJ,wBAOI,gBAAA,mBAPJ,2BAOI,gBAAA,iBAPJ,4BAOI,gBAAA,wBAPJ,2BAOI,gBAAA,uBAPJ,2BAOI,gBAAA,uBAPJ,sBAOI,YAAA,qBAPJ,oBAOI,YAAA,mBAPJ,uBAOI,YAAA,iBAPJ,yBAOI,YAAA,mBAPJ,wBAOI,YAAA,kBAPJ,wBAOI,cAAA,qBAPJ,sBAOI,cAAA,mBAPJ,yBAOI,cAAA,iBAPJ,0BAOI,cAAA,wBAPJ,yBAOI,cAAA,uBAPJ,0BAOI,cAAA,kBAPJ,oBAOI,WAAA,eAPJ,qBAOI,WAAA,qBAPJ,mBAOI,WAAA,mBAPJ,sBAOI,WAAA,iBAPJ,wBAOI,WAAA,mBAPJ,uBAOI,WAAA,kBAPJ,gBAOI,MAAA,aAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,eAOI,MAAA,YAPJ,QAOI,OAAA,YAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,gBAPJ,QAOI,OAAA,eAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,eAPJ,WAOI,OAAA,eAPJ,SAOI,YAAA,YAAA,aAAA,YAPJ,SAOI,YAAA,iBAAA,aAAA,iBAPJ,SAOI,YAAA,gBAAA,aAAA,gBAPJ,SAOI,YAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,iBAAA,aAAA,iBAPJ,SAOI,YAAA,eAAA,aAAA,eAPJ,YAOI,YAAA,eAAA,aAAA,eAPJ,SAOI,WAAA,YAAA,cAAA,YAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,gBAAA,cAAA,gBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,YAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,YAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,gBAPJ,SAOI,WAAA,eAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,eAPJ,YAOI,WAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,YAOI,YAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,YAOI,cAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,YAOI,aAAA,eAPJ,QAOI,QAAA,YAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,eAPJ,SAOI,aAAA,YAAA,cAAA,YAPJ,SAOI,aAAA,iBAAA,cAAA,iBAPJ,SAOI,aAAA,gBAAA,cAAA,gBAPJ,SAOI,aAAA,eAAA,cAAA,eAPJ,SAOI,aAAA,iBAAA,cAAA,iBAPJ,SAOI,aAAA,eAAA,cAAA,eAPJ,SAOI,YAAA,YAAA,eAAA,YAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,gBAAA,eAAA,gBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,SAOI,eAAA,YAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,gBAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBHPR,0BGAI,aAOI,QAAA,iBAPJ,mBAOI,QAAA,uBAPJ,YAOI,QAAA,gBAPJ,WAOI,QAAA,eAPJ,YAOI,QAAA,gBAPJ,gBAOI,QAAA,oBAPJ,iBAOI,QAAA,qBAPJ,WAOI,QAAA,eAPJ,kBAOI,QAAA,sBAPJ,WAOI,QAAA,eAPJ,cAOI,KAAA,EAAA,EAAA,eAPJ,aAOI,eAAA,cAPJ,gBAOI,eAAA,iBAPJ,qBAOI,eAAA,sBAPJ,wBAOI,eAAA,yBAPJ,gBAOI,UAAA,YAPJ,gBAOI,UAAA,YAPJ,kBAOI,YAAA,YAPJ,kBAOI,YAAA,YAPJ,cAOI,UAAA,eAPJ,gBAOI,UAAA,iBAPJ,sBAOI,UAAA,uBAPJ,0BAOI,gBAAA,qBAPJ,wBAOI,gBAAA,mBAPJ,2BAOI,gBAAA,iBAPJ,4BAOI,gBAAA,wBAPJ,2BAOI,gBAAA,uBAPJ,2BAOI,gBAAA,uBAPJ,sBAOI,YAAA,qBAPJ,oBAOI,YAAA,mBAPJ,uBAOI,YAAA,iBAPJ,yBAOI,YAAA,mBAPJ,wBAOI,YAAA,kBAPJ,wBAOI,cAAA,qBAPJ,sBAOI,cAAA,mBAPJ,yBAOI,cAAA,iBAPJ,0BAOI,cAAA,wBAPJ,yBAOI,cAAA,uBAPJ,0BAOI,cAAA,kBAPJ,oBAOI,WAAA,eAPJ,qBAOI,WAAA,qBAPJ,mBAOI,WAAA,mBAPJ,sBAOI,WAAA,iBAPJ,wBAOI,WAAA,mBAPJ,uBAOI,WAAA,kBAPJ,gBAOI,MAAA,aAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,YAOI,MAAA,YAPJ,eAOI,MAAA,YAPJ,QAOI,OAAA,YAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,gBAPJ,QAOI,OAAA,eAPJ,QAOI,OAAA,iBAPJ,QAOI,OAAA,eAPJ,WAOI,OAAA,eAPJ,SAOI,YAAA,YAAA,aAAA,YAPJ,SAOI,YAAA,iBAAA,aAAA,iBAPJ,SAOI,YAAA,gBAAA,aAAA,gBAPJ,SAOI,YAAA,eAAA,aAAA,eAPJ,SAOI,YAAA,iBAAA,aAAA,iBAPJ,SAOI,YAAA,eAAA,aAAA,eAPJ,YAOI,YAAA,eAAA,aAAA,eAPJ,SAOI,WAAA,YAAA,cAAA,YAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,gBAAA,cAAA,gBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,iBAAA,cAAA,iBAPJ,SAOI,WAAA,eAAA,cAAA,eAPJ,YAOI,WAAA,eAAA,cAAA,eAPJ,SAOI,WAAA,YAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,gBAPJ,SAOI,WAAA,eAPJ,SAOI,WAAA,iBAPJ,SAOI,WAAA,eAPJ,YAOI,WAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,YAOI,YAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,eAPJ,YAOI,cAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,YAOI,aAAA,eAPJ,QAOI,QAAA,YAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,gBAPJ,QAOI,QAAA,eAPJ,QAOI,QAAA,iBAPJ,QAOI,QAAA,eAPJ,SAOI,aAAA,YAAA,cAAA,YAPJ,SAOI,aAAA,iBAAA,cAAA,iBAPJ,SAOI,aAAA,gBAAA,cAAA,gBAPJ,SAOI,aAAA,eAAA,cAAA,eAPJ,SAOI,aAAA,iBAAA,cAAA,iBAPJ,SAOI,aAAA,eAAA,cAAA,eAPJ,SAOI,YAAA,YAAA,eAAA,YAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,gBAAA,eAAA,gBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,iBAAA,eAAA,iBAPJ,SAOI,YAAA,eAAA,eAAA,eAPJ,SAOI,YAAA,YAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,gBAPJ,SAOI,YAAA,eAPJ,SAOI,YAAA,iBAPJ,SAOI,YAAA,eAPJ,SAOI,aAAA,YAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,gBAPJ,SAOI,aAAA,eAPJ,SAOI,aAAA,iBAPJ,SAOI,aAAA,eAPJ,SAOI,eAAA,YAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,gBAPJ,SAOI,eAAA,eAPJ,SAOI,eAAA,iBAPJ,SAOI,eAAA,eAPJ,SAOI,cAAA,YAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBAPJ,SAOI,cAAA,eAPJ,SAOI,cAAA,iBAPJ,SAOI,cAAA,gBHPR,0BGAI,cAOI,QAAA,iBAPJ,oBAOI,QAAA,uBAPJ,aAOI,QAAA,gBAPJ,YAOI,QAAA,eAPJ,aAOI,QAAA,gBAPJ,iBAOI,QAAA,oBAPJ,kBAOI,QAAA,qBAPJ,YAOI,QAAA,eAPJ,mBAOI,QAAA,sBAPJ,YAOI,QAAA,eAPJ,eAOI,KAAA,EAAA,EAAA,eAPJ,cAOI,eAAA,cAPJ,iBAOI,eAAA,iBAPJ,sBAOI,eAAA,sBAPJ,yBAOI,eAAA,yBAPJ,iBAOI,UAAA,YAPJ,iBAOI,UAAA,YAPJ,mBAOI,YAAA,YAPJ,mBAOI,YAAA,YAPJ,eAOI,UAAA,eAPJ,iBAOI,UAAA,iBAPJ,uBAOI,UAAA,uBAPJ,2BAOI,gBAAA,qBAPJ,yBAOI,gBAAA,mBAPJ,4BAOI,gBAAA,iBAPJ,6BAOI,gBAAA,wBAPJ,4BAOI,gBAAA,uBAPJ,4BAOI,gBAAA,uBAPJ,uBAOI,YAAA,qBAPJ,qBAOI,YAAA,mBAPJ,wBAOI,YAAA,iBAPJ,0BAOI,YAAA,mBAPJ,yBAOI,YAAA,kBAPJ,yBAOI,cAAA,qBAPJ,uBAOI,cAAA,mBAPJ,0BAOI,cAAA,iBAPJ,2BAOI,cAAA,wBAPJ,0BAOI,cAAA,uBAPJ,2BAOI,cAAA,kBAPJ,qBAOI,WAAA,eAPJ,sBAOI,WAAA,qBAPJ,oBAOI,WAAA,mBAPJ,uBAOI,WAAA,iBAPJ,yBAOI,WAAA,mBAPJ,wBAOI,WAAA,kBAPJ,iBAOI,MAAA,aAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,aAOI,MAAA,YAPJ,gBAOI,MAAA,YAPJ,SAOI,OAAA,YAPJ,SAOI,OAAA,iBAPJ,SAOI,OAAA,gBAPJ,SAOI,OAAA,eAPJ,SAOI,OAAA,iBAPJ,SAOI,OAAA,eAPJ,YAOI,OAAA,eAPJ,UAOI,YAAA,YAAA,aAAA,YAPJ,UAOI,YAAA,iBAAA,aAAA,iBAPJ,UAOI,YAAA,gBAAA,aAAA,gBAPJ,UAOI,YAAA,eAAA,aAAA,eAPJ,UAOI,YAAA,iBAAA,aAAA,iBAPJ,UAOI,YAAA,eAAA,aAAA,eAPJ,aAOI,YAAA,eAAA,aAAA,eAPJ,UAOI,WAAA,YAAA,cAAA,YAPJ,UAOI,WAAA,iBAAA,cAAA,iBAPJ,UAOI,WAAA,gBAAA,cAAA,gBAPJ,UAOI,WAAA,eAAA,cAAA,eAPJ,UAOI,WAAA,iBAAA,cAAA,iBAPJ,UAOI,WAAA,eAAA,cAAA,eAPJ,aAOI,WAAA,eAAA,cAAA,eAPJ,UAOI,WAAA,YAPJ,UAOI,WAAA,iBAPJ,UAOI,WAAA,gBAPJ,UAOI,WAAA,eAPJ,UAOI,WAAA,iBAPJ,UAOI,WAAA,eAPJ,aAOI,WAAA,eAPJ,UAOI,YAAA,YAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,gBAPJ,UAOI,YAAA,eAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,eAPJ,aAOI,YAAA,eAPJ,UAOI,cAAA,YAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,gBAPJ,UAOI,cAAA,eAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,eAPJ,aAOI,cAAA,eAPJ,UAOI,aAAA,YAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,gBAPJ,UAOI,aAAA,eAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,eAPJ,aAOI,aAAA,eAPJ,SAOI,QAAA,YAPJ,SAOI,QAAA,iBAPJ,SAOI,QAAA,gBAPJ,SAOI,QAAA,eAPJ,SAOI,QAAA,iBAPJ,SAOI,QAAA,eAPJ,UAOI,aAAA,YAAA,cAAA,YAPJ,UAOI,aAAA,iBAAA,cAAA,iBAPJ,UAOI,aAAA,gBAAA,cAAA,gBAPJ,UAOI,aAAA,eAAA,cAAA,eAPJ,UAOI,aAAA,iBAAA,cAAA,iBAPJ,UAOI,aAAA,eAAA,cAAA,eAPJ,UAOI,YAAA,YAAA,eAAA,YAPJ,UAOI,YAAA,iBAAA,eAAA,iBAPJ,UAOI,YAAA,gBAAA,eAAA,gBAPJ,UAOI,YAAA,eAAA,eAAA,eAPJ,UAOI,YAAA,iBAAA,eAAA,iBAPJ,UAOI,YAAA,eAAA,eAAA,eAPJ,UAOI,YAAA,YAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,gBAPJ,UAOI,YAAA,eAPJ,UAOI,YAAA,iBAPJ,UAOI,YAAA,eAPJ,UAOI,aAAA,YAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,gBAPJ,UAOI,aAAA,eAPJ,UAOI,aAAA,iBAPJ,UAOI,aAAA,eAPJ,UAOI,eAAA,YAPJ,UAOI,eAAA,iBAPJ,UAOI,eAAA,gBAPJ,UAOI,eAAA,eAPJ,UAOI,eAAA,iBAPJ,UAOI,eAAA,eAPJ,UAOI,cAAA,YAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,gBAPJ,UAOI,cAAA,eAPJ,UAOI,cAAA,iBAPJ,UAOI,cAAA,gBChCZ,aDyBQ,gBAOI,QAAA,iBAPJ,sBAOI,QAAA,uBAPJ,eAOI,QAAA,gBAPJ,cAOI,QAAA,eAPJ,eAOI,QAAA,gBAPJ,mBAOI,QAAA,oBAPJ,oBAOI,QAAA,qBAPJ,cAOI,QAAA,eAPJ,qBAOI,QAAA,sBAPJ,cAOI,QAAA","sourcesContent":["/*!\n * Bootstrap Grid v5.1.0 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n\n$include-column-box-sizing: true !default;\n\n@import \"functions\";\n@import \"variables\";\n\n@import \"mixins/lists\";\n@import \"mixins/breakpoints\";\n@import \"mixins/container\";\n@import \"mixins/grid\";\n@import \"mixins/utilities\";\n\n@import \"vendor/rfs\";\n\n@import \"containers\";\n@import \"grid\";\n\n@import \"utilities\";\n// Only use the utilities we need\n// stylelint-disable-next-line scss/dollar-variable-default\n$utilities: map-get-multiple(\n $utilities,\n (\n \"display\",\n \"order\",\n \"flex\",\n \"flex-direction\",\n \"flex-grow\",\n \"flex-shrink\",\n \"flex-wrap\",\n \"justify-content\",\n \"align-items\",\n \"align-content\",\n \"align-self\",\n \"margin\",\n \"margin-x\",\n \"margin-y\",\n \"margin-top\",\n \"margin-end\",\n \"margin-bottom\",\n \"margin-start\",\n \"negative-margin\",\n \"negative-margin-x\",\n \"negative-margin-y\",\n \"negative-margin-top\",\n \"negative-margin-end\",\n \"negative-margin-bottom\",\n \"negative-margin-start\",\n \"padding\",\n \"padding-x\",\n \"padding-y\",\n \"padding-top\",\n \"padding-end\",\n \"padding-bottom\",\n \"padding-start\",\n )\n);\n\n@import \"utilities/api\";\n","// Container widths\n//\n// Set the container width, and override it for fixed navbars in media queries.\n\n@if $enable-grid-classes {\n // Single container class with breakpoint max-widths\n .container,\n // 100% wide container at all breakpoints\n .container-fluid {\n @include make-container();\n }\n\n // Responsive containers that are 100% wide until a breakpoint\n @each $breakpoint, $container-max-width in $container-max-widths {\n .container-#{$breakpoint} {\n @extend .container-fluid;\n }\n\n @include media-breakpoint-up($breakpoint, $grid-breakpoints) {\n %responsive-container-#{$breakpoint} {\n max-width: $container-max-width;\n }\n\n // Extend each breakpoint which is smaller or equal to the current breakpoint\n $extend-breakpoint: true;\n\n @each $name, $width in $grid-breakpoints {\n @if ($extend-breakpoint) {\n .container#{breakpoint-infix($name, $grid-breakpoints)} {\n @extend %responsive-container-#{$breakpoint};\n }\n\n // Once the current breakpoint is reached, stop extending\n @if ($breakpoint == $name) {\n $extend-breakpoint: false;\n }\n }\n }\n }\n }\n}\n","/*!\n * Bootstrap Grid v5.1.0 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n */\n.container,\n.container-fluid,\n.container-xxl,\n.container-xl,\n.container-lg,\n.container-md,\n.container-sm {\n width: 100%;\n padding-left: var(--bs-gutter-x, 0.75rem);\n padding-right: var(--bs-gutter-x, 0.75rem);\n margin-left: auto;\n margin-right: auto;\n}\n\n@media (min-width: 576px) {\n .container-sm, .container {\n max-width: 540px;\n }\n}\n@media (min-width: 768px) {\n .container-md, .container-sm, .container {\n max-width: 720px;\n }\n}\n@media (min-width: 992px) {\n .container-lg, .container-md, .container-sm, .container {\n max-width: 960px;\n }\n}\n@media (min-width: 1200px) {\n .container-xl, .container-lg, .container-md, .container-sm, .container {\n max-width: 1140px;\n }\n}\n@media (min-width: 1400px) {\n .container-xxl, .container-xl, .container-lg, .container-md, .container-sm, .container {\n max-width: 1320px;\n }\n}\n.row {\n --bs-gutter-x: 1.5rem;\n --bs-gutter-y: 0;\n display: flex;\n flex-wrap: wrap;\n margin-top: calc(var(--bs-gutter-y) * -1);\n margin-left: calc(var(--bs-gutter-x) * -.5);\n margin-right: calc(var(--bs-gutter-x) * -.5);\n}\n.row > * {\n box-sizing: border-box;\n flex-shrink: 0;\n width: 100%;\n max-width: 100%;\n padding-left: calc(var(--bs-gutter-x) * .5);\n padding-right: calc(var(--bs-gutter-x) * .5);\n margin-top: var(--bs-gutter-y);\n}\n\n.col {\n flex: 1 0 0%;\n}\n\n.row-cols-auto > * {\n flex: 0 0 auto;\n width: auto;\n}\n\n.row-cols-1 > * {\n flex: 0 0 auto;\n width: 100%;\n}\n\n.row-cols-2 > * {\n flex: 0 0 auto;\n width: 50%;\n}\n\n.row-cols-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n}\n\n.row-cols-4 > * {\n flex: 0 0 auto;\n width: 25%;\n}\n\n.row-cols-5 > * {\n flex: 0 0 auto;\n width: 20%;\n}\n\n.row-cols-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n}\n\n.col-auto {\n flex: 0 0 auto;\n width: auto;\n}\n\n.col-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n}\n\n.col-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n}\n\n.col-3 {\n flex: 0 0 auto;\n width: 25%;\n}\n\n.col-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n}\n\n.col-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n}\n\n.col-6 {\n flex: 0 0 auto;\n width: 50%;\n}\n\n.col-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n}\n\n.col-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n}\n\n.col-9 {\n flex: 0 0 auto;\n width: 75%;\n}\n\n.col-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n}\n\n.col-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n}\n\n.col-12 {\n flex: 0 0 auto;\n width: 100%;\n}\n\n.offset-1 {\n margin-right: 8.33333333%;\n}\n\n.offset-2 {\n margin-right: 16.66666667%;\n}\n\n.offset-3 {\n margin-right: 25%;\n}\n\n.offset-4 {\n margin-right: 33.33333333%;\n}\n\n.offset-5 {\n margin-right: 41.66666667%;\n}\n\n.offset-6 {\n margin-right: 50%;\n}\n\n.offset-7 {\n margin-right: 58.33333333%;\n}\n\n.offset-8 {\n margin-right: 66.66666667%;\n}\n\n.offset-9 {\n margin-right: 75%;\n}\n\n.offset-10 {\n margin-right: 83.33333333%;\n}\n\n.offset-11 {\n margin-right: 91.66666667%;\n}\n\n.g-0,\n.gx-0 {\n --bs-gutter-x: 0;\n}\n\n.g-0,\n.gy-0 {\n --bs-gutter-y: 0;\n}\n\n.g-1,\n.gx-1 {\n --bs-gutter-x: 0.25rem;\n}\n\n.g-1,\n.gy-1 {\n --bs-gutter-y: 0.25rem;\n}\n\n.g-2,\n.gx-2 {\n --bs-gutter-x: 0.5rem;\n}\n\n.g-2,\n.gy-2 {\n --bs-gutter-y: 0.5rem;\n}\n\n.g-3,\n.gx-3 {\n --bs-gutter-x: 1rem;\n}\n\n.g-3,\n.gy-3 {\n --bs-gutter-y: 1rem;\n}\n\n.g-4,\n.gx-4 {\n --bs-gutter-x: 1.5rem;\n}\n\n.g-4,\n.gy-4 {\n --bs-gutter-y: 1.5rem;\n}\n\n.g-5,\n.gx-5 {\n --bs-gutter-x: 3rem;\n}\n\n.g-5,\n.gy-5 {\n --bs-gutter-y: 3rem;\n}\n\n@media (min-width: 576px) {\n .col-sm {\n flex: 1 0 0%;\n }\n\n .row-cols-sm-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-sm-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-sm-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-sm-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-sm-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-sm-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-sm-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-sm-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-sm-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-sm-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-sm-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-sm-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-sm-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-sm-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-sm-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-sm-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-sm-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-sm-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-sm-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-sm-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-sm-0 {\n margin-right: 0;\n }\n\n .offset-sm-1 {\n margin-right: 8.33333333%;\n }\n\n .offset-sm-2 {\n margin-right: 16.66666667%;\n }\n\n .offset-sm-3 {\n margin-right: 25%;\n }\n\n .offset-sm-4 {\n margin-right: 33.33333333%;\n }\n\n .offset-sm-5 {\n margin-right: 41.66666667%;\n }\n\n .offset-sm-6 {\n margin-right: 50%;\n }\n\n .offset-sm-7 {\n margin-right: 58.33333333%;\n }\n\n .offset-sm-8 {\n margin-right: 66.66666667%;\n }\n\n .offset-sm-9 {\n margin-right: 75%;\n }\n\n .offset-sm-10 {\n margin-right: 83.33333333%;\n }\n\n .offset-sm-11 {\n margin-right: 91.66666667%;\n }\n\n .g-sm-0,\n.gx-sm-0 {\n --bs-gutter-x: 0;\n }\n\n .g-sm-0,\n.gy-sm-0 {\n --bs-gutter-y: 0;\n }\n\n .g-sm-1,\n.gx-sm-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-sm-1,\n.gy-sm-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-sm-2,\n.gx-sm-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-sm-2,\n.gy-sm-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-sm-3,\n.gx-sm-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-sm-3,\n.gy-sm-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-sm-4,\n.gx-sm-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-sm-4,\n.gy-sm-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-sm-5,\n.gx-sm-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-sm-5,\n.gy-sm-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 768px) {\n .col-md {\n flex: 1 0 0%;\n }\n\n .row-cols-md-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-md-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-md-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-md-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-md-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-md-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-md-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-md-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-md-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-md-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-md-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-md-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-md-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-md-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-md-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-md-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-md-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-md-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-md-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-md-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-md-0 {\n margin-right: 0;\n }\n\n .offset-md-1 {\n margin-right: 8.33333333%;\n }\n\n .offset-md-2 {\n margin-right: 16.66666667%;\n }\n\n .offset-md-3 {\n margin-right: 25%;\n }\n\n .offset-md-4 {\n margin-right: 33.33333333%;\n }\n\n .offset-md-5 {\n margin-right: 41.66666667%;\n }\n\n .offset-md-6 {\n margin-right: 50%;\n }\n\n .offset-md-7 {\n margin-right: 58.33333333%;\n }\n\n .offset-md-8 {\n margin-right: 66.66666667%;\n }\n\n .offset-md-9 {\n margin-right: 75%;\n }\n\n .offset-md-10 {\n margin-right: 83.33333333%;\n }\n\n .offset-md-11 {\n margin-right: 91.66666667%;\n }\n\n .g-md-0,\n.gx-md-0 {\n --bs-gutter-x: 0;\n }\n\n .g-md-0,\n.gy-md-0 {\n --bs-gutter-y: 0;\n }\n\n .g-md-1,\n.gx-md-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-md-1,\n.gy-md-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-md-2,\n.gx-md-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-md-2,\n.gy-md-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-md-3,\n.gx-md-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-md-3,\n.gy-md-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-md-4,\n.gx-md-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-md-4,\n.gy-md-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-md-5,\n.gx-md-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-md-5,\n.gy-md-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 992px) {\n .col-lg {\n flex: 1 0 0%;\n }\n\n .row-cols-lg-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-lg-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-lg-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-lg-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-lg-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-lg-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-lg-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-lg-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-lg-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-lg-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-lg-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-lg-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-lg-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-lg-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-lg-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-lg-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-lg-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-lg-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-lg-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-lg-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-lg-0 {\n margin-right: 0;\n }\n\n .offset-lg-1 {\n margin-right: 8.33333333%;\n }\n\n .offset-lg-2 {\n margin-right: 16.66666667%;\n }\n\n .offset-lg-3 {\n margin-right: 25%;\n }\n\n .offset-lg-4 {\n margin-right: 33.33333333%;\n }\n\n .offset-lg-5 {\n margin-right: 41.66666667%;\n }\n\n .offset-lg-6 {\n margin-right: 50%;\n }\n\n .offset-lg-7 {\n margin-right: 58.33333333%;\n }\n\n .offset-lg-8 {\n margin-right: 66.66666667%;\n }\n\n .offset-lg-9 {\n margin-right: 75%;\n }\n\n .offset-lg-10 {\n margin-right: 83.33333333%;\n }\n\n .offset-lg-11 {\n margin-right: 91.66666667%;\n }\n\n .g-lg-0,\n.gx-lg-0 {\n --bs-gutter-x: 0;\n }\n\n .g-lg-0,\n.gy-lg-0 {\n --bs-gutter-y: 0;\n }\n\n .g-lg-1,\n.gx-lg-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-lg-1,\n.gy-lg-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-lg-2,\n.gx-lg-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-lg-2,\n.gy-lg-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-lg-3,\n.gx-lg-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-lg-3,\n.gy-lg-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-lg-4,\n.gx-lg-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-lg-4,\n.gy-lg-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-lg-5,\n.gx-lg-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-lg-5,\n.gy-lg-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 1200px) {\n .col-xl {\n flex: 1 0 0%;\n }\n\n .row-cols-xl-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-xl-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-xl-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-xl-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-xl-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-xl-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-xl-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-xl-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-xl-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-xl-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-xl-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-xl-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-xl-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-xl-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-xl-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-xl-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-xl-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-xl-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-xl-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-xl-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-xl-0 {\n margin-right: 0;\n }\n\n .offset-xl-1 {\n margin-right: 8.33333333%;\n }\n\n .offset-xl-2 {\n margin-right: 16.66666667%;\n }\n\n .offset-xl-3 {\n margin-right: 25%;\n }\n\n .offset-xl-4 {\n margin-right: 33.33333333%;\n }\n\n .offset-xl-5 {\n margin-right: 41.66666667%;\n }\n\n .offset-xl-6 {\n margin-right: 50%;\n }\n\n .offset-xl-7 {\n margin-right: 58.33333333%;\n }\n\n .offset-xl-8 {\n margin-right: 66.66666667%;\n }\n\n .offset-xl-9 {\n margin-right: 75%;\n }\n\n .offset-xl-10 {\n margin-right: 83.33333333%;\n }\n\n .offset-xl-11 {\n margin-right: 91.66666667%;\n }\n\n .g-xl-0,\n.gx-xl-0 {\n --bs-gutter-x: 0;\n }\n\n .g-xl-0,\n.gy-xl-0 {\n --bs-gutter-y: 0;\n }\n\n .g-xl-1,\n.gx-xl-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-xl-1,\n.gy-xl-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-xl-2,\n.gx-xl-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-xl-2,\n.gy-xl-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-xl-3,\n.gx-xl-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-xl-3,\n.gy-xl-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-xl-4,\n.gx-xl-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-xl-4,\n.gy-xl-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-xl-5,\n.gx-xl-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-xl-5,\n.gy-xl-5 {\n --bs-gutter-y: 3rem;\n }\n}\n@media (min-width: 1400px) {\n .col-xxl {\n flex: 1 0 0%;\n }\n\n .row-cols-xxl-auto > * {\n flex: 0 0 auto;\n width: auto;\n }\n\n .row-cols-xxl-1 > * {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .row-cols-xxl-2 > * {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .row-cols-xxl-3 > * {\n flex: 0 0 auto;\n width: 33.3333333333%;\n }\n\n .row-cols-xxl-4 > * {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .row-cols-xxl-5 > * {\n flex: 0 0 auto;\n width: 20%;\n }\n\n .row-cols-xxl-6 > * {\n flex: 0 0 auto;\n width: 16.6666666667%;\n }\n\n .col-xxl-auto {\n flex: 0 0 auto;\n width: auto;\n }\n\n .col-xxl-1 {\n flex: 0 0 auto;\n width: 8.33333333%;\n }\n\n .col-xxl-2 {\n flex: 0 0 auto;\n width: 16.66666667%;\n }\n\n .col-xxl-3 {\n flex: 0 0 auto;\n width: 25%;\n }\n\n .col-xxl-4 {\n flex: 0 0 auto;\n width: 33.33333333%;\n }\n\n .col-xxl-5 {\n flex: 0 0 auto;\n width: 41.66666667%;\n }\n\n .col-xxl-6 {\n flex: 0 0 auto;\n width: 50%;\n }\n\n .col-xxl-7 {\n flex: 0 0 auto;\n width: 58.33333333%;\n }\n\n .col-xxl-8 {\n flex: 0 0 auto;\n width: 66.66666667%;\n }\n\n .col-xxl-9 {\n flex: 0 0 auto;\n width: 75%;\n }\n\n .col-xxl-10 {\n flex: 0 0 auto;\n width: 83.33333333%;\n }\n\n .col-xxl-11 {\n flex: 0 0 auto;\n width: 91.66666667%;\n }\n\n .col-xxl-12 {\n flex: 0 0 auto;\n width: 100%;\n }\n\n .offset-xxl-0 {\n margin-right: 0;\n }\n\n .offset-xxl-1 {\n margin-right: 8.33333333%;\n }\n\n .offset-xxl-2 {\n margin-right: 16.66666667%;\n }\n\n .offset-xxl-3 {\n margin-right: 25%;\n }\n\n .offset-xxl-4 {\n margin-right: 33.33333333%;\n }\n\n .offset-xxl-5 {\n margin-right: 41.66666667%;\n }\n\n .offset-xxl-6 {\n margin-right: 50%;\n }\n\n .offset-xxl-7 {\n margin-right: 58.33333333%;\n }\n\n .offset-xxl-8 {\n margin-right: 66.66666667%;\n }\n\n .offset-xxl-9 {\n margin-right: 75%;\n }\n\n .offset-xxl-10 {\n margin-right: 83.33333333%;\n }\n\n .offset-xxl-11 {\n margin-right: 91.66666667%;\n }\n\n .g-xxl-0,\n.gx-xxl-0 {\n --bs-gutter-x: 0;\n }\n\n .g-xxl-0,\n.gy-xxl-0 {\n --bs-gutter-y: 0;\n }\n\n .g-xxl-1,\n.gx-xxl-1 {\n --bs-gutter-x: 0.25rem;\n }\n\n .g-xxl-1,\n.gy-xxl-1 {\n --bs-gutter-y: 0.25rem;\n }\n\n .g-xxl-2,\n.gx-xxl-2 {\n --bs-gutter-x: 0.5rem;\n }\n\n .g-xxl-2,\n.gy-xxl-2 {\n --bs-gutter-y: 0.5rem;\n }\n\n .g-xxl-3,\n.gx-xxl-3 {\n --bs-gutter-x: 1rem;\n }\n\n .g-xxl-3,\n.gy-xxl-3 {\n --bs-gutter-y: 1rem;\n }\n\n .g-xxl-4,\n.gx-xxl-4 {\n --bs-gutter-x: 1.5rem;\n }\n\n .g-xxl-4,\n.gy-xxl-4 {\n --bs-gutter-y: 1.5rem;\n }\n\n .g-xxl-5,\n.gx-xxl-5 {\n --bs-gutter-x: 3rem;\n }\n\n .g-xxl-5,\n.gy-xxl-5 {\n --bs-gutter-y: 3rem;\n }\n}\n.d-inline {\n display: inline !important;\n}\n\n.d-inline-block {\n display: inline-block !important;\n}\n\n.d-block {\n display: block !important;\n}\n\n.d-grid {\n display: grid !important;\n}\n\n.d-table {\n display: table !important;\n}\n\n.d-table-row {\n display: table-row !important;\n}\n\n.d-table-cell {\n display: table-cell !important;\n}\n\n.d-flex {\n display: flex !important;\n}\n\n.d-inline-flex {\n display: inline-flex !important;\n}\n\n.d-none {\n display: none !important;\n}\n\n.flex-fill {\n flex: 1 1 auto !important;\n}\n\n.flex-row {\n flex-direction: row !important;\n}\n\n.flex-column {\n flex-direction: column !important;\n}\n\n.flex-row-reverse {\n flex-direction: row-reverse !important;\n}\n\n.flex-column-reverse {\n flex-direction: column-reverse !important;\n}\n\n.flex-grow-0 {\n flex-grow: 0 !important;\n}\n\n.flex-grow-1 {\n flex-grow: 1 !important;\n}\n\n.flex-shrink-0 {\n flex-shrink: 0 !important;\n}\n\n.flex-shrink-1 {\n flex-shrink: 1 !important;\n}\n\n.flex-wrap {\n flex-wrap: wrap !important;\n}\n\n.flex-nowrap {\n flex-wrap: nowrap !important;\n}\n\n.flex-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n}\n\n.justify-content-start {\n justify-content: flex-start !important;\n}\n\n.justify-content-end {\n justify-content: flex-end !important;\n}\n\n.justify-content-center {\n justify-content: center !important;\n}\n\n.justify-content-between {\n justify-content: space-between !important;\n}\n\n.justify-content-around {\n justify-content: space-around !important;\n}\n\n.justify-content-evenly {\n justify-content: space-evenly !important;\n}\n\n.align-items-start {\n align-items: flex-start !important;\n}\n\n.align-items-end {\n align-items: flex-end !important;\n}\n\n.align-items-center {\n align-items: center !important;\n}\n\n.align-items-baseline {\n align-items: baseline !important;\n}\n\n.align-items-stretch {\n align-items: stretch !important;\n}\n\n.align-content-start {\n align-content: flex-start !important;\n}\n\n.align-content-end {\n align-content: flex-end !important;\n}\n\n.align-content-center {\n align-content: center !important;\n}\n\n.align-content-between {\n align-content: space-between !important;\n}\n\n.align-content-around {\n align-content: space-around !important;\n}\n\n.align-content-stretch {\n align-content: stretch !important;\n}\n\n.align-self-auto {\n align-self: auto !important;\n}\n\n.align-self-start {\n align-self: flex-start !important;\n}\n\n.align-self-end {\n align-self: flex-end !important;\n}\n\n.align-self-center {\n align-self: center !important;\n}\n\n.align-self-baseline {\n align-self: baseline !important;\n}\n\n.align-self-stretch {\n align-self: stretch !important;\n}\n\n.order-first {\n order: -1 !important;\n}\n\n.order-0 {\n order: 0 !important;\n}\n\n.order-1 {\n order: 1 !important;\n}\n\n.order-2 {\n order: 2 !important;\n}\n\n.order-3 {\n order: 3 !important;\n}\n\n.order-4 {\n order: 4 !important;\n}\n\n.order-5 {\n order: 5 !important;\n}\n\n.order-last {\n order: 6 !important;\n}\n\n.m-0 {\n margin: 0 !important;\n}\n\n.m-1 {\n margin: 0.25rem !important;\n}\n\n.m-2 {\n margin: 0.5rem !important;\n}\n\n.m-3 {\n margin: 1rem !important;\n}\n\n.m-4 {\n margin: 1.5rem !important;\n}\n\n.m-5 {\n margin: 3rem !important;\n}\n\n.m-auto {\n margin: auto !important;\n}\n\n.mx-0 {\n margin-left: 0 !important;\n margin-right: 0 !important;\n}\n\n.mx-1 {\n margin-left: 0.25rem !important;\n margin-right: 0.25rem !important;\n}\n\n.mx-2 {\n margin-left: 0.5rem !important;\n margin-right: 0.5rem !important;\n}\n\n.mx-3 {\n margin-left: 1rem !important;\n margin-right: 1rem !important;\n}\n\n.mx-4 {\n margin-left: 1.5rem !important;\n margin-right: 1.5rem !important;\n}\n\n.mx-5 {\n margin-left: 3rem !important;\n margin-right: 3rem !important;\n}\n\n.mx-auto {\n margin-left: auto !important;\n margin-right: auto !important;\n}\n\n.my-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n}\n\n.my-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n}\n\n.my-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n}\n\n.my-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n}\n\n.my-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n}\n\n.my-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n}\n\n.my-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n}\n\n.mt-0 {\n margin-top: 0 !important;\n}\n\n.mt-1 {\n margin-top: 0.25rem !important;\n}\n\n.mt-2 {\n margin-top: 0.5rem !important;\n}\n\n.mt-3 {\n margin-top: 1rem !important;\n}\n\n.mt-4 {\n margin-top: 1.5rem !important;\n}\n\n.mt-5 {\n margin-top: 3rem !important;\n}\n\n.mt-auto {\n margin-top: auto !important;\n}\n\n.me-0 {\n margin-left: 0 !important;\n}\n\n.me-1 {\n margin-left: 0.25rem !important;\n}\n\n.me-2 {\n margin-left: 0.5rem !important;\n}\n\n.me-3 {\n margin-left: 1rem !important;\n}\n\n.me-4 {\n margin-left: 1.5rem !important;\n}\n\n.me-5 {\n margin-left: 3rem !important;\n}\n\n.me-auto {\n margin-left: auto !important;\n}\n\n.mb-0 {\n margin-bottom: 0 !important;\n}\n\n.mb-1 {\n margin-bottom: 0.25rem !important;\n}\n\n.mb-2 {\n margin-bottom: 0.5rem !important;\n}\n\n.mb-3 {\n margin-bottom: 1rem !important;\n}\n\n.mb-4 {\n margin-bottom: 1.5rem !important;\n}\n\n.mb-5 {\n margin-bottom: 3rem !important;\n}\n\n.mb-auto {\n margin-bottom: auto !important;\n}\n\n.ms-0 {\n margin-right: 0 !important;\n}\n\n.ms-1 {\n margin-right: 0.25rem !important;\n}\n\n.ms-2 {\n margin-right: 0.5rem !important;\n}\n\n.ms-3 {\n margin-right: 1rem !important;\n}\n\n.ms-4 {\n margin-right: 1.5rem !important;\n}\n\n.ms-5 {\n margin-right: 3rem !important;\n}\n\n.ms-auto {\n margin-right: auto !important;\n}\n\n.p-0 {\n padding: 0 !important;\n}\n\n.p-1 {\n padding: 0.25rem !important;\n}\n\n.p-2 {\n padding: 0.5rem !important;\n}\n\n.p-3 {\n padding: 1rem !important;\n}\n\n.p-4 {\n padding: 1.5rem !important;\n}\n\n.p-5 {\n padding: 3rem !important;\n}\n\n.px-0 {\n padding-left: 0 !important;\n padding-right: 0 !important;\n}\n\n.px-1 {\n padding-left: 0.25rem !important;\n padding-right: 0.25rem !important;\n}\n\n.px-2 {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important;\n}\n\n.px-3 {\n padding-left: 1rem !important;\n padding-right: 1rem !important;\n}\n\n.px-4 {\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n}\n\n.px-5 {\n padding-left: 3rem !important;\n padding-right: 3rem !important;\n}\n\n.py-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n}\n\n.py-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n}\n\n.py-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n}\n\n.py-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n}\n\n.py-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n}\n\n.py-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n}\n\n.pt-0 {\n padding-top: 0 !important;\n}\n\n.pt-1 {\n padding-top: 0.25rem !important;\n}\n\n.pt-2 {\n padding-top: 0.5rem !important;\n}\n\n.pt-3 {\n padding-top: 1rem !important;\n}\n\n.pt-4 {\n padding-top: 1.5rem !important;\n}\n\n.pt-5 {\n padding-top: 3rem !important;\n}\n\n.pe-0 {\n padding-left: 0 !important;\n}\n\n.pe-1 {\n padding-left: 0.25rem !important;\n}\n\n.pe-2 {\n padding-left: 0.5rem !important;\n}\n\n.pe-3 {\n padding-left: 1rem !important;\n}\n\n.pe-4 {\n padding-left: 1.5rem !important;\n}\n\n.pe-5 {\n padding-left: 3rem !important;\n}\n\n.pb-0 {\n padding-bottom: 0 !important;\n}\n\n.pb-1 {\n padding-bottom: 0.25rem !important;\n}\n\n.pb-2 {\n padding-bottom: 0.5rem !important;\n}\n\n.pb-3 {\n padding-bottom: 1rem !important;\n}\n\n.pb-4 {\n padding-bottom: 1.5rem !important;\n}\n\n.pb-5 {\n padding-bottom: 3rem !important;\n}\n\n.ps-0 {\n padding-right: 0 !important;\n}\n\n.ps-1 {\n padding-right: 0.25rem !important;\n}\n\n.ps-2 {\n padding-right: 0.5rem !important;\n}\n\n.ps-3 {\n padding-right: 1rem !important;\n}\n\n.ps-4 {\n padding-right: 1.5rem !important;\n}\n\n.ps-5 {\n padding-right: 3rem !important;\n}\n\n@media (min-width: 576px) {\n .d-sm-inline {\n display: inline !important;\n }\n\n .d-sm-inline-block {\n display: inline-block !important;\n }\n\n .d-sm-block {\n display: block !important;\n }\n\n .d-sm-grid {\n display: grid !important;\n }\n\n .d-sm-table {\n display: table !important;\n }\n\n .d-sm-table-row {\n display: table-row !important;\n }\n\n .d-sm-table-cell {\n display: table-cell !important;\n }\n\n .d-sm-flex {\n display: flex !important;\n }\n\n .d-sm-inline-flex {\n display: inline-flex !important;\n }\n\n .d-sm-none {\n display: none !important;\n }\n\n .flex-sm-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-sm-row {\n flex-direction: row !important;\n }\n\n .flex-sm-column {\n flex-direction: column !important;\n }\n\n .flex-sm-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-sm-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-sm-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-sm-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-sm-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-sm-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-sm-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-sm-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-sm-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-sm-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-sm-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-sm-center {\n justify-content: center !important;\n }\n\n .justify-content-sm-between {\n justify-content: space-between !important;\n }\n\n .justify-content-sm-around {\n justify-content: space-around !important;\n }\n\n .justify-content-sm-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-sm-start {\n align-items: flex-start !important;\n }\n\n .align-items-sm-end {\n align-items: flex-end !important;\n }\n\n .align-items-sm-center {\n align-items: center !important;\n }\n\n .align-items-sm-baseline {\n align-items: baseline !important;\n }\n\n .align-items-sm-stretch {\n align-items: stretch !important;\n }\n\n .align-content-sm-start {\n align-content: flex-start !important;\n }\n\n .align-content-sm-end {\n align-content: flex-end !important;\n }\n\n .align-content-sm-center {\n align-content: center !important;\n }\n\n .align-content-sm-between {\n align-content: space-between !important;\n }\n\n .align-content-sm-around {\n align-content: space-around !important;\n }\n\n .align-content-sm-stretch {\n align-content: stretch !important;\n }\n\n .align-self-sm-auto {\n align-self: auto !important;\n }\n\n .align-self-sm-start {\n align-self: flex-start !important;\n }\n\n .align-self-sm-end {\n align-self: flex-end !important;\n }\n\n .align-self-sm-center {\n align-self: center !important;\n }\n\n .align-self-sm-baseline {\n align-self: baseline !important;\n }\n\n .align-self-sm-stretch {\n align-self: stretch !important;\n }\n\n .order-sm-first {\n order: -1 !important;\n }\n\n .order-sm-0 {\n order: 0 !important;\n }\n\n .order-sm-1 {\n order: 1 !important;\n }\n\n .order-sm-2 {\n order: 2 !important;\n }\n\n .order-sm-3 {\n order: 3 !important;\n }\n\n .order-sm-4 {\n order: 4 !important;\n }\n\n .order-sm-5 {\n order: 5 !important;\n }\n\n .order-sm-last {\n order: 6 !important;\n }\n\n .m-sm-0 {\n margin: 0 !important;\n }\n\n .m-sm-1 {\n margin: 0.25rem !important;\n }\n\n .m-sm-2 {\n margin: 0.5rem !important;\n }\n\n .m-sm-3 {\n margin: 1rem !important;\n }\n\n .m-sm-4 {\n margin: 1.5rem !important;\n }\n\n .m-sm-5 {\n margin: 3rem !important;\n }\n\n .m-sm-auto {\n margin: auto !important;\n }\n\n .mx-sm-0 {\n margin-left: 0 !important;\n margin-right: 0 !important;\n }\n\n .mx-sm-1 {\n margin-left: 0.25rem !important;\n margin-right: 0.25rem !important;\n }\n\n .mx-sm-2 {\n margin-left: 0.5rem !important;\n margin-right: 0.5rem !important;\n }\n\n .mx-sm-3 {\n margin-left: 1rem !important;\n margin-right: 1rem !important;\n }\n\n .mx-sm-4 {\n margin-left: 1.5rem !important;\n margin-right: 1.5rem !important;\n }\n\n .mx-sm-5 {\n margin-left: 3rem !important;\n margin-right: 3rem !important;\n }\n\n .mx-sm-auto {\n margin-left: auto !important;\n margin-right: auto !important;\n }\n\n .my-sm-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-sm-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-sm-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-sm-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-sm-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-sm-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-sm-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-sm-0 {\n margin-top: 0 !important;\n }\n\n .mt-sm-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-sm-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-sm-3 {\n margin-top: 1rem !important;\n }\n\n .mt-sm-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-sm-5 {\n margin-top: 3rem !important;\n }\n\n .mt-sm-auto {\n margin-top: auto !important;\n }\n\n .me-sm-0 {\n margin-left: 0 !important;\n }\n\n .me-sm-1 {\n margin-left: 0.25rem !important;\n }\n\n .me-sm-2 {\n margin-left: 0.5rem !important;\n }\n\n .me-sm-3 {\n margin-left: 1rem !important;\n }\n\n .me-sm-4 {\n margin-left: 1.5rem !important;\n }\n\n .me-sm-5 {\n margin-left: 3rem !important;\n }\n\n .me-sm-auto {\n margin-left: auto !important;\n }\n\n .mb-sm-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-sm-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-sm-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-sm-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-sm-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-sm-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-sm-auto {\n margin-bottom: auto !important;\n }\n\n .ms-sm-0 {\n margin-right: 0 !important;\n }\n\n .ms-sm-1 {\n margin-right: 0.25rem !important;\n }\n\n .ms-sm-2 {\n margin-right: 0.5rem !important;\n }\n\n .ms-sm-3 {\n margin-right: 1rem !important;\n }\n\n .ms-sm-4 {\n margin-right: 1.5rem !important;\n }\n\n .ms-sm-5 {\n margin-right: 3rem !important;\n }\n\n .ms-sm-auto {\n margin-right: auto !important;\n }\n\n .p-sm-0 {\n padding: 0 !important;\n }\n\n .p-sm-1 {\n padding: 0.25rem !important;\n }\n\n .p-sm-2 {\n padding: 0.5rem !important;\n }\n\n .p-sm-3 {\n padding: 1rem !important;\n }\n\n .p-sm-4 {\n padding: 1.5rem !important;\n }\n\n .p-sm-5 {\n padding: 3rem !important;\n }\n\n .px-sm-0 {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n\n .px-sm-1 {\n padding-left: 0.25rem !important;\n padding-right: 0.25rem !important;\n }\n\n .px-sm-2 {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important;\n }\n\n .px-sm-3 {\n padding-left: 1rem !important;\n padding-right: 1rem !important;\n }\n\n .px-sm-4 {\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n }\n\n .px-sm-5 {\n padding-left: 3rem !important;\n padding-right: 3rem !important;\n }\n\n .py-sm-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-sm-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-sm-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-sm-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-sm-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-sm-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-sm-0 {\n padding-top: 0 !important;\n }\n\n .pt-sm-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-sm-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-sm-3 {\n padding-top: 1rem !important;\n }\n\n .pt-sm-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-sm-5 {\n padding-top: 3rem !important;\n }\n\n .pe-sm-0 {\n padding-left: 0 !important;\n }\n\n .pe-sm-1 {\n padding-left: 0.25rem !important;\n }\n\n .pe-sm-2 {\n padding-left: 0.5rem !important;\n }\n\n .pe-sm-3 {\n padding-left: 1rem !important;\n }\n\n .pe-sm-4 {\n padding-left: 1.5rem !important;\n }\n\n .pe-sm-5 {\n padding-left: 3rem !important;\n }\n\n .pb-sm-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-sm-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-sm-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-sm-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-sm-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-sm-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-sm-0 {\n padding-right: 0 !important;\n }\n\n .ps-sm-1 {\n padding-right: 0.25rem !important;\n }\n\n .ps-sm-2 {\n padding-right: 0.5rem !important;\n }\n\n .ps-sm-3 {\n padding-right: 1rem !important;\n }\n\n .ps-sm-4 {\n padding-right: 1.5rem !important;\n }\n\n .ps-sm-5 {\n padding-right: 3rem !important;\n }\n}\n@media (min-width: 768px) {\n .d-md-inline {\n display: inline !important;\n }\n\n .d-md-inline-block {\n display: inline-block !important;\n }\n\n .d-md-block {\n display: block !important;\n }\n\n .d-md-grid {\n display: grid !important;\n }\n\n .d-md-table {\n display: table !important;\n }\n\n .d-md-table-row {\n display: table-row !important;\n }\n\n .d-md-table-cell {\n display: table-cell !important;\n }\n\n .d-md-flex {\n display: flex !important;\n }\n\n .d-md-inline-flex {\n display: inline-flex !important;\n }\n\n .d-md-none {\n display: none !important;\n }\n\n .flex-md-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-md-row {\n flex-direction: row !important;\n }\n\n .flex-md-column {\n flex-direction: column !important;\n }\n\n .flex-md-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-md-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-md-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-md-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-md-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-md-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-md-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-md-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-md-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-md-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-md-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-md-center {\n justify-content: center !important;\n }\n\n .justify-content-md-between {\n justify-content: space-between !important;\n }\n\n .justify-content-md-around {\n justify-content: space-around !important;\n }\n\n .justify-content-md-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-md-start {\n align-items: flex-start !important;\n }\n\n .align-items-md-end {\n align-items: flex-end !important;\n }\n\n .align-items-md-center {\n align-items: center !important;\n }\n\n .align-items-md-baseline {\n align-items: baseline !important;\n }\n\n .align-items-md-stretch {\n align-items: stretch !important;\n }\n\n .align-content-md-start {\n align-content: flex-start !important;\n }\n\n .align-content-md-end {\n align-content: flex-end !important;\n }\n\n .align-content-md-center {\n align-content: center !important;\n }\n\n .align-content-md-between {\n align-content: space-between !important;\n }\n\n .align-content-md-around {\n align-content: space-around !important;\n }\n\n .align-content-md-stretch {\n align-content: stretch !important;\n }\n\n .align-self-md-auto {\n align-self: auto !important;\n }\n\n .align-self-md-start {\n align-self: flex-start !important;\n }\n\n .align-self-md-end {\n align-self: flex-end !important;\n }\n\n .align-self-md-center {\n align-self: center !important;\n }\n\n .align-self-md-baseline {\n align-self: baseline !important;\n }\n\n .align-self-md-stretch {\n align-self: stretch !important;\n }\n\n .order-md-first {\n order: -1 !important;\n }\n\n .order-md-0 {\n order: 0 !important;\n }\n\n .order-md-1 {\n order: 1 !important;\n }\n\n .order-md-2 {\n order: 2 !important;\n }\n\n .order-md-3 {\n order: 3 !important;\n }\n\n .order-md-4 {\n order: 4 !important;\n }\n\n .order-md-5 {\n order: 5 !important;\n }\n\n .order-md-last {\n order: 6 !important;\n }\n\n .m-md-0 {\n margin: 0 !important;\n }\n\n .m-md-1 {\n margin: 0.25rem !important;\n }\n\n .m-md-2 {\n margin: 0.5rem !important;\n }\n\n .m-md-3 {\n margin: 1rem !important;\n }\n\n .m-md-4 {\n margin: 1.5rem !important;\n }\n\n .m-md-5 {\n margin: 3rem !important;\n }\n\n .m-md-auto {\n margin: auto !important;\n }\n\n .mx-md-0 {\n margin-left: 0 !important;\n margin-right: 0 !important;\n }\n\n .mx-md-1 {\n margin-left: 0.25rem !important;\n margin-right: 0.25rem !important;\n }\n\n .mx-md-2 {\n margin-left: 0.5rem !important;\n margin-right: 0.5rem !important;\n }\n\n .mx-md-3 {\n margin-left: 1rem !important;\n margin-right: 1rem !important;\n }\n\n .mx-md-4 {\n margin-left: 1.5rem !important;\n margin-right: 1.5rem !important;\n }\n\n .mx-md-5 {\n margin-left: 3rem !important;\n margin-right: 3rem !important;\n }\n\n .mx-md-auto {\n margin-left: auto !important;\n margin-right: auto !important;\n }\n\n .my-md-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-md-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-md-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-md-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-md-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-md-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-md-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-md-0 {\n margin-top: 0 !important;\n }\n\n .mt-md-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-md-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-md-3 {\n margin-top: 1rem !important;\n }\n\n .mt-md-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-md-5 {\n margin-top: 3rem !important;\n }\n\n .mt-md-auto {\n margin-top: auto !important;\n }\n\n .me-md-0 {\n margin-left: 0 !important;\n }\n\n .me-md-1 {\n margin-left: 0.25rem !important;\n }\n\n .me-md-2 {\n margin-left: 0.5rem !important;\n }\n\n .me-md-3 {\n margin-left: 1rem !important;\n }\n\n .me-md-4 {\n margin-left: 1.5rem !important;\n }\n\n .me-md-5 {\n margin-left: 3rem !important;\n }\n\n .me-md-auto {\n margin-left: auto !important;\n }\n\n .mb-md-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-md-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-md-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-md-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-md-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-md-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-md-auto {\n margin-bottom: auto !important;\n }\n\n .ms-md-0 {\n margin-right: 0 !important;\n }\n\n .ms-md-1 {\n margin-right: 0.25rem !important;\n }\n\n .ms-md-2 {\n margin-right: 0.5rem !important;\n }\n\n .ms-md-3 {\n margin-right: 1rem !important;\n }\n\n .ms-md-4 {\n margin-right: 1.5rem !important;\n }\n\n .ms-md-5 {\n margin-right: 3rem !important;\n }\n\n .ms-md-auto {\n margin-right: auto !important;\n }\n\n .p-md-0 {\n padding: 0 !important;\n }\n\n .p-md-1 {\n padding: 0.25rem !important;\n }\n\n .p-md-2 {\n padding: 0.5rem !important;\n }\n\n .p-md-3 {\n padding: 1rem !important;\n }\n\n .p-md-4 {\n padding: 1.5rem !important;\n }\n\n .p-md-5 {\n padding: 3rem !important;\n }\n\n .px-md-0 {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n\n .px-md-1 {\n padding-left: 0.25rem !important;\n padding-right: 0.25rem !important;\n }\n\n .px-md-2 {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important;\n }\n\n .px-md-3 {\n padding-left: 1rem !important;\n padding-right: 1rem !important;\n }\n\n .px-md-4 {\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n }\n\n .px-md-5 {\n padding-left: 3rem !important;\n padding-right: 3rem !important;\n }\n\n .py-md-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-md-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-md-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-md-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-md-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-md-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-md-0 {\n padding-top: 0 !important;\n }\n\n .pt-md-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-md-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-md-3 {\n padding-top: 1rem !important;\n }\n\n .pt-md-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-md-5 {\n padding-top: 3rem !important;\n }\n\n .pe-md-0 {\n padding-left: 0 !important;\n }\n\n .pe-md-1 {\n padding-left: 0.25rem !important;\n }\n\n .pe-md-2 {\n padding-left: 0.5rem !important;\n }\n\n .pe-md-3 {\n padding-left: 1rem !important;\n }\n\n .pe-md-4 {\n padding-left: 1.5rem !important;\n }\n\n .pe-md-5 {\n padding-left: 3rem !important;\n }\n\n .pb-md-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-md-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-md-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-md-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-md-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-md-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-md-0 {\n padding-right: 0 !important;\n }\n\n .ps-md-1 {\n padding-right: 0.25rem !important;\n }\n\n .ps-md-2 {\n padding-right: 0.5rem !important;\n }\n\n .ps-md-3 {\n padding-right: 1rem !important;\n }\n\n .ps-md-4 {\n padding-right: 1.5rem !important;\n }\n\n .ps-md-5 {\n padding-right: 3rem !important;\n }\n}\n@media (min-width: 992px) {\n .d-lg-inline {\n display: inline !important;\n }\n\n .d-lg-inline-block {\n display: inline-block !important;\n }\n\n .d-lg-block {\n display: block !important;\n }\n\n .d-lg-grid {\n display: grid !important;\n }\n\n .d-lg-table {\n display: table !important;\n }\n\n .d-lg-table-row {\n display: table-row !important;\n }\n\n .d-lg-table-cell {\n display: table-cell !important;\n }\n\n .d-lg-flex {\n display: flex !important;\n }\n\n .d-lg-inline-flex {\n display: inline-flex !important;\n }\n\n .d-lg-none {\n display: none !important;\n }\n\n .flex-lg-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-lg-row {\n flex-direction: row !important;\n }\n\n .flex-lg-column {\n flex-direction: column !important;\n }\n\n .flex-lg-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-lg-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-lg-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-lg-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-lg-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-lg-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-lg-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-lg-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-lg-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-lg-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-lg-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-lg-center {\n justify-content: center !important;\n }\n\n .justify-content-lg-between {\n justify-content: space-between !important;\n }\n\n .justify-content-lg-around {\n justify-content: space-around !important;\n }\n\n .justify-content-lg-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-lg-start {\n align-items: flex-start !important;\n }\n\n .align-items-lg-end {\n align-items: flex-end !important;\n }\n\n .align-items-lg-center {\n align-items: center !important;\n }\n\n .align-items-lg-baseline {\n align-items: baseline !important;\n }\n\n .align-items-lg-stretch {\n align-items: stretch !important;\n }\n\n .align-content-lg-start {\n align-content: flex-start !important;\n }\n\n .align-content-lg-end {\n align-content: flex-end !important;\n }\n\n .align-content-lg-center {\n align-content: center !important;\n }\n\n .align-content-lg-between {\n align-content: space-between !important;\n }\n\n .align-content-lg-around {\n align-content: space-around !important;\n }\n\n .align-content-lg-stretch {\n align-content: stretch !important;\n }\n\n .align-self-lg-auto {\n align-self: auto !important;\n }\n\n .align-self-lg-start {\n align-self: flex-start !important;\n }\n\n .align-self-lg-end {\n align-self: flex-end !important;\n }\n\n .align-self-lg-center {\n align-self: center !important;\n }\n\n .align-self-lg-baseline {\n align-self: baseline !important;\n }\n\n .align-self-lg-stretch {\n align-self: stretch !important;\n }\n\n .order-lg-first {\n order: -1 !important;\n }\n\n .order-lg-0 {\n order: 0 !important;\n }\n\n .order-lg-1 {\n order: 1 !important;\n }\n\n .order-lg-2 {\n order: 2 !important;\n }\n\n .order-lg-3 {\n order: 3 !important;\n }\n\n .order-lg-4 {\n order: 4 !important;\n }\n\n .order-lg-5 {\n order: 5 !important;\n }\n\n .order-lg-last {\n order: 6 !important;\n }\n\n .m-lg-0 {\n margin: 0 !important;\n }\n\n .m-lg-1 {\n margin: 0.25rem !important;\n }\n\n .m-lg-2 {\n margin: 0.5rem !important;\n }\n\n .m-lg-3 {\n margin: 1rem !important;\n }\n\n .m-lg-4 {\n margin: 1.5rem !important;\n }\n\n .m-lg-5 {\n margin: 3rem !important;\n }\n\n .m-lg-auto {\n margin: auto !important;\n }\n\n .mx-lg-0 {\n margin-left: 0 !important;\n margin-right: 0 !important;\n }\n\n .mx-lg-1 {\n margin-left: 0.25rem !important;\n margin-right: 0.25rem !important;\n }\n\n .mx-lg-2 {\n margin-left: 0.5rem !important;\n margin-right: 0.5rem !important;\n }\n\n .mx-lg-3 {\n margin-left: 1rem !important;\n margin-right: 1rem !important;\n }\n\n .mx-lg-4 {\n margin-left: 1.5rem !important;\n margin-right: 1.5rem !important;\n }\n\n .mx-lg-5 {\n margin-left: 3rem !important;\n margin-right: 3rem !important;\n }\n\n .mx-lg-auto {\n margin-left: auto !important;\n margin-right: auto !important;\n }\n\n .my-lg-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-lg-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-lg-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-lg-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-lg-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-lg-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-lg-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-lg-0 {\n margin-top: 0 !important;\n }\n\n .mt-lg-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-lg-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-lg-3 {\n margin-top: 1rem !important;\n }\n\n .mt-lg-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-lg-5 {\n margin-top: 3rem !important;\n }\n\n .mt-lg-auto {\n margin-top: auto !important;\n }\n\n .me-lg-0 {\n margin-left: 0 !important;\n }\n\n .me-lg-1 {\n margin-left: 0.25rem !important;\n }\n\n .me-lg-2 {\n margin-left: 0.5rem !important;\n }\n\n .me-lg-3 {\n margin-left: 1rem !important;\n }\n\n .me-lg-4 {\n margin-left: 1.5rem !important;\n }\n\n .me-lg-5 {\n margin-left: 3rem !important;\n }\n\n .me-lg-auto {\n margin-left: auto !important;\n }\n\n .mb-lg-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-lg-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-lg-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-lg-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-lg-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-lg-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-lg-auto {\n margin-bottom: auto !important;\n }\n\n .ms-lg-0 {\n margin-right: 0 !important;\n }\n\n .ms-lg-1 {\n margin-right: 0.25rem !important;\n }\n\n .ms-lg-2 {\n margin-right: 0.5rem !important;\n }\n\n .ms-lg-3 {\n margin-right: 1rem !important;\n }\n\n .ms-lg-4 {\n margin-right: 1.5rem !important;\n }\n\n .ms-lg-5 {\n margin-right: 3rem !important;\n }\n\n .ms-lg-auto {\n margin-right: auto !important;\n }\n\n .p-lg-0 {\n padding: 0 !important;\n }\n\n .p-lg-1 {\n padding: 0.25rem !important;\n }\n\n .p-lg-2 {\n padding: 0.5rem !important;\n }\n\n .p-lg-3 {\n padding: 1rem !important;\n }\n\n .p-lg-4 {\n padding: 1.5rem !important;\n }\n\n .p-lg-5 {\n padding: 3rem !important;\n }\n\n .px-lg-0 {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n\n .px-lg-1 {\n padding-left: 0.25rem !important;\n padding-right: 0.25rem !important;\n }\n\n .px-lg-2 {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important;\n }\n\n .px-lg-3 {\n padding-left: 1rem !important;\n padding-right: 1rem !important;\n }\n\n .px-lg-4 {\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n }\n\n .px-lg-5 {\n padding-left: 3rem !important;\n padding-right: 3rem !important;\n }\n\n .py-lg-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-lg-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-lg-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-lg-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-lg-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-lg-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-lg-0 {\n padding-top: 0 !important;\n }\n\n .pt-lg-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-lg-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-lg-3 {\n padding-top: 1rem !important;\n }\n\n .pt-lg-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-lg-5 {\n padding-top: 3rem !important;\n }\n\n .pe-lg-0 {\n padding-left: 0 !important;\n }\n\n .pe-lg-1 {\n padding-left: 0.25rem !important;\n }\n\n .pe-lg-2 {\n padding-left: 0.5rem !important;\n }\n\n .pe-lg-3 {\n padding-left: 1rem !important;\n }\n\n .pe-lg-4 {\n padding-left: 1.5rem !important;\n }\n\n .pe-lg-5 {\n padding-left: 3rem !important;\n }\n\n .pb-lg-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-lg-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-lg-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-lg-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-lg-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-lg-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-lg-0 {\n padding-right: 0 !important;\n }\n\n .ps-lg-1 {\n padding-right: 0.25rem !important;\n }\n\n .ps-lg-2 {\n padding-right: 0.5rem !important;\n }\n\n .ps-lg-3 {\n padding-right: 1rem !important;\n }\n\n .ps-lg-4 {\n padding-right: 1.5rem !important;\n }\n\n .ps-lg-5 {\n padding-right: 3rem !important;\n }\n}\n@media (min-width: 1200px) {\n .d-xl-inline {\n display: inline !important;\n }\n\n .d-xl-inline-block {\n display: inline-block !important;\n }\n\n .d-xl-block {\n display: block !important;\n }\n\n .d-xl-grid {\n display: grid !important;\n }\n\n .d-xl-table {\n display: table !important;\n }\n\n .d-xl-table-row {\n display: table-row !important;\n }\n\n .d-xl-table-cell {\n display: table-cell !important;\n }\n\n .d-xl-flex {\n display: flex !important;\n }\n\n .d-xl-inline-flex {\n display: inline-flex !important;\n }\n\n .d-xl-none {\n display: none !important;\n }\n\n .flex-xl-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-xl-row {\n flex-direction: row !important;\n }\n\n .flex-xl-column {\n flex-direction: column !important;\n }\n\n .flex-xl-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-xl-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-xl-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-xl-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-xl-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-xl-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-xl-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-xl-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-xl-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-xl-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-xl-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-xl-center {\n justify-content: center !important;\n }\n\n .justify-content-xl-between {\n justify-content: space-between !important;\n }\n\n .justify-content-xl-around {\n justify-content: space-around !important;\n }\n\n .justify-content-xl-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-xl-start {\n align-items: flex-start !important;\n }\n\n .align-items-xl-end {\n align-items: flex-end !important;\n }\n\n .align-items-xl-center {\n align-items: center !important;\n }\n\n .align-items-xl-baseline {\n align-items: baseline !important;\n }\n\n .align-items-xl-stretch {\n align-items: stretch !important;\n }\n\n .align-content-xl-start {\n align-content: flex-start !important;\n }\n\n .align-content-xl-end {\n align-content: flex-end !important;\n }\n\n .align-content-xl-center {\n align-content: center !important;\n }\n\n .align-content-xl-between {\n align-content: space-between !important;\n }\n\n .align-content-xl-around {\n align-content: space-around !important;\n }\n\n .align-content-xl-stretch {\n align-content: stretch !important;\n }\n\n .align-self-xl-auto {\n align-self: auto !important;\n }\n\n .align-self-xl-start {\n align-self: flex-start !important;\n }\n\n .align-self-xl-end {\n align-self: flex-end !important;\n }\n\n .align-self-xl-center {\n align-self: center !important;\n }\n\n .align-self-xl-baseline {\n align-self: baseline !important;\n }\n\n .align-self-xl-stretch {\n align-self: stretch !important;\n }\n\n .order-xl-first {\n order: -1 !important;\n }\n\n .order-xl-0 {\n order: 0 !important;\n }\n\n .order-xl-1 {\n order: 1 !important;\n }\n\n .order-xl-2 {\n order: 2 !important;\n }\n\n .order-xl-3 {\n order: 3 !important;\n }\n\n .order-xl-4 {\n order: 4 !important;\n }\n\n .order-xl-5 {\n order: 5 !important;\n }\n\n .order-xl-last {\n order: 6 !important;\n }\n\n .m-xl-0 {\n margin: 0 !important;\n }\n\n .m-xl-1 {\n margin: 0.25rem !important;\n }\n\n .m-xl-2 {\n margin: 0.5rem !important;\n }\n\n .m-xl-3 {\n margin: 1rem !important;\n }\n\n .m-xl-4 {\n margin: 1.5rem !important;\n }\n\n .m-xl-5 {\n margin: 3rem !important;\n }\n\n .m-xl-auto {\n margin: auto !important;\n }\n\n .mx-xl-0 {\n margin-left: 0 !important;\n margin-right: 0 !important;\n }\n\n .mx-xl-1 {\n margin-left: 0.25rem !important;\n margin-right: 0.25rem !important;\n }\n\n .mx-xl-2 {\n margin-left: 0.5rem !important;\n margin-right: 0.5rem !important;\n }\n\n .mx-xl-3 {\n margin-left: 1rem !important;\n margin-right: 1rem !important;\n }\n\n .mx-xl-4 {\n margin-left: 1.5rem !important;\n margin-right: 1.5rem !important;\n }\n\n .mx-xl-5 {\n margin-left: 3rem !important;\n margin-right: 3rem !important;\n }\n\n .mx-xl-auto {\n margin-left: auto !important;\n margin-right: auto !important;\n }\n\n .my-xl-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-xl-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-xl-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-xl-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-xl-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-xl-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-xl-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-xl-0 {\n margin-top: 0 !important;\n }\n\n .mt-xl-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-xl-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-xl-3 {\n margin-top: 1rem !important;\n }\n\n .mt-xl-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-xl-5 {\n margin-top: 3rem !important;\n }\n\n .mt-xl-auto {\n margin-top: auto !important;\n }\n\n .me-xl-0 {\n margin-left: 0 !important;\n }\n\n .me-xl-1 {\n margin-left: 0.25rem !important;\n }\n\n .me-xl-2 {\n margin-left: 0.5rem !important;\n }\n\n .me-xl-3 {\n margin-left: 1rem !important;\n }\n\n .me-xl-4 {\n margin-left: 1.5rem !important;\n }\n\n .me-xl-5 {\n margin-left: 3rem !important;\n }\n\n .me-xl-auto {\n margin-left: auto !important;\n }\n\n .mb-xl-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-xl-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-xl-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-xl-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-xl-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-xl-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-xl-auto {\n margin-bottom: auto !important;\n }\n\n .ms-xl-0 {\n margin-right: 0 !important;\n }\n\n .ms-xl-1 {\n margin-right: 0.25rem !important;\n }\n\n .ms-xl-2 {\n margin-right: 0.5rem !important;\n }\n\n .ms-xl-3 {\n margin-right: 1rem !important;\n }\n\n .ms-xl-4 {\n margin-right: 1.5rem !important;\n }\n\n .ms-xl-5 {\n margin-right: 3rem !important;\n }\n\n .ms-xl-auto {\n margin-right: auto !important;\n }\n\n .p-xl-0 {\n padding: 0 !important;\n }\n\n .p-xl-1 {\n padding: 0.25rem !important;\n }\n\n .p-xl-2 {\n padding: 0.5rem !important;\n }\n\n .p-xl-3 {\n padding: 1rem !important;\n }\n\n .p-xl-4 {\n padding: 1.5rem !important;\n }\n\n .p-xl-5 {\n padding: 3rem !important;\n }\n\n .px-xl-0 {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n\n .px-xl-1 {\n padding-left: 0.25rem !important;\n padding-right: 0.25rem !important;\n }\n\n .px-xl-2 {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important;\n }\n\n .px-xl-3 {\n padding-left: 1rem !important;\n padding-right: 1rem !important;\n }\n\n .px-xl-4 {\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n }\n\n .px-xl-5 {\n padding-left: 3rem !important;\n padding-right: 3rem !important;\n }\n\n .py-xl-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-xl-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-xl-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-xl-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-xl-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-xl-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-xl-0 {\n padding-top: 0 !important;\n }\n\n .pt-xl-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-xl-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-xl-3 {\n padding-top: 1rem !important;\n }\n\n .pt-xl-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-xl-5 {\n padding-top: 3rem !important;\n }\n\n .pe-xl-0 {\n padding-left: 0 !important;\n }\n\n .pe-xl-1 {\n padding-left: 0.25rem !important;\n }\n\n .pe-xl-2 {\n padding-left: 0.5rem !important;\n }\n\n .pe-xl-3 {\n padding-left: 1rem !important;\n }\n\n .pe-xl-4 {\n padding-left: 1.5rem !important;\n }\n\n .pe-xl-5 {\n padding-left: 3rem !important;\n }\n\n .pb-xl-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-xl-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-xl-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-xl-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-xl-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-xl-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-xl-0 {\n padding-right: 0 !important;\n }\n\n .ps-xl-1 {\n padding-right: 0.25rem !important;\n }\n\n .ps-xl-2 {\n padding-right: 0.5rem !important;\n }\n\n .ps-xl-3 {\n padding-right: 1rem !important;\n }\n\n .ps-xl-4 {\n padding-right: 1.5rem !important;\n }\n\n .ps-xl-5 {\n padding-right: 3rem !important;\n }\n}\n@media (min-width: 1400px) {\n .d-xxl-inline {\n display: inline !important;\n }\n\n .d-xxl-inline-block {\n display: inline-block !important;\n }\n\n .d-xxl-block {\n display: block !important;\n }\n\n .d-xxl-grid {\n display: grid !important;\n }\n\n .d-xxl-table {\n display: table !important;\n }\n\n .d-xxl-table-row {\n display: table-row !important;\n }\n\n .d-xxl-table-cell {\n display: table-cell !important;\n }\n\n .d-xxl-flex {\n display: flex !important;\n }\n\n .d-xxl-inline-flex {\n display: inline-flex !important;\n }\n\n .d-xxl-none {\n display: none !important;\n }\n\n .flex-xxl-fill {\n flex: 1 1 auto !important;\n }\n\n .flex-xxl-row {\n flex-direction: row !important;\n }\n\n .flex-xxl-column {\n flex-direction: column !important;\n }\n\n .flex-xxl-row-reverse {\n flex-direction: row-reverse !important;\n }\n\n .flex-xxl-column-reverse {\n flex-direction: column-reverse !important;\n }\n\n .flex-xxl-grow-0 {\n flex-grow: 0 !important;\n }\n\n .flex-xxl-grow-1 {\n flex-grow: 1 !important;\n }\n\n .flex-xxl-shrink-0 {\n flex-shrink: 0 !important;\n }\n\n .flex-xxl-shrink-1 {\n flex-shrink: 1 !important;\n }\n\n .flex-xxl-wrap {\n flex-wrap: wrap !important;\n }\n\n .flex-xxl-nowrap {\n flex-wrap: nowrap !important;\n }\n\n .flex-xxl-wrap-reverse {\n flex-wrap: wrap-reverse !important;\n }\n\n .justify-content-xxl-start {\n justify-content: flex-start !important;\n }\n\n .justify-content-xxl-end {\n justify-content: flex-end !important;\n }\n\n .justify-content-xxl-center {\n justify-content: center !important;\n }\n\n .justify-content-xxl-between {\n justify-content: space-between !important;\n }\n\n .justify-content-xxl-around {\n justify-content: space-around !important;\n }\n\n .justify-content-xxl-evenly {\n justify-content: space-evenly !important;\n }\n\n .align-items-xxl-start {\n align-items: flex-start !important;\n }\n\n .align-items-xxl-end {\n align-items: flex-end !important;\n }\n\n .align-items-xxl-center {\n align-items: center !important;\n }\n\n .align-items-xxl-baseline {\n align-items: baseline !important;\n }\n\n .align-items-xxl-stretch {\n align-items: stretch !important;\n }\n\n .align-content-xxl-start {\n align-content: flex-start !important;\n }\n\n .align-content-xxl-end {\n align-content: flex-end !important;\n }\n\n .align-content-xxl-center {\n align-content: center !important;\n }\n\n .align-content-xxl-between {\n align-content: space-between !important;\n }\n\n .align-content-xxl-around {\n align-content: space-around !important;\n }\n\n .align-content-xxl-stretch {\n align-content: stretch !important;\n }\n\n .align-self-xxl-auto {\n align-self: auto !important;\n }\n\n .align-self-xxl-start {\n align-self: flex-start !important;\n }\n\n .align-self-xxl-end {\n align-self: flex-end !important;\n }\n\n .align-self-xxl-center {\n align-self: center !important;\n }\n\n .align-self-xxl-baseline {\n align-self: baseline !important;\n }\n\n .align-self-xxl-stretch {\n align-self: stretch !important;\n }\n\n .order-xxl-first {\n order: -1 !important;\n }\n\n .order-xxl-0 {\n order: 0 !important;\n }\n\n .order-xxl-1 {\n order: 1 !important;\n }\n\n .order-xxl-2 {\n order: 2 !important;\n }\n\n .order-xxl-3 {\n order: 3 !important;\n }\n\n .order-xxl-4 {\n order: 4 !important;\n }\n\n .order-xxl-5 {\n order: 5 !important;\n }\n\n .order-xxl-last {\n order: 6 !important;\n }\n\n .m-xxl-0 {\n margin: 0 !important;\n }\n\n .m-xxl-1 {\n margin: 0.25rem !important;\n }\n\n .m-xxl-2 {\n margin: 0.5rem !important;\n }\n\n .m-xxl-3 {\n margin: 1rem !important;\n }\n\n .m-xxl-4 {\n margin: 1.5rem !important;\n }\n\n .m-xxl-5 {\n margin: 3rem !important;\n }\n\n .m-xxl-auto {\n margin: auto !important;\n }\n\n .mx-xxl-0 {\n margin-left: 0 !important;\n margin-right: 0 !important;\n }\n\n .mx-xxl-1 {\n margin-left: 0.25rem !important;\n margin-right: 0.25rem !important;\n }\n\n .mx-xxl-2 {\n margin-left: 0.5rem !important;\n margin-right: 0.5rem !important;\n }\n\n .mx-xxl-3 {\n margin-left: 1rem !important;\n margin-right: 1rem !important;\n }\n\n .mx-xxl-4 {\n margin-left: 1.5rem !important;\n margin-right: 1.5rem !important;\n }\n\n .mx-xxl-5 {\n margin-left: 3rem !important;\n margin-right: 3rem !important;\n }\n\n .mx-xxl-auto {\n margin-left: auto !important;\n margin-right: auto !important;\n }\n\n .my-xxl-0 {\n margin-top: 0 !important;\n margin-bottom: 0 !important;\n }\n\n .my-xxl-1 {\n margin-top: 0.25rem !important;\n margin-bottom: 0.25rem !important;\n }\n\n .my-xxl-2 {\n margin-top: 0.5rem !important;\n margin-bottom: 0.5rem !important;\n }\n\n .my-xxl-3 {\n margin-top: 1rem !important;\n margin-bottom: 1rem !important;\n }\n\n .my-xxl-4 {\n margin-top: 1.5rem !important;\n margin-bottom: 1.5rem !important;\n }\n\n .my-xxl-5 {\n margin-top: 3rem !important;\n margin-bottom: 3rem !important;\n }\n\n .my-xxl-auto {\n margin-top: auto !important;\n margin-bottom: auto !important;\n }\n\n .mt-xxl-0 {\n margin-top: 0 !important;\n }\n\n .mt-xxl-1 {\n margin-top: 0.25rem !important;\n }\n\n .mt-xxl-2 {\n margin-top: 0.5rem !important;\n }\n\n .mt-xxl-3 {\n margin-top: 1rem !important;\n }\n\n .mt-xxl-4 {\n margin-top: 1.5rem !important;\n }\n\n .mt-xxl-5 {\n margin-top: 3rem !important;\n }\n\n .mt-xxl-auto {\n margin-top: auto !important;\n }\n\n .me-xxl-0 {\n margin-left: 0 !important;\n }\n\n .me-xxl-1 {\n margin-left: 0.25rem !important;\n }\n\n .me-xxl-2 {\n margin-left: 0.5rem !important;\n }\n\n .me-xxl-3 {\n margin-left: 1rem !important;\n }\n\n .me-xxl-4 {\n margin-left: 1.5rem !important;\n }\n\n .me-xxl-5 {\n margin-left: 3rem !important;\n }\n\n .me-xxl-auto {\n margin-left: auto !important;\n }\n\n .mb-xxl-0 {\n margin-bottom: 0 !important;\n }\n\n .mb-xxl-1 {\n margin-bottom: 0.25rem !important;\n }\n\n .mb-xxl-2 {\n margin-bottom: 0.5rem !important;\n }\n\n .mb-xxl-3 {\n margin-bottom: 1rem !important;\n }\n\n .mb-xxl-4 {\n margin-bottom: 1.5rem !important;\n }\n\n .mb-xxl-5 {\n margin-bottom: 3rem !important;\n }\n\n .mb-xxl-auto {\n margin-bottom: auto !important;\n }\n\n .ms-xxl-0 {\n margin-right: 0 !important;\n }\n\n .ms-xxl-1 {\n margin-right: 0.25rem !important;\n }\n\n .ms-xxl-2 {\n margin-right: 0.5rem !important;\n }\n\n .ms-xxl-3 {\n margin-right: 1rem !important;\n }\n\n .ms-xxl-4 {\n margin-right: 1.5rem !important;\n }\n\n .ms-xxl-5 {\n margin-right: 3rem !important;\n }\n\n .ms-xxl-auto {\n margin-right: auto !important;\n }\n\n .p-xxl-0 {\n padding: 0 !important;\n }\n\n .p-xxl-1 {\n padding: 0.25rem !important;\n }\n\n .p-xxl-2 {\n padding: 0.5rem !important;\n }\n\n .p-xxl-3 {\n padding: 1rem !important;\n }\n\n .p-xxl-4 {\n padding: 1.5rem !important;\n }\n\n .p-xxl-5 {\n padding: 3rem !important;\n }\n\n .px-xxl-0 {\n padding-left: 0 !important;\n padding-right: 0 !important;\n }\n\n .px-xxl-1 {\n padding-left: 0.25rem !important;\n padding-right: 0.25rem !important;\n }\n\n .px-xxl-2 {\n padding-left: 0.5rem !important;\n padding-right: 0.5rem !important;\n }\n\n .px-xxl-3 {\n padding-left: 1rem !important;\n padding-right: 1rem !important;\n }\n\n .px-xxl-4 {\n padding-left: 1.5rem !important;\n padding-right: 1.5rem !important;\n }\n\n .px-xxl-5 {\n padding-left: 3rem !important;\n padding-right: 3rem !important;\n }\n\n .py-xxl-0 {\n padding-top: 0 !important;\n padding-bottom: 0 !important;\n }\n\n .py-xxl-1 {\n padding-top: 0.25rem !important;\n padding-bottom: 0.25rem !important;\n }\n\n .py-xxl-2 {\n padding-top: 0.5rem !important;\n padding-bottom: 0.5rem !important;\n }\n\n .py-xxl-3 {\n padding-top: 1rem !important;\n padding-bottom: 1rem !important;\n }\n\n .py-xxl-4 {\n padding-top: 1.5rem !important;\n padding-bottom: 1.5rem !important;\n }\n\n .py-xxl-5 {\n padding-top: 3rem !important;\n padding-bottom: 3rem !important;\n }\n\n .pt-xxl-0 {\n padding-top: 0 !important;\n }\n\n .pt-xxl-1 {\n padding-top: 0.25rem !important;\n }\n\n .pt-xxl-2 {\n padding-top: 0.5rem !important;\n }\n\n .pt-xxl-3 {\n padding-top: 1rem !important;\n }\n\n .pt-xxl-4 {\n padding-top: 1.5rem !important;\n }\n\n .pt-xxl-5 {\n padding-top: 3rem !important;\n }\n\n .pe-xxl-0 {\n padding-left: 0 !important;\n }\n\n .pe-xxl-1 {\n padding-left: 0.25rem !important;\n }\n\n .pe-xxl-2 {\n padding-left: 0.5rem !important;\n }\n\n .pe-xxl-3 {\n padding-left: 1rem !important;\n }\n\n .pe-xxl-4 {\n padding-left: 1.5rem !important;\n }\n\n .pe-xxl-5 {\n padding-left: 3rem !important;\n }\n\n .pb-xxl-0 {\n padding-bottom: 0 !important;\n }\n\n .pb-xxl-1 {\n padding-bottom: 0.25rem !important;\n }\n\n .pb-xxl-2 {\n padding-bottom: 0.5rem !important;\n }\n\n .pb-xxl-3 {\n padding-bottom: 1rem !important;\n }\n\n .pb-xxl-4 {\n padding-bottom: 1.5rem !important;\n }\n\n .pb-xxl-5 {\n padding-bottom: 3rem !important;\n }\n\n .ps-xxl-0 {\n padding-right: 0 !important;\n }\n\n .ps-xxl-1 {\n padding-right: 0.25rem !important;\n }\n\n .ps-xxl-2 {\n padding-right: 0.5rem !important;\n }\n\n .ps-xxl-3 {\n padding-right: 1rem !important;\n }\n\n .ps-xxl-4 {\n padding-right: 1.5rem !important;\n }\n\n .ps-xxl-5 {\n padding-right: 3rem !important;\n }\n}\n@media print {\n .d-print-inline {\n display: inline !important;\n }\n\n .d-print-inline-block {\n display: inline-block !important;\n }\n\n .d-print-block {\n display: block !important;\n }\n\n .d-print-grid {\n display: grid !important;\n }\n\n .d-print-table {\n display: table !important;\n }\n\n .d-print-table-row {\n display: table-row !important;\n }\n\n .d-print-table-cell {\n display: table-cell !important;\n }\n\n .d-print-flex {\n display: flex !important;\n }\n\n .d-print-inline-flex {\n display: inline-flex !important;\n }\n\n .d-print-none {\n display: none !important;\n }\n}\n/*# sourceMappingURL=bootstrap-grid.rtl.css.map */","// Container mixins\n\n@mixin make-container($gutter: $container-padding-x) {\n width: 100%;\n padding-right: var(--#{$variable-prefix}gutter-x, #{$gutter});\n padding-left: var(--#{$variable-prefix}gutter-x, #{$gutter});\n margin-right: auto;\n margin-left: auto;\n}\n","// Breakpoint viewport sizes and media queries.\n//\n// Breakpoints are defined as a map of (name: minimum width), order from small to large:\n//\n// (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px)\n//\n// The map defined in the `$grid-breakpoints` global variable is used as the `$breakpoints` argument by default.\n\n// Name of the next breakpoint, or null for the last breakpoint.\n//\n// >> breakpoint-next(sm)\n// md\n// >> breakpoint-next(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// md\n// >> breakpoint-next(sm, $breakpoint-names: (xs sm md lg xl))\n// md\n@function breakpoint-next($name, $breakpoints: $grid-breakpoints, $breakpoint-names: map-keys($breakpoints)) {\n $n: index($breakpoint-names, $name);\n @if not $n {\n @error \"breakpoint `#{$name}` not found in `#{$breakpoints}`\";\n }\n @return if($n < length($breakpoint-names), nth($breakpoint-names, $n + 1), null);\n}\n\n// Minimum breakpoint width. Null for the smallest (first) breakpoint.\n//\n// >> breakpoint-min(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// 576px\n@function breakpoint-min($name, $breakpoints: $grid-breakpoints) {\n $min: map-get($breakpoints, $name);\n @return if($min != 0, $min, null);\n}\n\n// Maximum breakpoint width.\n// The maximum value is reduced by 0.02px to work around the limitations of\n// `min-` and `max-` prefixes and viewports with fractional widths.\n// See https://www.w3.org/TR/mediaqueries-4/#mq-min-max\n// Uses 0.02px rather than 0.01px to work around a current rounding bug in Safari.\n// See https://bugs.webkit.org/show_bug.cgi?id=178261\n//\n// >> breakpoint-max(md, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// 767.98px\n@function breakpoint-max($name, $breakpoints: $grid-breakpoints) {\n $max: map-get($breakpoints, $name);\n @return if($max and $max > 0, $max - .02, null);\n}\n\n// Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.\n// Useful for making responsive utilities.\n//\n// >> breakpoint-infix(xs, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// \"\" (Returns a blank string)\n// >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px))\n// \"-sm\"\n@function breakpoint-infix($name, $breakpoints: $grid-breakpoints) {\n @return if(breakpoint-min($name, $breakpoints) == null, \"\", \"-#{$name}\");\n}\n\n// Media of at least the minimum breakpoint width. No query for the smallest breakpoint.\n// Makes the @content apply to the given breakpoint and wider.\n@mixin media-breakpoint-up($name, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n @if $min {\n @media (min-width: $min) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Media of at most the maximum breakpoint width. No query for the largest breakpoint.\n// Makes the @content apply to the given breakpoint and narrower.\n@mixin media-breakpoint-down($name, $breakpoints: $grid-breakpoints) {\n $max: breakpoint-max($name, $breakpoints);\n @if $max {\n @media (max-width: $max) {\n @content;\n }\n } @else {\n @content;\n }\n}\n\n// Media that spans multiple breakpoint widths.\n// Makes the @content apply between the min and max breakpoints\n@mixin media-breakpoint-between($lower, $upper, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($lower, $breakpoints);\n $max: breakpoint-max($upper, $breakpoints);\n\n @if $min != null and $max != null {\n @media (min-width: $min) and (max-width: $max) {\n @content;\n }\n } @else if $max == null {\n @include media-breakpoint-up($lower, $breakpoints) {\n @content;\n }\n } @else if $min == null {\n @include media-breakpoint-down($upper, $breakpoints) {\n @content;\n }\n }\n}\n\n// Media between the breakpoint's minimum and maximum widths.\n// No minimum for the smallest breakpoint, and no maximum for the largest one.\n// Makes the @content apply only to the given breakpoint, not viewports any wider or narrower.\n@mixin media-breakpoint-only($name, $breakpoints: $grid-breakpoints) {\n $min: breakpoint-min($name, $breakpoints);\n $next: breakpoint-next($name, $breakpoints);\n $max: breakpoint-max($next);\n\n @if $min != null and $max != null {\n @media (min-width: $min) and (max-width: $max) {\n @content;\n }\n } @else if $max == null {\n @include media-breakpoint-up($name, $breakpoints) {\n @content;\n }\n } @else if $min == null {\n @include media-breakpoint-down($next, $breakpoints) {\n @content;\n }\n }\n}\n","// Row\n//\n// Rows contain your columns.\n\n@if $enable-grid-classes {\n .row {\n @include make-row();\n\n > * {\n @include make-col-ready();\n }\n }\n}\n\n@if $enable-cssgrid {\n .grid {\n display: grid;\n grid-template-rows: repeat(var(--#{$variable-prefix}rows, 1), 1fr);\n grid-template-columns: repeat(var(--#{$variable-prefix}columns, #{$grid-columns}), 1fr);\n gap: var(--#{$variable-prefix}gap, #{$grid-gutter-width});\n\n @include make-cssgrid();\n }\n}\n\n\n// Columns\n//\n// Common styles for small and large grid columns\n\n@if $enable-grid-classes {\n @include make-grid-columns();\n}\n","// Grid system\n//\n// Generate semantic grid columns with these mixins.\n\n@mixin make-row($gutter: $grid-gutter-width) {\n --#{$variable-prefix}gutter-x: #{$gutter};\n --#{$variable-prefix}gutter-y: 0;\n display: flex;\n flex-wrap: wrap;\n margin-top: calc(var(--#{$variable-prefix}gutter-y) * -1); // stylelint-disable-line function-disallowed-list\n margin-right: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list\n margin-left: calc(var(--#{$variable-prefix}gutter-x) * -.5); // stylelint-disable-line function-disallowed-list\n}\n\n@mixin make-col-ready($gutter: $grid-gutter-width) {\n // Add box sizing if only the grid is loaded\n box-sizing: if(variable-exists(include-column-box-sizing) and $include-column-box-sizing, border-box, null);\n // Prevent columns from becoming too narrow when at smaller grid tiers by\n // always setting `width: 100%;`. This works because we set the width\n // later on to override this initial width.\n flex-shrink: 0;\n width: 100%;\n max-width: 100%; // Prevent `.col-auto`, `.col` (& responsive variants) from breaking out the grid\n padding-right: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n padding-left: calc(var(--#{$variable-prefix}gutter-x) * .5); // stylelint-disable-line function-disallowed-list\n margin-top: var(--#{$variable-prefix}gutter-y);\n}\n\n@mixin make-col($size: false, $columns: $grid-columns) {\n @if $size {\n flex: 0 0 auto;\n width: percentage(divide($size, $columns));\n\n } @else {\n flex: 1 1 0;\n max-width: 100%;\n }\n}\n\n@mixin make-col-auto() {\n flex: 0 0 auto;\n width: auto;\n}\n\n@mixin make-col-offset($size, $columns: $grid-columns) {\n $num: divide($size, $columns);\n margin-left: if($num == 0, 0, percentage($num));\n}\n\n// Row columns\n//\n// Specify on a parent element(e.g., .row) to force immediate children into NN\n// numberof columns. Supports wrapping to new lines, but does not do a Masonry\n// style grid.\n@mixin row-cols($count) {\n > * {\n flex: 0 0 auto;\n width: divide(100%, $count);\n }\n}\n\n// Framework grid generation\n//\n// Used only by Bootstrap to generate the correct number of grid classes given\n// any value of `$grid-columns`.\n\n@mixin make-grid-columns($columns: $grid-columns, $gutter: $grid-gutter-width, $breakpoints: $grid-breakpoints) {\n @each $breakpoint in map-keys($breakpoints) {\n $infix: breakpoint-infix($breakpoint, $breakpoints);\n\n @include media-breakpoint-up($breakpoint, $breakpoints) {\n // Provide basic `.col-{bp}` classes for equal-width flexbox columns\n .col#{$infix} {\n flex: 1 0 0%; // Flexbugs #4: https://github.com/philipwalton/flexbugs#flexbug-4\n }\n\n .row-cols#{$infix}-auto > * {\n @include make-col-auto();\n }\n\n @if $grid-row-columns > 0 {\n @for $i from 1 through $grid-row-columns {\n .row-cols#{$infix}-#{$i} {\n @include row-cols($i);\n }\n }\n }\n\n .col#{$infix}-auto {\n @include make-col-auto();\n }\n\n @if $columns > 0 {\n @for $i from 1 through $columns {\n .col#{$infix}-#{$i} {\n @include make-col($i, $columns);\n }\n }\n\n // `$columns - 1` because offsetting by the width of an entire row isn't possible\n @for $i from 0 through ($columns - 1) {\n @if not ($infix == \"\" and $i == 0) { // Avoid emitting useless .offset-0\n .offset#{$infix}-#{$i} {\n @include make-col-offset($i, $columns);\n }\n }\n }\n }\n\n // Gutters\n //\n // Make use of `.g-*`, `.gx-*` or `.gy-*` utilities to change spacing between the columns.\n @each $key, $value in $gutters {\n .g#{$infix}-#{$key},\n .gx#{$infix}-#{$key} {\n --#{$variable-prefix}gutter-x: #{$value};\n }\n\n .g#{$infix}-#{$key},\n .gy#{$infix}-#{$key} {\n --#{$variable-prefix}gutter-y: #{$value};\n }\n }\n }\n }\n}\n\n@mixin make-cssgrid($columns: $grid-columns, $breakpoints: $grid-breakpoints) {\n @each $breakpoint in map-keys($breakpoints) {\n $infix: breakpoint-infix($breakpoint, $breakpoints);\n\n @include media-breakpoint-up($breakpoint, $breakpoints) {\n @if $columns > 0 {\n @for $i from 1 through $columns {\n .g-col#{$infix}-#{$i} {\n grid-column: auto / span $i;\n }\n }\n\n // Start with `1` because `0` is and invalid value.\n // Ends with `$columns - 1` because offsetting by the width of an entire row isn't possible.\n @for $i from 1 through ($columns - 1) {\n .g-start#{$infix}-#{$i} {\n grid-column-start: $i;\n }\n }\n }\n }\n }\n}\n","// Utility generator\n// Used to generate utilities & print utilities\n@mixin generate-utility($utility, $infix, $is-rfs-media-query: false) {\n $values: map-get($utility, values);\n\n // If the values are a list or string, convert it into a map\n @if type-of($values) == \"string\" or type-of(nth($values, 1)) != \"list\" {\n $values: zip($values, $values);\n }\n\n @each $key, $value in $values {\n $properties: map-get($utility, property);\n\n // Multiple properties are possible, for example with vertical or horizontal margins or paddings\n @if type-of($properties) == \"string\" {\n $properties: append((), $properties);\n }\n\n // Use custom class if present\n $property-class: if(map-has-key($utility, class), map-get($utility, class), nth($properties, 1));\n $property-class: if($property-class == null, \"\", $property-class);\n\n // State params to generate pseudo-classes\n $state: if(map-has-key($utility, state), map-get($utility, state), ());\n\n $infix: if($property-class == \"\" and str-slice($infix, 1, 1) == \"-\", str-slice($infix, 2), $infix);\n\n // Don't prefix if value key is null (eg. with shadow class)\n $property-class-modifier: if($key, if($property-class == \"\" and $infix == \"\", \"\", \"-\") + $key, \"\");\n\n @if map-get($utility, rfs) {\n // Inside the media query\n @if $is-rfs-media-query {\n $val: rfs-value($value);\n\n // Do not render anything if fluid and non fluid values are the same\n $value: if($val == rfs-fluid-value($value), null, $val);\n }\n @else {\n $value: rfs-fluid-value($value);\n }\n }\n\n $is-css-var: map-get($utility, css-var);\n $is-local-vars: map-get($utility, local-vars);\n $is-rtl: map-get($utility, rtl);\n\n @if $value != null {\n @if $is-rtl == false {\n /* rtl:begin:remove */\n }\n\n @if $is-css-var {\n .#{$property-class + $infix + $property-class-modifier} {\n --#{$variable-prefix}#{$property-class}: #{$value};\n }\n\n @each $pseudo in $state {\n .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {\n --#{$variable-prefix}#{$property-class}: #{$value};\n }\n }\n } @else {\n .#{$property-class + $infix + $property-class-modifier} {\n @each $property in $properties {\n @if $is-local-vars {\n @each $local-var, $value in $is-local-vars {\n --#{$variable-prefix}#{$local-var}: #{$value};\n }\n }\n #{$property}: $value if($enable-important-utilities, !important, null);\n }\n }\n\n @each $pseudo in $state {\n .#{$property-class + $infix + $property-class-modifier}-#{$pseudo}:#{$pseudo} {\n @each $property in $properties {\n #{$property}: $value if($enable-important-utilities, !important, null);\n }\n }\n }\n }\n\n @if $is-rtl == false {\n /* rtl:end:remove */\n }\n }\n }\n}\n","// Loop over each breakpoint\n@each $breakpoint in map-keys($grid-breakpoints) {\n\n // Generate media query if needed\n @include media-breakpoint-up($breakpoint) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n // Loop over each utility property\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Only proceed if responsive media queries are enabled or if it's the base media query\n @if type-of($utility) == \"map\" and (map-get($utility, responsive) or $infix == \"\") {\n @include generate-utility($utility, $infix);\n }\n }\n }\n}\n\n// RFS rescaling\n@media (min-width: $rfs-mq-value) {\n @each $breakpoint in map-keys($grid-breakpoints) {\n $infix: breakpoint-infix($breakpoint, $grid-breakpoints);\n\n @if (map-get($grid-breakpoints, $breakpoint) < $rfs-breakpoint) {\n // Loop over each utility property\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Only proceed if responsive media queries are enabled or if it's the base media query\n @if type-of($utility) == \"map\" and map-get($utility, rfs) and (map-get($utility, responsive) or $infix == \"\") {\n @include generate-utility($utility, $infix, true);\n }\n }\n }\n }\n}\n\n\n// Print utilities\n@media print {\n @each $key, $utility in $utilities {\n // The utility can be disabled with `false`, thus check if the utility is a map first\n // Then check if the utility needs print styles\n @if type-of($utility) == \"map\" and map-get($utility, print) == true {\n @include generate-utility($utility, \"-print\");\n }\n }\n}\n"]} \ No newline at end of file diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css new file mode 100644 index 0000000..c1bcf3b --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css @@ -0,0 +1,427 @@ +/*! + * Bootstrap Reboot v5.1.0 (https://getbootstrap.com/) + * Copyright 2011-2021 The Bootstrap Authors + * Copyright 2011-2021 Twitter, Inc. + * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE) + * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md) + */ +*, +*::before, +*::after { + box-sizing: border-box; +} + +@media (prefers-reduced-motion: no-preference) { + :root { + scroll-behavior: smooth; + } +} + +body { + margin: 0; + font-family: var(--bs-body-font-family); + font-size: var(--bs-body-font-size); + font-weight: var(--bs-body-font-weight); + line-height: var(--bs-body-line-height); + color: var(--bs-body-color); + text-align: var(--bs-body-text-align); + background-color: var(--bs-body-bg); + -webkit-text-size-adjust: 100%; + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); +} + +hr { + margin: 1rem 0; + color: inherit; + background-color: currentColor; + border: 0; + opacity: 0.25; +} + +hr:not([size]) { + height: 1px; +} + +h6, h5, h4, h3, h2, h1 { + margin-top: 0; + margin-bottom: 0.5rem; + font-weight: 500; + line-height: 1.2; +} + +h1 { + font-size: calc(1.375rem + 1.5vw); +} +@media (min-width: 1200px) { + h1 { + font-size: 2.5rem; + } +} + +h2 { + font-size: calc(1.325rem + 0.9vw); +} +@media (min-width: 1200px) { + h2 { + font-size: 2rem; + } +} + +h3 { + font-size: calc(1.3rem + 0.6vw); +} +@media (min-width: 1200px) { + h3 { + font-size: 1.75rem; + } +} + +h4 { + font-size: calc(1.275rem + 0.3vw); +} +@media (min-width: 1200px) { + h4 { + font-size: 1.5rem; + } +} + +h5 { + font-size: 1.25rem; +} + +h6 { + font-size: 1rem; +} + +p { + margin-top: 0; + margin-bottom: 1rem; +} + +abbr[title], +abbr[data-bs-original-title] { + -webkit-text-decoration: underline dotted; + text-decoration: underline dotted; + cursor: help; + -webkit-text-decoration-skip-ink: none; + text-decoration-skip-ink: none; +} + +address { + margin-bottom: 1rem; + font-style: normal; + line-height: inherit; +} + +ol, +ul { + padding-left: 2rem; +} + +ol, +ul, +dl { + margin-top: 0; + margin-bottom: 1rem; +} + +ol ol, +ul ul, +ol ul, +ul ol { + margin-bottom: 0; +} + +dt { + font-weight: 700; +} + +dd { + margin-bottom: 0.5rem; + margin-left: 0; +} + +blockquote { + margin: 0 0 1rem; +} + +b, +strong { + font-weight: bolder; +} + +small { + font-size: 0.875em; +} + +mark { + padding: 0.2em; + background-color: #fcf8e3; +} + +sub, +sup { + position: relative; + font-size: 0.75em; + line-height: 0; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +a { + color: #0d6efd; + text-decoration: underline; +} +a:hover { + color: #0a58ca; +} + +a:not([href]):not([class]), a:not([href]):not([class]):hover { + color: inherit; + text-decoration: none; +} + +pre, +code, +kbd, +samp { + font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace; + font-size: 1em; + direction: ltr /* rtl:ignore */; + unicode-bidi: bidi-override; +} + +pre { + display: block; + margin-top: 0; + margin-bottom: 1rem; + overflow: auto; + font-size: 0.875em; +} +pre code { + font-size: inherit; + color: inherit; + word-break: normal; +} + +code { + font-size: 0.875em; + color: #d63384; + word-wrap: break-word; +} +a > code { + color: inherit; +} + +kbd { + padding: 0.2rem 0.4rem; + font-size: 0.875em; + color: #fff; + background-color: #212529; + border-radius: 0.2rem; +} +kbd kbd { + padding: 0; + font-size: 1em; + font-weight: 700; +} + +figure { + margin: 0 0 1rem; +} + +img, +svg { + vertical-align: middle; +} + +table { + caption-side: bottom; + border-collapse: collapse; +} + +caption { + padding-top: 0.5rem; + padding-bottom: 0.5rem; + color: #6c757d; + text-align: left; +} + +th { + text-align: inherit; + text-align: -webkit-match-parent; +} + +thead, +tbody, +tfoot, +tr, +td, +th { + border-color: inherit; + border-style: solid; + border-width: 0; +} + +label { + display: inline-block; +} + +button { + border-radius: 0; +} + +button:focus:not(:focus-visible) { + outline: 0; +} + +input, +button, +select, +optgroup, +textarea { + margin: 0; + font-family: inherit; + font-size: inherit; + line-height: inherit; +} + +button, +select { + text-transform: none; +} + +[role=button] { + cursor: pointer; +} + +select { + word-wrap: normal; +} +select:disabled { + opacity: 1; +} + +[list]::-webkit-calendar-picker-indicator { + display: none; +} + +button, +[type=button], +[type=reset], +[type=submit] { + -webkit-appearance: button; +} +button:not(:disabled), +[type=button]:not(:disabled), +[type=reset]:not(:disabled), +[type=submit]:not(:disabled) { + cursor: pointer; +} + +::-moz-focus-inner { + padding: 0; + border-style: none; +} + +textarea { + resize: vertical; +} + +fieldset { + min-width: 0; + padding: 0; + margin: 0; + border: 0; +} + +legend { + float: left; + width: 100%; + padding: 0; + margin-bottom: 0.5rem; + font-size: calc(1.275rem + 0.3vw); + line-height: inherit; +} +@media (min-width: 1200px) { + legend { + font-size: 1.5rem; + } +} +legend + * { + clear: left; +} + +::-webkit-datetime-edit-fields-wrapper, +::-webkit-datetime-edit-text, +::-webkit-datetime-edit-minute, +::-webkit-datetime-edit-hour-field, +::-webkit-datetime-edit-day-field, +::-webkit-datetime-edit-month-field, +::-webkit-datetime-edit-year-field { + padding: 0; +} + +::-webkit-inner-spin-button { + height: auto; +} + +[type=search] { + outline-offset: -2px; + -webkit-appearance: textfield; +} + +/* rtl:raw: +[type="tel"], +[type="url"], +[type="email"], +[type="number"] { + direction: ltr; +} +*/ +::-webkit-search-decoration { + -webkit-appearance: none; +} + +::-webkit-color-swatch-wrapper { + padding: 0; +} + +::file-selector-button { + font: inherit; +} + +::-webkit-file-upload-button { + font: inherit; + -webkit-appearance: button; +} + +output { + display: inline-block; +} + +iframe { + border: 0; +} + +summary { + display: list-item; + cursor: pointer; +} + +progress { + vertical-align: baseline; +} + +[hidden] { + display: none !important; +} + +/*# sourceMappingURL=bootstrap-reboot.css.map */ \ No newline at end of file diff --git a/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map new file mode 100644 index 0000000..c06c13a --- /dev/null +++ b/Performance_Testing/Syncfusion_HTMLtoPDF/wwwroot/lib/bootstrap/dist/css/bootstrap-reboot.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["../../scss/bootstrap-reboot.scss","../../scss/_reboot.scss","bootstrap-reboot.css","../../scss/vendor/_rfs.scss","../../scss/_variables.scss","../../scss/mixins/_border-radius.scss"],"names":[],"mappings":"AAAA;;;;;;EAAA;ACeA;;;EAGE,sBAAA;ACPF;;ADsBI;EANJ;IAOM,uBAAA;EClBJ;AACF;;AD+BA;EACE,SAAA;EACA,uCAAA;EEmPI,mCALI;EF5OR,uCAAA;EACA,uCAAA;EACA,2BAAA;EACA,qCAAA;EACA,mCAAA;EACA,8BAAA;EACA,6CAAA;AC5BF;;ADsCA;EACE,cAAA;EACA,cGqkB4B;EHpkB5B,8BAAA;EACA,SAAA;EACA,aGokB4B;AFvmB9B;;ADsCA;EACE,WG8a4B;AFjd9B;;AD6CA;EACE,aAAA;EACA,qBG0gB4B;EHvgB5B,gBG0gB4B;EHzgB5B,gBG0gB4B;AFtjB9B;;ADgDA;EEwMQ,iCAAA;ADpPR;ACkFI;EFtCJ;IE+MQ,iBAAA;EDvPN;AACF;;AD4CA;EEmMQ,iCAAA;AD3OR;ACyEI;EFjCJ;IE0MQ,eAAA;ED9ON;AACF;;ADwCA;EE8LQ,+BAAA;ADlOR;ACgEI;EF5BJ;IEqMQ,kBAAA;EDrON;AACF;;ADoCA;EEyLQ,iCAAA;ADzNR;ACuDI;EFvBJ;IEgMQ,iBAAA;ED5NN;AACF;;ADgCA;EEgLM,kBALI;ADvMV;;ADiCA;EE2KM,eALI;ADnMV;;ADwCA;EACE,aAAA;EACA,mBGwT0B;AF7V5B;;ADgDA;;EAEE,yCAAA;EAAA,iCAAA;EACA,YAAA;EACA,sCAAA;EAAA,8BAAA;AC7CF;;ADmDA;EACE,mBAAA;EACA,kBAAA;EACA,oBAAA;AChDF;;ADsDA;;EAEE,kBAAA;ACnDF;;ADsDA;;;EAGE,aAAA;EACA,mBAAA;ACnDF;;ADsDA;;;;EAIE,gBAAA;ACnDF;;ADsDA;EACE,gBG6Y4B;AFhc9B;;ADwDA;EACE,qBAAA;EACA,cAAA;ACrDF;;AD2DA;EACE,gBAAA;ACxDF;;ADgEA;;EAEE,mBGsX4B;AFnb9B;;ADqEA;EE4EM,kBALI;ADxIV;;ADwEA;EACE,cGkb4B;EHjb5B,yBGyb4B;AF9f9B;;AD8EA;;EAEE,kBAAA;EEwDI,iBALI;EFjDR,cAAA;EACA,wBAAA;AC3EF;;AD8EA;EAAM,eAAA;AC1EN;;AD2EA;EAAM,WAAA;ACvEN;;AD4EA;EACE,cGpNQ;EHqNR,0BGwLwC;AFjQ1C;AD2EE;EACE,cGuLsC;AFhQ1C;;ADoFE;EAEE,cAAA;EACA,qBAAA;AClFJ;;ADyFA;;;;EAIE,iGGgS4B;EDlRxB,cALI;EFPR,+BAAA;EACA,2BAAA;ACtFF;;AD6FA;EACE,cAAA;EACA,aAAA;EACA,mBAAA;EACA,cAAA;EEAI,kBALI;ADpFV;AD8FE;EELI,kBALI;EFYN,cAAA;EACA,kBAAA;AC5FJ;;ADgGA;EEZM,kBALI;EFmBR,cG1QQ;EH2QR,qBAAA;AC7FF;ADgGE;EACE,cAAA;AC9FJ;;ADkGA;EACE,sBAAA;EExBI,kBALI;EF+BR,WGvTS;EHwTT,yBG/SS;ECEP,qBAAA;AH+MJ;ADiGE;EACE,UAAA;EE/BE,cALI;EFsCN,gBGgQ0B;AF/V9B;;ADwGA;EACE,gBAAA;ACrGF;;AD2GA;;EAEE,sBAAA;ACxGF;;ADgHA;EACE,oBAAA;EACA,yBAAA;AC7GF;;ADgHA;EACE,mBG8T4B;EH7T5B,sBG6T4B;EH5T5B,cG1VS;EH2VT,gBAAA;AC7GF;;ADoHA;EAEE,mBAAA;EACA,gCAAA;AClHF;;ADqHA;;;;;;EAME,qBAAA;EACA,mBAAA;EACA,eAAA;AClHF;;AD0HA;EACE,qBAAA;ACvHF;;AD6HA;EAEE,gBAAA;AC3HF;;ADmIA;EACE,UAAA;AChIF;;ADqIA;;;;;EAKE,SAAA;EACA,oBAAA;EE9HI,kBALI;EFqIR,oBAAA;AClIF;;ADsIA;;EAEE,oBAAA;ACnIF;;ADwIA;EACE,eAAA;ACrIF;;ADwIA;EAGE,iBAAA;ACvIF;AD0IE;EACE,UAAA;ACxIJ;;AD+IA;EACE,aAAA;AC5IF;;ADoJA;;;;EAIE,0BAAA;ACjJF;ADoJI;;;;EACE,eAAA;AC/IN;;ADsJA;EACE,UAAA;EACA,kBAAA;ACnJF;;ADwJA;EACE,gBAAA;ACrJF;;AD+JA;EACE,YAAA;EACA,UAAA;EACA,SAAA;EACA,SAAA;AC5JF;;ADoKA;EACE,WAAA;EACA,WAAA;EACA,UAAA;EACA,qBGmJ4B;EDtWtB,iCAAA;EFsNN,oBAAA;AClKF;ACtNI;EFiXJ;IExMQ,iBAAA;EDiDN;AACF;AD+JE;EACE,WAAA;AC7JJ;;ADoKA;;;;;;;EAOE,UAAA;ACjKF;;ADoKA;EACE,YAAA;ACjKF;;AD0KA;EACE,oBAAA;EACA,6BAAA;ACvKF;;AD+KA;;;;;;;CAAA;AAWA;EACE,wBAAA;AC/KF;;ADoLA;EACE,UAAA;ACjLF;;ADuLA;EACE,aAAA;ACpLF;;AD0LA;EACE,aAAA;EACA,0BAAA;ACvLF;;AD4LA;EACE,qBAAA;ACzLF;;AD8LA;EACE,SAAA;AC3LF;;ADkMA;EACE,kBAAA;EACA,eAAA;AC/LF;;ADuMA;EACE,wBAAA;ACpMF;;AD4MA;EACE,wBAAA;ACzMF","file":"bootstrap-reboot.css","sourcesContent":["/*!\n * Bootstrap Reboot v5.1.0 (https://getbootstrap.com/)\n * Copyright 2011-2021 The Bootstrap Authors\n * Copyright 2011-2021 Twitter, Inc.\n * Licensed under MIT (https://github.com/twbs/bootstrap/blob/main/LICENSE)\n * Forked from Normalize.css, licensed MIT (https://github.com/necolas/normalize.css/blob/master/LICENSE.md)\n */\n\n@import \"functions\";\n@import \"variables\";\n// Prevent the usage of custom properties since we don't add them to `:root` in reboot\n$font-family-base: $font-family-sans-serif; // stylelint-disable-line scss/dollar-variable-default\n$font-family-code: $font-family-monospace; // stylelint-disable-line scss/dollar-variable-default\n@import \"mixins\";\n@import \"reboot\";\n","// stylelint-disable declaration-no-important, selector-no-qualifying-type, property-no-vendor-prefix\n\n\n// Reboot\n//\n// Normalization of HTML elements, manually forked from Normalize.css to remove\n// styles targeting irrelevant browsers while applying new styles.\n//\n// Normalize is licensed MIT. https://github.com/necolas/normalize.css\n\n\n// Document\n//\n// Change from `box-sizing: content-box` so that `width` is not affected by `padding` or `border`.\n\n*,\n*::before,\n*::after {\n box-sizing: border-box;\n}\n\n\n// Root\n//\n// Ability to the value of the root font sizes, affecting the value of `rem`.\n// null by default, thus nothing is generated.\n\n:root {\n @if $font-size-root != null {\n font-size: var(--#{$variable-prefix}-root-font-size);\n }\n\n @if $enable-smooth-scroll {\n @media (prefers-reduced-motion: no-preference) {\n scroll-behavior: smooth;\n }\n }\n}\n\n\n// Body\n//\n// 1. Remove the margin in all browsers.\n// 2. As a best practice, apply a default `background-color`.\n// 3. Prevent adjustments of font size after orientation changes in iOS.\n// 4. Change the default tap highlight to be completely transparent in iOS.\n\n// scss-docs-start reboot-body-rules\nbody {\n margin: 0; // 1\n font-family: var(--#{$variable-prefix}body-font-family);\n @include font-size(var(--#{$variable-prefix}body-font-size));\n font-weight: var(--#{$variable-prefix}body-font-weight);\n line-height: var(--#{$variable-prefix}body-line-height);\n color: var(--#{$variable-prefix}body-color);\n text-align: var(--#{$variable-prefix}body-text-align);\n background-color: var(--#{$variable-prefix}body-bg); // 2\n -webkit-text-size-adjust: 100%; // 3\n -webkit-tap-highlight-color: rgba($black, 0); // 4\n}\n// scss-docs-end reboot-body-rules\n\n\n// Content grouping\n//\n// 1. Reset Firefox's gray color\n// 2. Set correct height and prevent the `size` attribute to make the `hr` look like an input field\n\nhr {\n margin: $hr-margin-y 0;\n color: $hr-color; // 1\n background-color: currentColor;\n border: 0;\n opacity: $hr-opacity;\n}\n\nhr:not([size]) {\n height: $hr-height; // 2\n}\n\n\n// Typography\n//\n// 1. Remove top margins from headings\n// By default, `

`-`

` all receive top and bottom margins. We nuke the top\n// margin for easier control within type scales as it avoids margin collapsing.\n\n%heading {\n margin-top: 0; // 1\n margin-bottom: $headings-margin-bottom;\n font-family: $headings-font-family;\n font-style: $headings-font-style;\n font-weight: $headings-font-weight;\n line-height: $headings-line-height;\n color: $headings-color;\n}\n\nh1 {\n @extend %heading;\n @include font-size($h1-font-size);\n}\n\nh2 {\n @extend %heading;\n @include font-size($h2-font-size);\n}\n\nh3 {\n @extend %heading;\n @include font-size($h3-font-size);\n}\n\nh4 {\n @extend %heading;\n @include font-size($h4-font-size);\n}\n\nh5 {\n @extend %heading;\n @include font-size($h5-font-size);\n}\n\nh6 {\n @extend %heading;\n @include font-size($h6-font-size);\n}\n\n\n// Reset margins on paragraphs\n//\n// Similarly, the top margin on `

`s get reset. However, we also reset the\n// bottom margin to use `rem` units instead of `em`.\n\np {\n margin-top: 0;\n margin-bottom: $paragraph-margin-bottom;\n}\n\n\n// Abbreviations\n//\n// 1. Duplicate behavior to the data-bs-* attribute for our tooltip plugin\n// 2. Add the correct text decoration in Chrome, Edge, Opera, and Safari.\n// 3. Add explicit cursor to indicate changed behavior.\n// 4. Prevent the text-decoration to be skipped.\n\nabbr[title],\nabbr[data-bs-original-title] { // 1\n text-decoration: underline dotted; // 2\n cursor: help; // 3\n text-decoration-skip-ink: none; // 4\n}\n\n\n// Address\n\naddress {\n margin-bottom: 1rem;\n font-style: normal;\n line-height: inherit;\n}\n\n\n// Lists\n\nol,\nul {\n padding-left: 2rem;\n}\n\nol,\nul,\ndl {\n margin-top: 0;\n margin-bottom: 1rem;\n}\n\nol ol,\nul ul,\nol ul,\nul ol {\n margin-bottom: 0;\n}\n\ndt {\n font-weight: $dt-font-weight;\n}\n\n// 1. Undo browser default\n\ndd {\n margin-bottom: .5rem;\n margin-left: 0; // 1\n}\n\n\n// Blockquote\n\nblockquote {\n margin: 0 0 1rem;\n}\n\n\n// Strong\n//\n// Add the correct font weight in Chrome, Edge, and Safari\n\nb,\nstrong {\n font-weight: $font-weight-bolder;\n}\n\n\n// Small\n//\n// Add the correct font size in all browsers\n\nsmall {\n @include font-size($small-font-size);\n}\n\n\n// Mark\n\nmark {\n padding: $mark-padding;\n background-color: $mark-bg;\n}\n\n\n// Sub and Sup\n//\n// Prevent `sub` and `sup` elements from affecting the line height in\n// all browsers.\n\nsub,\nsup {\n position: relative;\n @include font-size($sub-sup-font-size);\n line-height: 0;\n vertical-align: baseline;\n}\n\nsub { bottom: -.25em; }\nsup { top: -.5em; }\n\n\n// Links\n\na {\n color: $link-color;\n text-decoration: $link-decoration;\n\n &:hover {\n color: $link-hover-color;\n text-decoration: $link-hover-decoration;\n }\n}\n\n// And undo these styles for placeholder links/named anchors (without href).\n// It would be more straightforward to just use a[href] in previous block, but that\n// causes specificity issues in many other styles that are too complex to fix.\n// See https://github.com/twbs/bootstrap/issues/19402\n\na:not([href]):not([class]) {\n &,\n &:hover {\n color: inherit;\n text-decoration: none;\n }\n}\n\n\n// Code\n\npre,\ncode,\nkbd,\nsamp {\n font-family: $font-family-code;\n @include font-size(1em); // Correct the odd `em` font sizing in all browsers.\n direction: ltr #{\"/* rtl:ignore */\"};\n unicode-bidi: bidi-override;\n}\n\n// 1. Remove browser default top margin\n// 2. Reset browser default of `1em` to use `rem`s\n// 3. Don't allow content to break outside\n\npre {\n display: block;\n margin-top: 0; // 1\n margin-bottom: 1rem; // 2\n overflow: auto; // 3\n @include font-size($code-font-size);\n color: $pre-color;\n\n // Account for some code outputs that place code tags in pre tags\n code {\n @include font-size(inherit);\n color: inherit;\n word-break: normal;\n }\n}\n\ncode {\n @include font-size($code-font-size);\n color: $code-color;\n word-wrap: break-word;\n\n // Streamline the style when inside anchors to avoid broken underline and more\n a > & {\n color: inherit;\n }\n}\n\nkbd {\n padding: $kbd-padding-y $kbd-padding-x;\n @include font-size($kbd-font-size);\n color: $kbd-color;\n background-color: $kbd-bg;\n @include border-radius($border-radius-sm);\n\n kbd {\n padding: 0;\n @include font-size(1em);\n font-weight: $nested-kbd-font-weight;\n }\n}\n\n\n// Figures\n//\n// Apply a consistent margin strategy (matches our type styles).\n\nfigure {\n margin: 0 0 1rem;\n}\n\n\n// Images and content\n\nimg,\nsvg {\n vertical-align: middle;\n}\n\n\n// Tables\n//\n// Prevent double borders\n\ntable {\n caption-side: bottom;\n border-collapse: collapse;\n}\n\ncaption {\n padding-top: $table-cell-padding-y;\n padding-bottom: $table-cell-padding-y;\n color: $table-caption-color;\n text-align: left;\n}\n\n// 1. Removes font-weight bold by inheriting\n// 2. Matches default `` alignment by inheriting `text-align`.\n// 3. Fix alignment for Safari\n\nth {\n font-weight: $table-th-font-weight; // 1\n text-align: inherit; // 2\n text-align: -webkit-match-parent; // 3\n}\n\nthead,\ntbody,\ntfoot,\ntr,\ntd,\nth {\n border-color: inherit;\n border-style: solid;\n border-width: 0;\n}\n\n\n// Forms\n//\n// 1. Allow labels to use `margin` for spacing.\n\nlabel {\n display: inline-block; // 1\n}\n\n// Remove the default `border-radius` that macOS Chrome adds.\n// See https://github.com/twbs/bootstrap/issues/24093\n\nbutton {\n // stylelint-disable-next-line property-disallowed-list\n border-radius: 0;\n}\n\n// Explicitly remove focus outline in Chromium when it shouldn't be\n// visible (e.g. as result of mouse click or touch tap). It already\n// should be doing this automatically, but seems to currently be\n// confused and applies its very visible two-tone outline anyway.\n\nbutton:focus:not(:focus-visible) {\n outline: 0;\n}\n\n// 1. Remove the margin in Firefox and Safari\n\ninput,\nbutton,\nselect,\noptgroup,\ntextarea {\n margin: 0; // 1\n font-family: inherit;\n @include font-size(inherit);\n line-height: inherit;\n}\n\n// Remove the inheritance of text transform in Firefox\nbutton,\nselect {\n text-transform: none;\n}\n// Set the cursor for non-`