diff --git a/HTML to PDF/Blink/Convert-website-URL-to-PDF-document/.NET/Convert-website-URL-to-PDF-document/Program.cs b/HTML to PDF/Blink/Convert-website-URL-to-PDF-document/.NET/Convert-website-URL-to-PDF-document/Program.cs index 001cbd28..cc1e0f64 100644 --- a/HTML to PDF/Blink/Convert-website-URL-to-PDF-document/.NET/Convert-website-URL-to-PDF-document/Program.cs +++ b/HTML to PDF/Blink/Convert-website-URL-to-PDF-document/.NET/Convert-website-URL-to-PDF-document/Program.cs @@ -2,19 +2,12 @@ using Syncfusion.HtmlConverter; using Syncfusion.Pdf; -using System.Runtime.InteropServices; //Initialize HTML to PDF converter. HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); //Create blink converter settings BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - //Set command line arguments to run without the sandbox. - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); - blinkConverterSettings.AdditionalDelay = 0; -} + //Assign Blink converter settings to HTML converter. htmlConverter.ConverterSettings = blinkConverterSettings; //Convert URL to PDF document. @@ -26,4 +19,4 @@ document.Save(fileStream); } //Close the document. -document.Close(true); \ No newline at end of file +document.Close(true); diff --git a/HTML to PDF/Blink/Convert-website-URL-to-PDF-document/.NET/Convert-website-URL-to-PDF-document/README.md b/HTML to PDF/Blink/Convert-website-URL-to-PDF-document/.NET/Convert-website-URL-to-PDF-document/README.md index 59e5a519..0644d8c1 100644 --- a/HTML to PDF/Blink/Convert-website-URL-to-PDF-document/.NET/Convert-website-URL-to-PDF-document/README.md +++ b/HTML to PDF/Blink/Convert-website-URL-to-PDF-document/.NET/Convert-website-URL-to-PDF-document/README.md @@ -15,7 +15,6 @@ Step 3: **Include necessary namespaces**: Add the following namespaces in your ` ```csharp using Syncfusion.HtmlConverter; using Syncfusion.Pdf; - using System.Runtime.InteropServices; ``` Step 4: **Convert HTML to PDF**: Implement the following code in `Program.cs` to convert a website URL to a PDF file: @@ -25,12 +24,6 @@ Step 4: **Convert HTML to PDF**: Implement the following code in `Program.cs` to HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); //Create blink converter settings BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); - if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - //Set command line arguments to run without the sandbox. - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); - } //Assign Blink converter settings to HTML converter. htmlConverter.ConverterSettings = blinkConverterSettings; //Convert URL to PDF document. @@ -47,4 +40,4 @@ Step 4: **Convert HTML to PDF**: Implement the following code in `Program.cs` to You can download a complete working sample from the [GitHub repository](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/HTML%20to%20PDF/Blink/Convert-website-URL-to-PDF-document). -More information about the HTML to PDF conversion can be found in this [documentation](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features) section. \ No newline at end of file +More information about the HTML to PDF conversion can be found in this [documentation](https://help.syncfusion.com/document-processing/pdf/conversions/html-to-pdf/net/features) section.