diff --git a/HTML to PDF/Blink/Access-a-webpage-using-HTTP-GET/.NET/Access-a-webpage-using-HTTP-GET/Program.cs b/HTML to PDF/Blink/Access-a-webpage-using-HTTP-GET/.NET/Access-a-webpage-using-HTTP-GET/Program.cs index 36ed9e4a..c5594188 100644 --- a/HTML to PDF/Blink/Access-a-webpage-using-HTTP-GET/.NET/Access-a-webpage-using-HTTP-GET/Program.cs +++ b/HTML to PDF/Blink/Access-a-webpage-using-HTTP-GET/.NET/Access-a-webpage-using-HTTP-GET/Program.cs @@ -6,15 +6,6 @@ //Initialize the HTML to PDF converter. HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); -BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - //Set command line arugument 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; //Set the URL. string url = "https://www.example.com"; diff --git a/HTML to PDF/Blink/Access-a-webpage-using-HTTP-POST/.NET/Access-a-webpage-using-HTTP-POST/Program.cs b/HTML to PDF/Blink/Access-a-webpage-using-HTTP-POST/.NET/Access-a-webpage-using-HTTP-POST/Program.cs index 3a971064..0f889d96 100644 --- a/HTML to PDF/Blink/Access-a-webpage-using-HTTP-POST/.NET/Access-a-webpage-using-HTTP-POST/Program.cs +++ b/HTML to PDF/Blink/Access-a-webpage-using-HTTP-POST/.NET/Access-a-webpage-using-HTTP-POST/Program.cs @@ -9,12 +9,6 @@ //Initialize blink converter settings. BlinkConverterSettings settings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - //Set command line arugument to run without the sandbox. - settings.CommandLineArguments.Add("--no-sandbox"); - settings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} //Add HTTP post parameters to HttpPostFields. settings.HttpPostFields.Add("firstName", "Andrew"); settings.HttpPostFields.Add("lastName", "Fuller"); diff --git a/HTML to PDF/Blink/Accessible_PDF_In_HTML_to_PDF/.NET/Accessible PDF/Program.cs b/HTML to PDF/Blink/Accessible_PDF_In_HTML_to_PDF/.NET/Accessible PDF/Program.cs index 07a0e6ff..d16b4071 100644 --- a/HTML to PDF/Blink/Accessible_PDF_In_HTML_to_PDF/.NET/Accessible PDF/Program.cs +++ b/HTML to PDF/Blink/Accessible_PDF_In_HTML_to_PDF/.NET/Accessible PDF/Program.cs @@ -6,12 +6,6 @@ HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); //Initialize the BlinkConverterSettings. BlinkConverterSettings settings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - //Set command line arugument to run without the sandbox. - settings.CommandLineArguments.Add("--no-sandbox"); - settings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} //Set true to enable the accessibility tags in PDF generation. settings.EnableAccessibilityTags = true; //Assign the BlinkConverterSettings to the ConverterSettings property of HtmlToPdfConverter. diff --git a/HTML to PDF/Blink/Adjusting-the-HTML-content-size-in-PDF-document/.NET/Adjusting-the-HTML-content-size-in-PDF-document/Program.cs b/HTML to PDF/Blink/Adjusting-the-HTML-content-size-in-PDF-document/.NET/Adjusting-the-HTML-content-size-in-PDF-document/Program.cs index e9b4de1d..4a6648ee 100644 --- a/HTML to PDF/Blink/Adjusting-the-HTML-content-size-in-PDF-document/.NET/Adjusting-the-HTML-content-size-in-PDF-document/Program.cs +++ b/HTML to PDF/Blink/Adjusting-the-HTML-content-size-in-PDF-document/.NET/Adjusting-the-HTML-content-size-in-PDF-document/Program.cs @@ -10,12 +10,6 @@ //Create blink converter settings. BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - //Set command line arugument to run without the sandbox. - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} //Set Blink viewport size. blinkConverterSettings.ViewPortSize = new Size(800, 0); diff --git a/HTML to PDF/Blink/Convert-HTML-form-to-PDF-fillable-form/.NET/Convert-HTML-form-to-PDF-fillable-form/Program.cs b/HTML to PDF/Blink/Convert-HTML-form-to-PDF-fillable-form/.NET/Convert-HTML-form-to-PDF-fillable-form/Program.cs index 2ec26666..5015b59d 100644 --- a/HTML to PDF/Blink/Convert-HTML-form-to-PDF-fillable-form/.NET/Convert-HTML-form-to-PDF-fillable-form/Program.cs +++ b/HTML to PDF/Blink/Convert-HTML-form-to-PDF-fillable-form/.NET/Convert-HTML-form-to-PDF-fillable-form/Program.cs @@ -10,12 +10,6 @@ //Create blink converter settings. BlinkConverterSettings settings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - //Set command line arugument to run without the sandbox. - settings.CommandLineArguments.Add("--no-sandbox"); - settings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} //Set enable form. settings.EnableForm = true; diff --git a/HTML to PDF/Blink/Convert-HTML-to-PDF-in-offline-mode/.NET/Convert-HTML-to-PDF-in-offline-mode/Program.cs b/HTML to PDF/Blink/Convert-HTML-to-PDF-in-offline-mode/.NET/Convert-HTML-to-PDF-in-offline-mode/Program.cs index 4af43350..c828f613 100644 --- a/HTML to PDF/Blink/Convert-HTML-to-PDF-in-offline-mode/.NET/Convert-HTML-to-PDF-in-offline-mode/Program.cs +++ b/HTML to PDF/Blink/Convert-HTML-to-PDF-in-offline-mode/.NET/Convert-HTML-to-PDF-in-offline-mode/Program.cs @@ -9,12 +9,6 @@ //Initialize blink converter settings. BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - //Set command line arugument to run without the sandbox. - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} //Enable offline mode. blinkConverterSettings.EnableOfflineMode = true; diff --git a/HTML to PDF/Blink/Convert-form-authenticated-webpage-to-PDF-document/.NET/Convert-form-authenticated-webpage-to-PDF-document/Program.cs b/HTML to PDF/Blink/Convert-form-authenticated-webpage-to-PDF-document/.NET/Convert-form-authenticated-webpage-to-PDF-document/Program.cs index 45f7a709..a2089029 100644 --- a/HTML to PDF/Blink/Convert-form-authenticated-webpage-to-PDF-document/.NET/Convert-form-authenticated-webpage-to-PDF-document/Program.cs +++ b/HTML to PDF/Blink/Convert-form-authenticated-webpage-to-PDF-document/.NET/Convert-form-authenticated-webpage-to-PDF-document/Program.cs @@ -10,12 +10,6 @@ //Initialize blink converter settings. BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - //Set command line arugument to run without the sandbox. - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} //Add cookies as name and value pair. blinkConverterSettings.Cookies.Add("CookieName1", "CookieValue1"); blinkConverterSettings.Cookies.Add("CookieName2", "CookieValue2"); diff --git a/HTML to PDF/Blink/Convert-partial-webpage-to-PDF-document/.NET/Convert-partial-webpage-to-PDF-document/Program.cs b/HTML to PDF/Blink/Convert-partial-webpage-to-PDF-document/.NET/Convert-partial-webpage-to-PDF-document/Program.cs index 1ece57a1..baa45b2b 100644 --- a/HTML to PDF/Blink/Convert-partial-webpage-to-PDF-document/.NET/Convert-partial-webpage-to-PDF-document/Program.cs +++ b/HTML to PDF/Blink/Convert-partial-webpage-to-PDF-document/.NET/Convert-partial-webpage-to-PDF-document/Program.cs @@ -6,15 +6,7 @@ //Initialize the HTML to PDF converter. HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); -BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - //Set command line arugument 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 Partial webpage to PDF document. PdfDocument document = htmlConverter.ConvertPartialHtml(Path.GetFullPath(@"Data/Input.html"), "picture"); diff --git a/HTML to PDF/Blink/Convert-the-HTML-string-to-PDF-document/.NET/Convert-the-HTML-string-to-PDF-document/Program.cs b/HTML to PDF/Blink/Convert-the-HTML-string-to-PDF-document/.NET/Convert-the-HTML-string-to-PDF-document/Program.cs index 382df904..39679134 100644 --- a/HTML to PDF/Blink/Convert-the-HTML-string-to-PDF-document/.NET/Convert-the-HTML-string-to-PDF-document/Program.cs +++ b/HTML to PDF/Blink/Convert-the-HTML-string-to-PDF-document/.NET/Convert-the-HTML-string-to-PDF-document/Program.cs @@ -6,15 +6,6 @@ //Initialize HTML to PDF converter. HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); -BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - //Set command line arugument 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; //HTML string and Base URL. string htmlText = "\"Syncfusion_logo\"

Hello World

"; string baseUrl = Path.GetFullPath(@"Data/Resources/"); diff --git a/HTML to PDF/Blink/Convert-the-HTML-string-to-image-file/.NET/Convert-the-HTML-string-to-image-file/Program.cs b/HTML to PDF/Blink/Convert-the-HTML-string-to-image-file/.NET/Convert-the-HTML-string-to-image-file/Program.cs index ab340072..e58394c1 100644 --- a/HTML to PDF/Blink/Convert-the-HTML-string-to-image-file/.NET/Convert-the-HTML-string-to-image-file/Program.cs +++ b/HTML to PDF/Blink/Convert-the-HTML-string-to-image-file/.NET/Convert-the-HTML-string-to-image-file/Program.cs @@ -6,14 +6,6 @@ //Initialize HTML to PDF converter. HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); -BlinkConverterSettings settings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - settings.CommandLineArguments.Add("--no-sandbox"); - settings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} -//Assign Blink converter settings to HTML converter. -htmlConverter.ConverterSettings = settings; //HTML string and Base URL. string htmlText = "\"Syncfusion_logo\"

Hello World

"; string baseUrl = Path.GetFullPath(@"Data/Resources/"); diff --git a/HTML to PDF/Blink/Convert-token-based-authenticated-webpage-to-PDF/.NET/Convert-token-based-authenticated-webpage-to-PDF/Program.cs b/HTML to PDF/Blink/Convert-token-based-authenticated-webpage-to-PDF/.NET/Convert-token-based-authenticated-webpage-to-PDF/Program.cs index ad86231c..f5534947 100644 --- a/HTML to PDF/Blink/Convert-token-based-authenticated-webpage-to-PDF/.NET/Convert-token-based-authenticated-webpage-to-PDF/Program.cs +++ b/HTML to PDF/Blink/Convert-token-based-authenticated-webpage-to-PDF/.NET/Convert-token-based-authenticated-webpage-to-PDF/Program.cs @@ -9,11 +9,7 @@ //Initialize blink converter settings. BlinkConverterSettings settings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - settings.CommandLineArguments.Add("--no-sandbox"); - settings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} + //Add a bearer token to login a webpage. settings.HttpRequestHeaders.Add("User-Agent", "Syncfusion WebKit HTML converter"); diff --git a/HTML to PDF/Blink/Convert-website-URL-to-image-file/.NET/Convert-website-URL-to-image-file/Program.cs b/HTML to PDF/Blink/Convert-website-URL-to-image-file/.NET/Convert-website-URL-to-image-file/Program.cs index 8510cb87..e676fee7 100644 --- a/HTML to PDF/Blink/Convert-website-URL-to-image-file/.NET/Convert-website-URL-to-image-file/Program.cs +++ b/HTML to PDF/Blink/Convert-website-URL-to-image-file/.NET/Convert-website-URL-to-image-file/Program.cs @@ -6,15 +6,6 @@ //Initialize HTML to PDF converter. HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); -BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - //Set command line arugument 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 Image. Image image = htmlConverter.ConvertToImage("https://www.google.com"); diff --git a/HTML to PDF/Blink/Convert-windows-authenticated-webpage-to-PDF-document/.NET/Convert-windows-authenticated-webpage-to-PDF-document/Program.cs b/HTML to PDF/Blink/Convert-windows-authenticated-webpage-to-PDF-document/.NET/Convert-windows-authenticated-webpage-to-PDF-document/Program.cs index c6f43f37..5ce8f207 100644 --- a/HTML to PDF/Blink/Convert-windows-authenticated-webpage-to-PDF-document/.NET/Convert-windows-authenticated-webpage-to-PDF-document/Program.cs +++ b/HTML to PDF/Blink/Convert-windows-authenticated-webpage-to-PDF-document/.NET/Convert-windows-authenticated-webpage-to-PDF-document/Program.cs @@ -9,11 +9,7 @@ //Create blink converter settings. BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} + //Set username and password. blinkConverterSettings.Username = "username"; blinkConverterSettings.Password = "password"; diff --git a/HTML to PDF/Blink/Create-TOC-while-converting-HTML-to-PDF/.NET/Create-TOC-while-converting-HTML-to-PDF/Program.cs b/HTML to PDF/Blink/Create-TOC-while-converting-HTML-to-PDF/.NET/Create-TOC-while-converting-HTML-to-PDF/Program.cs index 07603d66..84ea7a43 100644 --- a/HTML to PDF/Blink/Create-TOC-while-converting-HTML-to-PDF/.NET/Create-TOC-while-converting-HTML-to-PDF/Program.cs +++ b/HTML to PDF/Blink/Create-TOC-while-converting-HTML-to-PDF/.NET/Create-TOC-while-converting-HTML-to-PDF/Program.cs @@ -9,11 +9,7 @@ //Initialize blink converter settings. BlinkConverterSettings settings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - settings.CommandLineArguments.Add("--no-sandbox"); - settings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} + //Set enable table of contents. settings.EnableToc = true; diff --git a/HTML to PDF/Blink/Create-custom-style-TOC-when-converting-HTML-to-PDF/.NET/Create-custom-style-TOC-when-converting-HTML-to-PDF/Program.cs b/HTML to PDF/Blink/Create-custom-style-TOC-when-converting-HTML-to-PDF/.NET/Create-custom-style-TOC-when-converting-HTML-to-PDF/Program.cs index 6718d1b2..e0fa46f4 100644 --- a/HTML to PDF/Blink/Create-custom-style-TOC-when-converting-HTML-to-PDF/.NET/Create-custom-style-TOC-when-converting-HTML-to-PDF/Program.cs +++ b/HTML to PDF/Blink/Create-custom-style-TOC-when-converting-HTML-to-PDF/.NET/Create-custom-style-TOC-when-converting-HTML-to-PDF/Program.cs @@ -12,11 +12,7 @@ //Initialize blink converter settings. BlinkConverterSettings settings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - settings.CommandLineArguments.Add("--no-sandbox"); - settings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} + //Set enable table of contents. settings.EnableToc = true; diff --git a/HTML to PDF/Blink/Creating-bookmarks-while-converting-HTML-to-PDF/.NET/Creating-bookmarks-while-converting-HTML-to-PDF/Program.cs b/HTML to PDF/Blink/Creating-bookmarks-while-converting-HTML-to-PDF/.NET/Creating-bookmarks-while-converting-HTML-to-PDF/Program.cs index dca5d8bd..c3c914ac 100644 --- a/HTML to PDF/Blink/Creating-bookmarks-while-converting-HTML-to-PDF/.NET/Creating-bookmarks-while-converting-HTML-to-PDF/Program.cs +++ b/HTML to PDF/Blink/Creating-bookmarks-while-converting-HTML-to-PDF/.NET/Creating-bookmarks-while-converting-HTML-to-PDF/Program.cs @@ -9,11 +9,7 @@ //Initialize blink converter settings. BlinkConverterSettings settings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - settings.CommandLineArguments.Add("--no-sandbox"); - settings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} + //Set enable bookmarks. settings.EnableBookmarks = true; diff --git a/HTML to PDF/Blink/Disable-JavaScript-when-convert-HTML-to-PDF/.NET/Disable-JavaScript-when-convert-HTML-to-PDF/Program.cs b/HTML to PDF/Blink/Disable-JavaScript-when-convert-HTML-to-PDF/.NET/Disable-JavaScript-when-convert-HTML-to-PDF/Program.cs index 4534e776..a5adfca8 100644 --- a/HTML to PDF/Blink/Disable-JavaScript-when-convert-HTML-to-PDF/.NET/Disable-JavaScript-when-convert-HTML-to-PDF/Program.cs +++ b/HTML to PDF/Blink/Disable-JavaScript-when-convert-HTML-to-PDF/.NET/Disable-JavaScript-when-convert-HTML-to-PDF/Program.cs @@ -9,12 +9,7 @@ //Initialize blink converter settings. BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - //Set command line arugument to run without the sandbox. - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} + //Disable JavaScript; By default, true. blinkConverterSettings.EnableJavaScript = false; diff --git a/HTML to PDF/Blink/Disable-URL-links-while-converting-HTML-to-PDF/.NET/Disable-URL-links-while-converting-HTML-to-PDF/Program.cs b/HTML to PDF/Blink/Disable-URL-links-while-converting-HTML-to-PDF/.NET/Disable-URL-links-while-converting-HTML-to-PDF/Program.cs index 61fcc8d0..e068cfb3 100644 --- a/HTML to PDF/Blink/Disable-URL-links-while-converting-HTML-to-PDF/.NET/Disable-URL-links-while-converting-HTML-to-PDF/Program.cs +++ b/HTML to PDF/Blink/Disable-URL-links-while-converting-HTML-to-PDF/.NET/Disable-URL-links-while-converting-HTML-to-PDF/Program.cs @@ -9,11 +9,7 @@ //Initialize blink converter settings. BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} + //Enable hyperlinks; By default - true. blinkConverterSettings.EnableHyperLink = false; diff --git a/HTML to PDF/Blink/Get-height-of-HTML-content-in-PDF/.NET/Get-height-of-HTML-content-in-PDF/Program.cs b/HTML to PDF/Blink/Get-height-of-HTML-content-in-PDF/.NET/Get-height-of-HTML-content-in-PDF/Program.cs index b5037d3c..d5fdcb26 100644 --- a/HTML to PDF/Blink/Get-height-of-HTML-content-in-PDF/.NET/Get-height-of-HTML-content-in-PDF/Program.cs +++ b/HTML to PDF/Blink/Get-height-of-HTML-content-in-PDF/.NET/Get-height-of-HTML-content-in-PDF/Program.cs @@ -8,14 +8,6 @@ //Initialize the HTML to PDF converter. HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); -BlinkConverterSettings settings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - settings.CommandLineArguments.Add("--no-sandbox"); - settings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} -//Assign Blink converter settings to HTML converter. -htmlConverter.ConverterSettings = settings; PdfLayoutResult layoutResult = null; //Convert URL to PDF document. diff --git a/HTML to PDF/Blink/HTML-Footer-Background-Colour/.NET/HTML-Footer-Background-Colour/Program.cs b/HTML to PDF/Blink/HTML-Footer-Background-Colour/.NET/HTML-Footer-Background-Colour/Program.cs index 6cdc7af5..838b2def 100644 --- a/HTML to PDF/Blink/HTML-Footer-Background-Colour/.NET/HTML-Footer-Background-Colour/Program.cs +++ b/HTML to PDF/Blink/HTML-Footer-Background-Colour/.NET/HTML-Footer-Background-Colour/Program.cs @@ -7,11 +7,6 @@ HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); //Initialize blink converter settings. BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} //Set the Blink viewport size. blinkConverterSettings.ViewPortSize = new Size(1280, 0); //Set the html margin-top value based on the html header height and margin-top value. diff --git a/HTML to PDF/Blink/HTML-Header-and-Footer/.NET/HTML-Header-and-Footer/Program.cs b/HTML to PDF/Blink/HTML-Header-and-Footer/.NET/HTML-Header-and-Footer/Program.cs index 9ea240af..c28f2f9d 100644 --- a/HTML to PDF/Blink/HTML-Header-and-Footer/.NET/HTML-Header-and-Footer/Program.cs +++ b/HTML to PDF/Blink/HTML-Header-and-Footer/.NET/HTML-Header-and-Footer/Program.cs @@ -10,11 +10,6 @@ static void Main(string[] args) { HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); //Initialize blink converter settings. BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); - if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); - } //Set the Blink viewport size. blinkConverterSettings.ViewPortSize = new Size(1280, 0); //Reade the html header and footer text from the html file or you can set html string also. diff --git a/HTML to PDF/Blink/HTML-to-PDF-Enable-Autoscaling/.NET/HTML-to-PDF-Enable-Autoscaling/Program.cs b/HTML to PDF/Blink/HTML-to-PDF-Enable-Autoscaling/.NET/HTML-to-PDF-Enable-Autoscaling/Program.cs index 3fb94a23..46026888 100644 --- a/HTML to PDF/Blink/HTML-to-PDF-Enable-Autoscaling/.NET/HTML-to-PDF-Enable-Autoscaling/Program.cs +++ b/HTML to PDF/Blink/HTML-to-PDF-Enable-Autoscaling/.NET/HTML-to-PDF-Enable-Autoscaling/Program.cs @@ -6,16 +6,8 @@ HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); // Initialize BlinkConverterSettings to configure the Blink rendering engine. BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - //Set command line arugument to run without the sandbox. - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} - // Enables automatic scaling to adjust the HTML content to fit the PDF's dimensions. blinkConverterSettings.EnableAutoScaling = true; - // Assigns the Blink settings to the HTML to PDF converter. htmlConverter.ConverterSettings = blinkConverterSettings; // Converts the HTML file to a PDF document, using the path of the HTML file. diff --git a/HTML to PDF/Blink/HTML-to-PDF-Header-and-footer/.NET/HTML-to-PDF-Header-and-footer/Program.cs b/HTML to PDF/Blink/HTML-to-PDF-Header-and-footer/.NET/HTML-to-PDF-Header-and-footer/Program.cs index 7b7b0c96..bc3c0d4c 100644 --- a/HTML to PDF/Blink/HTML-to-PDF-Header-and-footer/.NET/HTML-to-PDF-Header-and-footer/Program.cs +++ b/HTML to PDF/Blink/HTML-to-PDF-Header-and-footer/.NET/HTML-to-PDF-Header-and-footer/Program.cs @@ -10,11 +10,6 @@ static void Main(string[] args) { //Initialize HTML to PDF converter. HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); - if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); - } //Create PDF page template element for header with bounds. PdfPageTemplateElement header = new PdfPageTemplateElement(new RectangleF(0, 0, blinkConverterSettings.PdfPageSize.Width, 50)); //Create font and brush for header element. diff --git a/HTML to PDF/Blink/HTML-to-PDF-margin-customization/.NET/HTML-to-PDF-margin-customization/Program.cs b/HTML to PDF/Blink/HTML-to-PDF-margin-customization/.NET/HTML-to-PDF-margin-customization/Program.cs index 6703d8ae..7e3f7dd5 100644 --- a/HTML to PDF/Blink/HTML-to-PDF-margin-customization/.NET/HTML-to-PDF-margin-customization/Program.cs +++ b/HTML to PDF/Blink/HTML-to-PDF-margin-customization/.NET/HTML-to-PDF-margin-customization/Program.cs @@ -9,11 +9,6 @@ static void Main(string[] args) { HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); //Initialize blink converter settings. BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); - if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); - } //Set the margin. blinkConverterSettings.Margin.All = 50; //Assign Blink converter settings to HTML converter. diff --git a/HTML to PDF/Blink/HTML-to-PDF-page-orientation-customization/.NET/HTML-to-PDF-page-orientation-customization/Program.cs b/HTML to PDF/Blink/HTML-to-PDF-page-orientation-customization/.NET/HTML-to-PDF-page-orientation-customization/Program.cs index 111b7e23..8d310a91 100644 --- a/HTML to PDF/Blink/HTML-to-PDF-page-orientation-customization/.NET/HTML-to-PDF-page-orientation-customization/Program.cs +++ b/HTML to PDF/Blink/HTML-to-PDF-page-orientation-customization/.NET/HTML-to-PDF-page-orientation-customization/Program.cs @@ -9,11 +9,6 @@ static void Main(string[] args) { HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); //Initialize blink converter settings. BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); - if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); - } //Set the Orientation. blinkConverterSettings.Orientation = PdfPageOrientation.Landscape; //Assign Blink converter settings to HTML converter. diff --git a/HTML to PDF/Blink/HTML-to-PDF-page-size-customization/.NET/HTML-to-PDF-page-size-customization/Program.cs b/HTML to PDF/Blink/HTML-to-PDF-page-size-customization/.NET/HTML-to-PDF-page-size-customization/Program.cs index 5d09475c..9747d6ea 100644 --- a/HTML to PDF/Blink/HTML-to-PDF-page-size-customization/.NET/HTML-to-PDF-page-size-customization/Program.cs +++ b/HTML to PDF/Blink/HTML-to-PDF-page-size-customization/.NET/HTML-to-PDF-page-size-customization/Program.cs @@ -9,11 +9,6 @@ static void Main(string[] args) { HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); //Initialize blink converter settings. BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); - if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); - } //Set the page size. blinkConverterSettings.PdfPageSize = PdfPageSize.A4; //Assign Blink converter settings to HTML converter. diff --git a/HTML to PDF/Blink/HTML-to-PDF-rotate-page/.NET/HTML-to-PDF-rotate-page/Program.cs b/HTML to PDF/Blink/HTML-to-PDF-rotate-page/.NET/HTML-to-PDF-rotate-page/Program.cs index 2e588884..263468b6 100644 --- a/HTML to PDF/Blink/HTML-to-PDF-rotate-page/.NET/HTML-to-PDF-rotate-page/Program.cs +++ b/HTML to PDF/Blink/HTML-to-PDF-rotate-page/.NET/HTML-to-PDF-rotate-page/Program.cs @@ -9,11 +9,6 @@ static void Main(string[] args) { HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); //Initialize blink converter settings. BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); - if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); - } //Set the page rotate. blinkConverterSettings.PageRotateAngle = PdfPageRotateAngle.RotateAngle90; //Assign Blink converter settings to the HTML converter. diff --git a/HTML to PDF/Blink/HTML-to-PDF-scale-property/.NET/Scale_property_in_HTML_converter/Program.cs b/HTML to PDF/Blink/HTML-to-PDF-scale-property/.NET/Scale_property_in_HTML_converter/Program.cs index 62964522..89b3198a 100644 --- a/HTML to PDF/Blink/HTML-to-PDF-scale-property/.NET/Scale_property_in_HTML_converter/Program.cs +++ b/HTML to PDF/Blink/HTML-to-PDF-scale-property/.NET/Scale_property_in_HTML_converter/Program.cs @@ -7,11 +7,6 @@ HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); //Initialize blink converter settings. BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} //Set the Scale. blinkConverterSettings.Scale = 1.0f; //Assign Blink converter settings to HTML converter. diff --git a/HTML to PDF/Blink/Image_Background_In_HTML_to_PDF/.NET/Image_Background_In_HTML_to_PDF/Program.cs b/HTML to PDF/Blink/Image_Background_In_HTML_to_PDF/.NET/Image_Background_In_HTML_to_PDF/Program.cs index 1a5285e7..435ba162 100644 --- a/HTML to PDF/Blink/Image_Background_In_HTML_to_PDF/.NET/Image_Background_In_HTML_to_PDF/Program.cs +++ b/HTML to PDF/Blink/Image_Background_In_HTML_to_PDF/.NET/Image_Background_In_HTML_to_PDF/Program.cs @@ -9,11 +9,6 @@ //Initialize the BlinkConverterSettings BlinkConverterSettings settings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - settings.CommandLineArguments.Add("--no-sandbox"); - settings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} //Set the Image Background color. settings.ImageBackgroundColor = Color.Transparent; diff --git a/HTML to PDF/Blink/Inject_custom_CSS_to_HTML/.NET/Inject_custom_CSS_to_HTML/Program.cs b/HTML to PDF/Blink/Inject_custom_CSS_to_HTML/.NET/Inject_custom_CSS_to_HTML/Program.cs index b020c753..0bd2b8f6 100644 --- a/HTML to PDF/Blink/Inject_custom_CSS_to_HTML/.NET/Inject_custom_CSS_to_HTML/Program.cs +++ b/HTML to PDF/Blink/Inject_custom_CSS_to_HTML/.NET/Inject_custom_CSS_to_HTML/Program.cs @@ -8,11 +8,6 @@ //Initialize the HTML to PDF converter. HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} //Set the Blink viewport size. blinkConverterSettings.ViewPortSize = new Size(1280, 0); blinkConverterSettings.Margin.All = 30; diff --git a/HTML to PDF/Blink/Inject_custom_JavaScript_to_HTML/.NET/Inject_custom_JavaScript_to_HTML/Program.cs b/HTML to PDF/Blink/Inject_custom_JavaScript_to_HTML/.NET/Inject_custom_JavaScript_to_HTML/Program.cs index 6810aec6..ed81a24b 100644 --- a/HTML to PDF/Blink/Inject_custom_JavaScript_to_HTML/.NET/Inject_custom_JavaScript_to_HTML/Program.cs +++ b/HTML to PDF/Blink/Inject_custom_JavaScript_to_HTML/.NET/Inject_custom_JavaScript_to_HTML/Program.cs @@ -11,11 +11,6 @@ //Initialize the blink converter settings. BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} //Set the Blink viewport size. blinkConverterSettings.ViewPortSize = new Size(1280, 0); blinkConverterSettings.Margin.All = 30; diff --git a/HTML to PDF/Blink/Optimize-HTML-to-PDF-performance/.NET/Optimize-HTML-to-PDF-performance/Program.cs b/HTML to PDF/Blink/Optimize-HTML-to-PDF-performance/.NET/Optimize-HTML-to-PDF-performance/Program.cs index 796f5f73..6a4e6b18 100644 --- a/HTML to PDF/Blink/Optimize-HTML-to-PDF-performance/.NET/Optimize-HTML-to-PDF-performance/Program.cs +++ b/HTML to PDF/Blink/Optimize-HTML-to-PDF-performance/.NET/Optimize-HTML-to-PDF-performance/Program.cs @@ -19,11 +19,6 @@ { //Initialize the blink converter settings. BlinkConverterSettings settings = new BlinkConverterSettings(); - if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) - { - settings.CommandLineArguments.Add("--no-sandbox"); - settings.CommandLineArguments.Add("--disable-setuid-sandbox"); - } settings.AdditionalDelay = 1000; settings.EnableJavaScript = true; //Assign the settings to HTML converter. diff --git a/HTML to PDF/Blink/Selection-of-media-type-while-converting-HTML-to-PDF/.NET/Selection-of-media-type-while-converting-HTML-to-PDF/Program.cs b/HTML to PDF/Blink/Selection-of-media-type-while-converting-HTML-to-PDF/.NET/Selection-of-media-type-while-converting-HTML-to-PDF/Program.cs index 5d531393..278fb11b 100644 --- a/HTML to PDF/Blink/Selection-of-media-type-while-converting-HTML-to-PDF/.NET/Selection-of-media-type-while-converting-HTML-to-PDF/Program.cs +++ b/HTML to PDF/Blink/Selection-of-media-type-while-converting-HTML-to-PDF/.NET/Selection-of-media-type-while-converting-HTML-to-PDF/Program.cs @@ -10,12 +10,6 @@ //Create blink converter settings. BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} - //Set print media type. blinkConverterSettings.MediaType = MediaType.Screen; diff --git a/HTML to PDF/Blink/Set-additional-delay-while-converting-HTML-to-PDF/.NET/Set-additional-delay-while-converting-HTML-to-PDF/Program.cs b/HTML to PDF/Blink/Set-additional-delay-while-converting-HTML-to-PDF/.NET/Set-additional-delay-while-converting-HTML-to-PDF/Program.cs index 2127f89d..98b315e3 100644 --- a/HTML to PDF/Blink/Set-additional-delay-while-converting-HTML-to-PDF/.NET/Set-additional-delay-while-converting-HTML-to-PDF/Program.cs +++ b/HTML to PDF/Blink/Set-additional-delay-while-converting-HTML-to-PDF/.NET/Set-additional-delay-while-converting-HTML-to-PDF/Program.cs @@ -10,12 +10,6 @@ //Initialize blink converter settings. BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} - // Set additional delay; units in milliseconds. blinkConverterSettings.AdditionalDelay = 3000; diff --git a/HTML to PDF/Blink/Set-temporary-path-while-converting-HTML-to-PDF/.NET/Set-temporary-path-while-converting-HTML-to-PDF/Program.cs b/HTML to PDF/Blink/Set-temporary-path-while-converting-HTML-to-PDF/.NET/Set-temporary-path-while-converting-HTML-to-PDF/Program.cs index c5c865a1..6a710c17 100644 --- a/HTML to PDF/Blink/Set-temporary-path-while-converting-HTML-to-PDF/.NET/Set-temporary-path-while-converting-HTML-to-PDF/Program.cs +++ b/HTML to PDF/Blink/Set-temporary-path-while-converting-HTML-to-PDF/.NET/Set-temporary-path-while-converting-HTML-to-PDF/Program.cs @@ -10,12 +10,6 @@ //Set blink converter settings. BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} - //Set Temporary Path to generate temporary files. blinkConverterSettings.TempPath = @"D:/HtmlConversion/Temp/"; diff --git a/HTML to PDF/Blink/Set-windows-status-while-converting-HTML-to-PDF/.NET/Set-windows-status-while-converting-HTML-to-PDF/Program.cs b/HTML to PDF/Blink/Set-windows-status-while-converting-HTML-to-PDF/.NET/Set-windows-status-while-converting-HTML-to-PDF/Program.cs index 92b206ad..80d64e7f 100644 --- a/HTML to PDF/Blink/Set-windows-status-while-converting-HTML-to-PDF/.NET/Set-windows-status-while-converting-HTML-to-PDF/Program.cs +++ b/HTML to PDF/Blink/Set-windows-status-while-converting-HTML-to-PDF/.NET/Set-windows-status-while-converting-HTML-to-PDF/Program.cs @@ -10,12 +10,6 @@ //Create blink converter settings. BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} - //Set windows status. blinkConverterSettings.WindowStatus = "completed"; diff --git a/HTML to PDF/Blink/Set_blink_path_in_HTML_to_PDF/.NET/Set_blink_path_in_HTML_to_PDF/Program.cs b/HTML to PDF/Blink/Set_blink_path_in_HTML_to_PDF/.NET/Set_blink_path_in_HTML_to_PDF/Program.cs index 7a3b6117..91d11f57 100644 --- a/HTML to PDF/Blink/Set_blink_path_in_HTML_to_PDF/.NET/Set_blink_path_in_HTML_to_PDF/Program.cs +++ b/HTML to PDF/Blink/Set_blink_path_in_HTML_to_PDF/.NET/Set_blink_path_in_HTML_to_PDF/Program.cs @@ -7,11 +7,6 @@ //Initialize HTML to PDF converter. HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} //Set Blink binaries path. blinkConverterSettings.BlinkPath = @"../../../BlinkBinaries/"; //Assign Blink converter settings to HTML converter. diff --git a/HTML to PDF/Blink/Time-out-support-in-HTML-to-PDF/.NET/Time-out-support-in-HTML-to-PDF/Program.cs b/HTML to PDF/Blink/Time-out-support-in-HTML-to-PDF/.NET/Time-out-support-in-HTML-to-PDF/Program.cs index 311d045e..eaf5dff1 100644 --- a/HTML to PDF/Blink/Time-out-support-in-HTML-to-PDF/.NET/Time-out-support-in-HTML-to-PDF/Program.cs +++ b/HTML to PDF/Blink/Time-out-support-in-HTML-to-PDF/.NET/Time-out-support-in-HTML-to-PDF/Program.cs @@ -7,11 +7,6 @@ HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter(); //Initialize the blink converter settings. BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings(); -if (RuntimeInformation.IsOSPlatform(OSPlatform.Linux)) -{ - blinkConverterSettings.CommandLineArguments.Add("--no-sandbox"); - blinkConverterSettings.CommandLineArguments.Add("--disable-setuid-sandbox"); -} // Set the conversion timeout to 5000 milliseconds blinkConverterSettings.ConversionTimeout = 5000; //Assign Blink converter settings to HTML converter