File tree Expand file tree Collapse file tree 38 files changed +8
-226
lines changed
Access-a-webpage-using-HTTP-GET/.NET/Access-a-webpage-using-HTTP-GET
Access-a-webpage-using-HTTP-POST/.NET/Access-a-webpage-using-HTTP-POST
Accessible_PDF_In_HTML_to_PDF/.NET/Accessible PDF
Adjusting-the-HTML-content-size-in-PDF-document/.NET/Adjusting-the-HTML-content-size-in-PDF-document
Convert-HTML-form-to-PDF-fillable-form/.NET/Convert-HTML-form-to-PDF-fillable-form
Convert-HTML-to-PDF-in-offline-mode/.NET/Convert-HTML-to-PDF-in-offline-mode
Convert-form-authenticated-webpage-to-PDF-document/.NET/Convert-form-authenticated-webpage-to-PDF-document
Convert-partial-webpage-to-PDF-document/.NET/Convert-partial-webpage-to-PDF-document
Convert-the-HTML-string-to-PDF-document/.NET/Convert-the-HTML-string-to-PDF-document
Convert-the-HTML-string-to-image-file/.NET/Convert-the-HTML-string-to-image-file
Convert-token-based-authenticated-webpage-to-PDF/.NET/Convert-token-based-authenticated-webpage-to-PDF
Convert-website-URL-to-image-file/.NET/Convert-website-URL-to-image-file
Convert-windows-authenticated-webpage-to-PDF-document/.NET/Convert-windows-authenticated-webpage-to-PDF-document
Create-TOC-while-converting-HTML-to-PDF/.NET/Create-TOC-while-converting-HTML-to-PDF
Create-custom-style-TOC-when-converting-HTML-to-PDF/.NET/Create-custom-style-TOC-when-converting-HTML-to-PDF
Creating-bookmarks-while-converting-HTML-to-PDF/.NET/Creating-bookmarks-while-converting-HTML-to-PDF
Disable-JavaScript-when-convert-HTML-to-PDF/.NET/Disable-JavaScript-when-convert-HTML-to-PDF
Disable-URL-links-while-converting-HTML-to-PDF/.NET/Disable-URL-links-while-converting-HTML-to-PDF
Get-height-of-HTML-content-in-PDF/.NET/Get-height-of-HTML-content-in-PDF
HTML-Header-and-Footer/.NET/HTML-Header-and-Footer
HTML-to-PDF-Enable-Autoscaling/.NET/HTML-to-PDF-Enable-Autoscaling
HTML-to-PDF-Header-and-footer/.NET/HTML-to-PDF-Header-and-footer
HTML-to-PDF-margin-customization/.NET/HTML-to-PDF-margin-customization
HTML-to-PDF-page-orientation-customization/.NET/HTML-to-PDF-page-orientation-customization
HTML-to-PDF-page-size-customization/.NET/HTML-to-PDF-page-size-customization
HTML-to-PDF-rotate-page/.NET/HTML-to-PDF-rotate-page
HTML-to-PDF-scale-property/.NET/Scale_property_in_HTML_converter
Image_Background_In_HTML_to_PDF/.NET/Image_Background_In_HTML_to_PDF
Inject_custom_CSS_to_HTML/.NET/Inject_custom_CSS_to_HTML
Inject_custom_JavaScript_to_HTML/.NET/Inject_custom_JavaScript_to_HTML
Optimize-HTML-to-PDF-performance/.NET/Optimize-HTML-to-PDF-performance
Selection-of-media-type-while-converting-HTML-to-PDF/.NET/Selection-of-media-type-while-converting-HTML-to-PDF
Set-additional-delay-while-converting-HTML-to-PDF/.NET/Set-additional-delay-while-converting-HTML-to-PDF
Set-temporary-path-while-converting-HTML-to-PDF/.NET/Set-temporary-path-while-converting-HTML-to-PDF
Set-windows-status-while-converting-HTML-to-PDF/.NET/Set-windows-status-while-converting-HTML-to-PDF
Set_blink_path_in_HTML_to_PDF/.NET/Set_blink_path_in_HTML_to_PDF
Time-out-support-in-HTML-to-PDF/.NET/Time-out-support-in-HTML-to-PDF Expand file tree Collapse file tree 38 files changed +8
-226
lines changed Original file line number Diff line number Diff line change 66
77//Initialize the HTML to PDF converter.
88HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter ( ) ;
9- BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings ( ) ;
10- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
11- {
12- //Set command line arugument to run without the sandbox.
13- blinkConverterSettings . CommandLineArguments . Add ( "--no-sandbox" ) ;
14- blinkConverterSettings . CommandLineArguments . Add ( "--disable-setuid-sandbox" ) ;
15- }
16- //Assign Blink converter settings to HTML converter.
17- htmlConverter . ConverterSettings = blinkConverterSettings ;
189
1910//Set the URL.
2011string url = "https://www.example.com" ;
Original file line number Diff line number Diff line change 99
1010//Initialize blink converter settings.
1111BlinkConverterSettings settings = new BlinkConverterSettings ( ) ;
12- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
13- {
14- //Set command line arugument to run without the sandbox.
15- settings . CommandLineArguments . Add ( "--no-sandbox" ) ;
16- settings . CommandLineArguments . Add ( "--disable-setuid-sandbox" ) ;
17- }
1812//Add HTTP post parameters to HttpPostFields.
1913settings . HttpPostFields . Add ( "firstName" , "Andrew" ) ;
2014settings . HttpPostFields . Add ( "lastName" , "Fuller" ) ;
Original file line number Diff line number Diff line change 66HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter ( ) ;
77//Initialize the BlinkConverterSettings.
88BlinkConverterSettings settings = new BlinkConverterSettings ( ) ;
9- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
10- {
11- //Set command line arugument to run without the sandbox.
12- settings . CommandLineArguments . Add ( "--no-sandbox" ) ;
13- settings . CommandLineArguments . Add ( "--disable-setuid-sandbox" ) ;
14- }
159//Set true to enable the accessibility tags in PDF generation.
1610settings . EnableAccessibilityTags = true ;
1711//Assign the BlinkConverterSettings to the ConverterSettings property of HtmlToPdfConverter.
Original file line number Diff line number Diff line change 1010
1111//Create blink converter settings.
1212BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings ( ) ;
13- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
14- {
15- //Set command line arugument to run without the sandbox.
16- blinkConverterSettings . CommandLineArguments . Add ( "--no-sandbox" ) ;
17- blinkConverterSettings . CommandLineArguments . Add ( "--disable-setuid-sandbox" ) ;
18- }
1913//Set Blink viewport size.
2014blinkConverterSettings . ViewPortSize = new Size ( 800 , 0 ) ;
2115
Original file line number Diff line number Diff line change 1010
1111//Create blink converter settings.
1212BlinkConverterSettings settings = new BlinkConverterSettings ( ) ;
13- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
14- {
15- //Set command line arugument to run without the sandbox.
16- settings . CommandLineArguments . Add ( "--no-sandbox" ) ;
17- settings . CommandLineArguments . Add ( "--disable-setuid-sandbox" ) ;
18- }
1913//Set enable form.
2014settings . EnableForm = true ;
2115
Original file line number Diff line number Diff line change 99
1010//Initialize blink converter settings.
1111BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings ( ) ;
12- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
13- {
14- //Set command line arugument to run without the sandbox.
15- blinkConverterSettings . CommandLineArguments . Add ( "--no-sandbox" ) ;
16- blinkConverterSettings . CommandLineArguments . Add ( "--disable-setuid-sandbox" ) ;
17- }
1812
1913//Enable offline mode.
2014blinkConverterSettings . EnableOfflineMode = true ;
Original file line number Diff line number Diff line change 1010
1111//Initialize blink converter settings.
1212BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings ( ) ;
13- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
14- {
15- //Set command line arugument to run without the sandbox.
16- blinkConverterSettings . CommandLineArguments . Add ( "--no-sandbox" ) ;
17- blinkConverterSettings . CommandLineArguments . Add ( "--disable-setuid-sandbox" ) ;
18- }
1913//Add cookies as name and value pair.
2014blinkConverterSettings . Cookies . Add ( "CookieName1" , "CookieValue1" ) ;
2115blinkConverterSettings . Cookies . Add ( "CookieName2" , "CookieValue2" ) ;
Original file line number Diff line number Diff line change 66
77//Initialize the HTML to PDF converter.
88HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter ( ) ;
9- BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings ( ) ;
10- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
11- {
12- //Set command line arugument to run without the sandbox.
13- blinkConverterSettings . CommandLineArguments . Add ( "--no-sandbox" ) ;
14- blinkConverterSettings . CommandLineArguments . Add ( "--disable-setuid-sandbox" ) ;
15- }
16- //Assign Blink converter settings to HTML converter.
17- htmlConverter . ConverterSettings = blinkConverterSettings ;
9+
1810//Convert Partial webpage to PDF document.
1911PdfDocument document = htmlConverter . ConvertPartialHtml ( Path . GetFullPath ( @"Data/Input.html" ) , "picture" ) ;
2012
Original file line number Diff line number Diff line change 66
77//Initialize HTML to PDF converter.
88HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter ( ) ;
9- BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings ( ) ;
10- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
11- {
12- //Set command line arugument to run without the sandbox.
13- blinkConverterSettings . CommandLineArguments . Add ( "--no-sandbox" ) ;
14- blinkConverterSettings . CommandLineArguments . Add ( "--disable-setuid-sandbox" ) ;
15- }
16- //Assign Blink converter settings to HTML converter.
17- htmlConverter . ConverterSettings = blinkConverterSettings ;
189//HTML string and Base URL.
1910string htmlText = "<html><body><img src=\" syncfusion_logo.png\" alt=\" Syncfusion_logo\" width=\" 200\" height=\" 70\" ><p> Hello World</p></body></html>" ;
2011string baseUrl = Path . GetFullPath ( @"Data/Resources/" ) ;
Original file line number Diff line number Diff line change 66
77//Initialize HTML to PDF converter.
88HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter ( ) ;
9- BlinkConverterSettings settings = new BlinkConverterSettings ( ) ;
10- if ( RuntimeInformation . IsOSPlatform ( OSPlatform . Linux ) )
11- {
12- settings . CommandLineArguments . Add ( "--no-sandbox" ) ;
13- settings . CommandLineArguments . Add ( "--disable-setuid-sandbox" ) ;
14- }
15- //Assign Blink converter settings to HTML converter.
16- htmlConverter . ConverterSettings = settings ;
179//HTML string and Base URL.
1810string htmlText = "<html><body><img src=\" syncfusion_logo.png\" alt=\" Syncfusion_logo\" width=\" 200\" height=\" 70\" ><p> Hello World</p></body></html>" ;
1911string baseUrl = Path . GetFullPath ( @"Data/Resources/" ) ;
You can’t perform that action at this time.
0 commit comments