Skip to content

Commit 114422b

Browse files
Removed the security causing namespaces in code snippet.
1 parent aa7fa1e commit 114422b

1 file changed

Lines changed: 7 additions & 9 deletions

File tree

  • HTML to PDF/Blink/Convert-website-URL-to-PDF-document/.NET/Convert-website-URL-to-PDF-document

HTML to PDF/Blink/Convert-website-URL-to-PDF-document/.NET/Convert-website-URL-to-PDF-document/Program.cs

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,17 @@
22

33
using Syncfusion.HtmlConverter;
44
using Syncfusion.Pdf;
5-
using System.Runtime.InteropServices;
65

76
//Initialize HTML to PDF converter.
87
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter();
98
//Create blink converter settings
109
BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings();
11-
if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux))
12-
{
13-
//Set command line arguments to run without the sandbox.
14-
blinkConverterSettings.CommandLineArguments.Add("--no-sandbox");
15-
blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox");
16-
blinkConverterSettings.AdditionalDelay = 0;
17-
}
10+
11+
//Set command line arguments to run without the sandbox
12+
blinkConverterSettings.CommandLineArguments.Add("--no-sandbox");
13+
blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox");
14+
blinkConverterSettings.AdditionalDelay = 0;
15+
1816
//Assign Blink converter settings to HTML converter.
1917
htmlConverter.ConverterSettings = blinkConverterSettings;
2018
//Convert URL to PDF document.
@@ -26,4 +24,4 @@
2624
document.Save(fileStream);
2725
}
2826
//Close the document.
29-
document.Close(true);
27+
document.Close(true);

0 commit comments

Comments
 (0)