You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: File-Formats/PDF/Convert-HTML-To-PDF/features.md
+56-1Lines changed: 56 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2132,4 +2132,59 @@ Refer to the following code snippet to resize the page content size.
2132
2132
2133
2133
{% endtabs %}
2134
2134
2135
-
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/HTML%20to%20PDF/Blink/HTML-to-PDF-scale-property).
2135
+
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/HTML%20to%20PDF/Blink/HTML-to-PDF-scale-property).
2136
+
2137
+
2138
+
## Timeout
2139
+
2140
+
HTML content being converted takes a long time to render or convert into a PDF can be achieved through the utilization of the Timeout property of Blink in HTML Converter.
2141
+
2142
+
Refer to the following code snippet to set the timeout for HTML to PDF conversion.
2143
+
2144
+
{% tabs %}
2145
+
2146
+
{% highlight c# tabtitle="C# [Cross-platform]" %}
2147
+
2148
+
//Initialize the HTML to PDF converter.
2149
+
HtmlToPdfConverter htmlConverter = new HtmlToPdfConverter();
2150
+
//Initialize the blink converter settings.
2151
+
BlinkConverterSettings blinkConverterSettings = new BlinkConverterSettings();
2152
+
// Set the conversion timeout to 5000 milliseconds
2153
+
blinkConverterSettings.ConversionTimeout = 5000;
2154
+
//Assign Blink converter settings to HTML converter
Dim document As PdfDocument = htmlConverter.Convert("https://www.google.com")
2179
+
'Create a file stream.
2180
+
Dim fileStream As New FileStream("HTML-to-PDF.pdf", FileMode.CreateNew, FileAccess.ReadWrite)
2181
+
'Save and close the PDF document.
2182
+
document.Save(fileStream)
2183
+
'Close the document.
2184
+
document.Close(True)
2185
+
2186
+
{% endhighlight %}
2187
+
2188
+
{% endtabs %}
2189
+
2190
+
You can download a complete working sample from [GitHub](https://github.com/SyncfusionExamples/PDF-Examples/tree/master/HTML%20to%20PDF/Blink/Time-out-support-in-HTML-to-PDF/.NET).
0 commit comments