[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.GcPdfGraphicsExt.DrawHtml

DrawHtml Method

DrawHtml(GcPdfGraphics, GcHtmlBrowser, string, float, float, HtmlToPdfFormat, out SizeF, bool)

Draws an HTML string on this GrapeCity.Documents.Pdf.GcPdfGraphics at a specified position.

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

The target GrapeCity.Documents.Pdf.GcPdfGraphics 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.

HtmlToPdfFormat 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(GcPdfGraphics, string, float, float, HtmlToPdfFormat, out SizeF, int, string, string)

Draws an HTML string on this GrapeCity.Documents.Pdf.GcPdfGraphics at a specified position.

Declaration
[Obsolete("Use the DrawHtml method override accepting GcHtmlBrowser as a parameter instead.")]
public static bool DrawHtml(this GcPdfGraphics graphics, string html, float x, float y, HtmlToPdfFormat 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 GcPdfGraphics, html As String, x As Single, y As Single, format As HtmlToPdfFormat, 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
GcPdfGraphics graphics

The target GrapeCity.Documents.Pdf.GcPdfGraphics 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.

HtmlToPdfFormat 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(GcPdfGraphics, GcHtmlBrowser, Uri, float, float, HtmlToPdfFormat, out SizeF, bool)

Draws an HTML page provided by an URI on this GrapeCity.Documents.Pdf.GcPdfGraphics at a specified position.

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

The target GrapeCity.Documents.Pdf.GcPdfGraphics 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.

HtmlToPdfFormat 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(GcPdfGraphics, Uri, float, float, HtmlToPdfFormat, out SizeF, int, string, string)

Draws an HTML page provided by an URI on this GrapeCity.Documents.Pdf.GcPdfGraphics at a specified position.

Declaration
[Obsolete("Use the DrawHtml method override accepting GcHtmlBrowser as a parameter instead.")]
public static bool DrawHtml(this GcPdfGraphics graphics, Uri htmlUri, float x, float y, HtmlToPdfFormat 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 GcPdfGraphics, htmlUri As Uri, x As Single, y As Single, format As HtmlToPdfFormat, 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
GcPdfGraphics graphics

The target GrapeCity.Documents.Pdf.GcPdfGraphics 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.

HtmlToPdfFormat 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.