[]
        
(Showing Draft Content)

GrapeCity.Documents.Drawing.GcBitmapGraphicsExt.DrawHtml

DrawHtml Method

DrawHtml(GcBitmapGraphics, GcHtmlBrowser, string, float, float, HtmlToImageFormat, out SizeF, bool)

Draws an HTML string on this GcBitmapGraphics at a specified position.

Declaration
public static bool DrawHtml(this GcBitmapGraphics graphics, GcHtmlBrowser browser, string html, float x, float y, HtmlToImageFormat format, out SizeF size, bool loadLazyImages = false)
Public Shared Function DrawHtml(graphics As GcBitmapGraphics, browser As GcHtmlBrowser, html As String, x As Single, y As Single, format As HtmlToImageFormat, ByRef size As SizeF, Optional loadLazyImages As Boolean = False) As Boolean
Parameters
Type Name Description
GcBitmapGraphics graphics

The target GcBitmapGraphics object.

GcHtmlBrowser browser

An instance of GcHtmlBrowser object.

string html

The HTML string to draw.

float x

The x-coordinate at which to draw the HTML block.

float y

The y-coordinate at which to draw the HTML block.

HtmlToImageFormat format

The formatting attributes.

SizeF size

OUT: the size of the rendered HTML block.

bool loadLazyImages

Whether to scroll the page down to the end to force pending images to load.

Returns
Type Description
bool

True if the drawn block is not empty, false otherwise.

DrawHtml(GcBitmapGraphics, string, float, float, HtmlToImageFormat, out SizeF, int, string, string)

Draws an HTML string on this GcBitmapGraphics at a specified position.

Declaration
[Obsolete("Use the DrawHtml method override accepting GcHtmlBrowser as a parameter instead.")]
public static bool DrawHtml(this GcBitmapGraphics graphics, string html, float x, float y, HtmlToImageFormat format, out SizeF size, int virtualTimeBudget = 0, string authServerWhitelist = null, string proxyServer = null)
<Obsolete("Use the DrawHtml method override accepting GcHtmlBrowser as a parameter instead.")>
Public Shared Function DrawHtml(graphics As GcBitmapGraphics, html As String, x As Single, y As Single, format As HtmlToImageFormat, ByRef size As SizeF, Optional virtualTimeBudget As Integer = 0, Optional authServerWhitelist As String = Nothing, Optional proxyServer As String = Nothing) As Boolean
Parameters
Type Name Description
GcBitmapGraphics graphics

The target GcBitmapGraphics object.

string html

The HTML string to draw.

float x

The x-coordinate at which to draw the HTML block.

float y

The y-coordinate at which to draw the HTML block.

HtmlToImageFormat format

The formatting attributes.

SizeF size

OUT: the size of the rendered HTML block.

int virtualTimeBudget

The number of milliseconds to wait before deeming the page to be ready.

string authServerWhitelist

A whitelist for Negotiate Auth servers, such as "*example.com".

string proxyServer

A proxy server, such as "https://proxy-ip:proxy-port".

Returns
Type Description
bool

True if the drawn block is not empty, false otherwise.

DrawHtml(GcBitmapGraphics, GcHtmlBrowser, Uri, float, float, HtmlToImageFormat, out SizeF, bool)

Draws an HTML page provided by an URI on this GcBitmapGraphics at a specified position.

Declaration
public static bool DrawHtml(this GcBitmapGraphics graphics, GcHtmlBrowser browser, Uri htmlUri, float x, float y, HtmlToImageFormat format, out SizeF size, bool loadLazyImages = false)
Public Shared Function DrawHtml(graphics As GcBitmapGraphics, browser As GcHtmlBrowser, htmlUri As Uri, x As Single, y As Single, format As HtmlToImageFormat, ByRef size As SizeF, Optional loadLazyImages As Boolean = False) As Boolean
Parameters
Type Name Description
GcBitmapGraphics graphics

The target GcBitmapGraphics object.

GcHtmlBrowser browser

An instance of GcHtmlBrowser object.

Uri htmlUri

The URI specifying the source HTML page.

float x

The x-coordinate at which to draw the HTML block.

float y

The y-coordinate at which to draw the HTML block.

HtmlToImageFormat format

The formatting attributes.

SizeF size

OUT: the size of the rendered HTML block.

bool loadLazyImages

Whether to scroll the page down to the end to force pending images to load.

Returns
Type Description
bool

True if the drawn block is not empty, false otherwise.

DrawHtml(GcBitmapGraphics, Uri, float, float, HtmlToImageFormat, out SizeF, int, string, string)

Draws an HTML page provided by an URI on this GcBitmapGraphics at a specified position.

Declaration
[Obsolete("Use the DrawHtml method override accepting GcHtmlBrowser as a parameter instead.")]
public static bool DrawHtml(this GcBitmapGraphics graphics, Uri htmlUri, float x, float y, HtmlToImageFormat format, out SizeF size, int virtualTimeBudget = 0, string authServerWhitelist = null, string proxyServer = null)
<Obsolete("Use the DrawHtml method override accepting GcHtmlBrowser as a parameter instead.")>
Public Shared Function DrawHtml(graphics As GcBitmapGraphics, htmlUri As Uri, x As Single, y As Single, format As HtmlToImageFormat, ByRef size As SizeF, Optional virtualTimeBudget As Integer = 0, Optional authServerWhitelist As String = Nothing, Optional proxyServer As String = Nothing) As Boolean
Parameters
Type Name Description
GcBitmapGraphics graphics

The target GcBitmapGraphics object.

Uri htmlUri

The URI specifying the source HTML page.

float x

The x-coordinate at which to draw the HTML block.

float y

The y-coordinate at which to draw the HTML block.

HtmlToImageFormat format

The formatting attributes.

SizeF size

OUT: the size of the rendered HTML block.

int virtualTimeBudget

The number of milliseconds to wait before deeming the page to be ready.

string authServerWhitelist

A whitelist for Negotiate Auth servers, such as "*example.com".

string proxyServer

A proxy server, such as "https://proxy-ip:proxy-port".

Returns
Type Description
bool

True if the drawn block is not empty, false otherwise.