The following example shows the effect that this parameter has
on HTML rendering.
[C#]
Doc theDoc = 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 changes frequently
// and may include other opaque elements which may obscure our blue rectangle.
string theURL = "http://www.usa.gov/";
// Add some content
theDoc.Color.String = "0 255 255"; // light blue
theDoc.FillRect(200, 200);
// Hide the background of the HTML page so content shows through
theDoc.HtmlOptions.HideBackground = true;
theDoc.AddImageUrl(theURL);
// Save the document
theDoc.Save(Server.MapPath("HtmlOptionsHideBackground.pdf"));
theDoc.Clear();
[Visual Basic]
Dim theDoc As 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 changes frequently
' and may include other opaque elements which may obscure our blue rectangle.
Dim theURL As String = "http://www.usa.gov/"
' Add some content
theDoc.Color.String = "0 255 255" ' light blue
theDoc.FillRect(200, 200)
' Hide the background of the HTML page so content shows through
theDoc.HtmlOptions.HideBackground = True
theDoc.AddImageUrl(theURL)
' Save the document
theDoc.Save(Server.MapPath("HtmlOptionsHideBackground.pdf"))
theDoc.Clear()
HtmlOptionsHideBackground.pdf
|