[]
        
(Showing Draft Content)

GrapeCity.Documents.Pdf.GcPdfGraphicsExt

Class GcPdfGraphicsExt

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

Provides extension methods for rendering HTML to GcPdfGraphics.

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

Methods

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

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

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

Parameters

graphics GcPdfGraphics

The target GcPdfGraphics 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 HtmlToPdfFormat

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

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

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

Parameters

graphics GcPdfGraphics

The target GcPdfGraphics 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 HtmlToPdfFormat

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

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

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

Parameters

graphics GcPdfGraphics

The target GcPdfGraphics 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 HtmlToPdfFormat

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

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

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

Parameters

graphics GcPdfGraphics

The target GcPdfGraphics 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 HtmlToPdfFormat

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.

MeasureHtml(GcPdfGraphics, GcHtmlBrowser, string, HtmlToPdfFormat, bool)

Measures an HTML string for rendering on this GcPdfGraphics

public static SizeF MeasureHtml(this GcPdfGraphics graphics, GcHtmlBrowser browser, string html, HtmlToPdfFormat format, bool loadLazyImages = false)

Parameters

graphics GcPdfGraphics

The target GcPdfGraphics object.

browser GcHtmlBrowser

An instance of GcHtmlBrowser object.

html string

The HTML string to draw.

format HtmlToPdfFormat

The formatting attributes.

loadLazyImages bool

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

Returns

System.Drawing.SizeF

The size of the HTML block if rendered on this graphics.

MeasureHtml(GcPdfGraphics, GcHtmlBrowser, Uri, HtmlToPdfFormat, bool)

Measures an HTML page provided by an URI for rendering on this GcPdfGraphics.

public static SizeF MeasureHtml(this GcPdfGraphics graphics, GcHtmlBrowser browser, Uri htmlUri, HtmlToPdfFormat format, bool loadLazyImages = false)

Parameters

graphics GcPdfGraphics

The target GcPdfGraphics object.

browser GcHtmlBrowser

An instance of GcHtmlBrowser object.

htmlUri System.Uri

The URI specifying the source HTML page.

format HtmlToPdfFormat

The formatting attributes.

loadLazyImages bool

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

Returns

System.Drawing.SizeF

The size of the HTML block if rendered on this graphics.

MeasureHtml(GcPdfGraphics, string, HtmlToPdfFormat, int, string, string)

Measures an HTML string for rendering on this GcPdfGraphics

[Obsolete("Use the MeasureHtml method override accepting GcHtmlBrowser as a parameter instead.")]
public static SizeF MeasureHtml(this GcPdfGraphics graphics, string html, HtmlToPdfFormat format, int virtualTimeBudget = 0, string authServerWhitelist = null, string proxyServer = null)

Parameters

graphics GcPdfGraphics

The target GcPdfGraphics object.

html string

The HTML string to draw.

format HtmlToPdfFormat

The formatting attributes.

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

System.Drawing.SizeF

The size of the HTML block if rendered on this graphics.

MeasureHtml(GcPdfGraphics, Uri, HtmlToPdfFormat, int, string, string)

Measures an HTML page provided by an URI for rendering on this GcPdfGraphics.

[Obsolete("Use the MeasureHtml method override accepting GcHtmlBrowser as a parameter instead.")]
public static SizeF MeasureHtml(this GcPdfGraphics graphics, Uri htmlUri, HtmlToPdfFormat format, int virtualTimeBudget = 0, string authServerWhitelist = null, string proxyServer = null)

Parameters

graphics GcPdfGraphics

The target GcPdfGraphics object.

htmlUri System.Uri

The URI specifying the source HTML page.

format HtmlToPdfFormat

The formatting attributes.

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

System.Drawing.SizeF

The size of the HTML block if rendered on this graphics.