[]
        
(Showing Draft Content)

GrapeCity.Documents.Drawing.GcBitmapGraphicsExt

Class GcBitmapGraphicsExt

Namespace
GrapeCity.Documents.Drawing
Assembly
GcDocs.Html.dll

Provides extension methods for rendering HTML on a GcBitmapGraphics.

public static class GcBitmapGraphicsExt
Inheritance
object
GcBitmapGraphicsExt
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()

Methods

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

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

public static bool DrawHtml(this GcBitmapGraphics graphics, GcHtmlBrowser browser, string html, float x, float y, HtmlToImageFormat format, out SizeF size, bool loadLazyImages = false)

Parameters

graphics GcBitmapGraphics

The target GcBitmapGraphics object.

browser GcHtmlBrowser

An instance of GcHtmlBrowser object.

html string

The HTML string to draw.

x float

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

y float

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

format HtmlToImageFormat

The formatting attributes.

size System.Drawing.SizeF

OUT: the size of the rendered HTML block.

loadLazyImages bool

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

Returns

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.

public static bool DrawHtml(this GcBitmapGraphics graphics, GcHtmlBrowser browser, Uri htmlUri, float x, float y, HtmlToImageFormat format, out SizeF size, bool loadLazyImages = false)

Parameters

graphics GcBitmapGraphics

The target GcBitmapGraphics object.

browser GcHtmlBrowser

An instance of GcHtmlBrowser object.

htmlUri System.Uri

The URI specifying the source HTML page.

x float

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

y float

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

format HtmlToImageFormat

The formatting attributes.

size System.Drawing.SizeF

OUT: the size of the rendered HTML block.

loadLazyImages bool

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

Returns

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.

[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)

Parameters

graphics GcBitmapGraphics

The target GcBitmapGraphics object.

html string

The HTML string to draw.

x float

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

y float

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

format HtmlToImageFormat

The formatting attributes.

size System.Drawing.SizeF

OUT: the size of the rendered HTML block.

virtualTimeBudget int

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

authServerWhitelist string

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

proxyServer string

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

Returns

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.

[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)

Parameters

graphics GcBitmapGraphics

The target GcBitmapGraphics object.

htmlUri System.Uri

The URI specifying the source HTML page.

x float

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

y float

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

format HtmlToImageFormat

The formatting attributes.

size System.Drawing.SizeF

OUT: the size of the rendered HTML block.

virtualTimeBudget int

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

authServerWhitelist string

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

proxyServer string

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

Returns

bool

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