File tree Expand file tree Collapse file tree
HTML to PDF/Blink/Convert-website-URL-to-PDF-document/.NET/Convert-website-URL-to-PDF-document Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33using Syncfusion . HtmlConverter ;
44using Syncfusion . Pdf ;
5- using System . Runtime . InteropServices ;
65
76//Initialize HTML to PDF converter.
87HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter ( ) ;
98//Create blink converter settings
109BlinkConverterSettings 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.
1917htmlConverter . ConverterSettings = blinkConverterSettings ;
2018//Convert URL to PDF document.
2624 document . Save ( fileStream ) ;
2725}
2826//Close the document.
29- document . Close ( true ) ;
27+ document . Close ( true ) ;
You can’t perform that action at this time.
0 commit comments