[]
Provides extension methods for rendering HTML to GcPdfGraphics.
public static class GcPdfGraphicsExt
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)
graphics
GcPdfGraphicsThe target GcPdfGraphics object.
browser
GcHtmlBrowserAn instance of GcHtmlBrowser object.
html
stringThe HTML string to draw.
x
floatThe x-coordinate at which to draw the HTML block.
y
floatThe y-coordinate at which to draw the HTML block.
format
HtmlToPdfFormatThe formatting attributes.
size
System.Drawing.SizeFOUT: the size of the rendered HTML block.
loadLazyImages
boolWhether to scroll the page down to the end to force pending images to load.
True if the drawn block is not empty, false otherwise.
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)
graphics
GcPdfGraphicsThe target GcPdfGraphics object.
browser
GcHtmlBrowserAn instance of GcHtmlBrowser object.
htmlUri
System.UriThe URI specifying the source HTML page.
x
floatThe x-coordinate at which to draw the HTML block.
y
floatThe y-coordinate at which to draw the HTML block.
format
HtmlToPdfFormatThe formatting attributes.
size
System.Drawing.SizeFOUT: the size of the rendered HTML block.
loadLazyImages
boolWhether to scroll the page down to the end to force pending images to load.
True if the drawn block is not empty, false otherwise.
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)
graphics
GcPdfGraphicsThe target GcPdfGraphics object.
html
stringThe HTML string to draw.
x
floatThe x-coordinate at which to draw the HTML block.
y
floatThe y-coordinate at which to draw the HTML block.
format
HtmlToPdfFormatThe formatting attributes.
size
System.Drawing.SizeFOUT: the size of the rendered HTML block.
virtualTimeBudget
intThe number of milliseconds to wait before deeming the page to be ready.
authServerWhitelist
stringA whitelist for Negotiate Auth servers, such as "*example.com".
proxyServer
stringA proxy server, such as "https://proxy-ip:proxy-port".
True if the drawn block is not empty, false otherwise.
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)
graphics
GcPdfGraphicsThe target GcPdfGraphics object.
htmlUri
System.UriThe URI specifying the source HTML page.
x
floatThe x-coordinate at which to draw the HTML block.
y
floatThe y-coordinate at which to draw the HTML block.
format
HtmlToPdfFormatThe formatting attributes.
size
System.Drawing.SizeFOUT: the size of the rendered HTML block.
virtualTimeBudget
intThe number of milliseconds to wait before deeming the page to be ready.
authServerWhitelist
stringA whitelist for Negotiate Auth servers, such as "*example.com".
proxyServer
stringA proxy server, such as "https://proxy-ip:proxy-port".
True if the drawn block is not empty, false otherwise.
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)
graphics
GcPdfGraphicsThe target GcPdfGraphics object.
browser
GcHtmlBrowserAn instance of GcHtmlBrowser object.
html
stringThe HTML string to draw.
format
HtmlToPdfFormatThe formatting attributes.
loadLazyImages
boolWhether to scroll the page down to the end to force pending images to load.
The size of the HTML block if rendered on this graphics.
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)
graphics
GcPdfGraphicsThe target GcPdfGraphics object.
browser
GcHtmlBrowserAn instance of GcHtmlBrowser object.
htmlUri
System.UriThe URI specifying the source HTML page.
format
HtmlToPdfFormatThe formatting attributes.
loadLazyImages
boolWhether to scroll the page down to the end to force pending images to load.
The size of the HTML block if rendered on this graphics.
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)
graphics
GcPdfGraphicsThe target GcPdfGraphics object.
html
stringThe HTML string to draw.
format
HtmlToPdfFormatThe formatting attributes.
virtualTimeBudget
intThe number of milliseconds to wait before deeming the page to be ready.
authServerWhitelist
stringA whitelist for Negotiate Auth servers, such as "*example.com".
proxyServer
stringA proxy server, such as "https://proxy-ip:proxy-port".
The size of the HTML block if rendered on this graphics.
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)
graphics
GcPdfGraphicsThe target GcPdfGraphics object.
htmlUri
System.UriThe URI specifying the source HTML page.
format
HtmlToPdfFormatThe formatting attributes.
virtualTimeBudget
intThe number of milliseconds to wait before deeming the page to be ready.
authServerWhitelist
stringA whitelist for Negotiate Auth servers, such as "*example.com".
proxyServer
stringA proxy server, such as "https://proxy-ip:proxy-port".
The size of the HTML block if rendered on this graphics.