|
The following example shows the effect that this parameter has
on HTML rendering.
using var doc = new Doc();
string uri = "https://photojournal.jpl.nasa.gov/catalog/PIA24312";
// Set minimum number of items a page of HTML should contain.
// Otherwise the page will be assumed to be invalid.
doc.HtmlOptions.ContentCount = 20;
// Try to obtain html page up to 11 times
doc.HtmlOptions.RetryCount = 10;
// The page must be obtained in less then 10 seconds
doc.HtmlOptions.Timeout = 10000;
try {
doc.AddImageUrl(uri);
}
catch {
// Page couldn't be loaded
}
// Save the document
doc.Save(Server.MapPath("HtmlOptionsRetryCount.pdf"));
Using doc As New Doc()
Dim theURL As String = "https://photojournal.jpl.nasa.gov/catalog/PIA24312"
' Set minimum number of items a page of HTML should contain.
' Otherwise the page will be assumed to be invalid.
doc.HtmlOptions.ContentCount = 20
' Try to obtain html page up to 11 times
doc.HtmlOptions.RetryCount = 10
' The page must be obtained in less then 10 seconds
doc.HtmlOptions.Timeout = 10000
Try
doc.AddImageUrl(theURL)
' Page couldn't be loaded
Catch
End Try
' Save the document
doc.Save(Server.MapPath("HtmlOptionsRetryCount.pdf"))
End Using

HtmlOptionsRetryCount.pdf
Also see example code in:
WebPageOperation Doc Property.
|