The following example shows the effect that this parameter has
on HTML rendering.
using var doc = new Doc();
// Please note that the URL below is included for demonstration purposes only.
// In your code you should use your own URL. The site at the URL below
// may include other opaque elements which may obscure our blue rectangle.
string url = "https://www.websupergoo.com/";
// Add some content
doc.Color.String = "0 255 255"; // light blue
doc.FillRect(200, 200);
// Hide the background of the HTML page so content shows through
doc.HtmlOptions.HideBackground = true;
doc.AddImageUrl(url);
// Save the document
doc.Save(Server.MapPath("HtmlOptionsHideBackground.pdf"));
Using doc As New Doc()
' Please note that the URL below is included for demonstration purposes only.
' In your code you should use your own URL. The site at the URL below
' may include other opaque elements which may obscure our blue rectangle.
Dim theURL As String = "https://www.websupergoo.com/"
' Add some content
doc.Color.String = "0 255 255"
' light blue
doc.FillRect(200, 200)
' Hide the background of the HTML page so content shows through
doc.HtmlOptions.HideBackground = True
doc.AddImageUrl(theURL)
' Save the document
doc.Save(Server.MapPath("HtmlOptionsHideBackground.pdf"))
End Using