Renders a web page specified as HTML.




ImageID = Doc.AddImageHtml(Html [, Paged[, Width[, DisableCache]]])



Name Type Description
Html String The HTML to be rendered.
Paged Boolean Allows you to override the default XHtmlOptions.Paged property (optional).
Width Long Allows you to override the default XHtmlOptions.BrowserWidth property (optional).
DisableCache Boolean

Allows you to override and disable the page cache (optional).

See the XHtmlOptions.PageCacheEnabled property for details.

ImageID Long The ID of the newly added View object.




This method is essentially the same as the AddImageUrl method, but it allows you to use raw HTML rather than having to specify a URL.

ABCpdf saves this HTML into a temporary file and renders the file using a 'file://' protocol specifier. So this is a convenience method - it doesn't offer any performance enhancements.

Sometimes the IIS users don't have full access to the temp directory. This is determined by the system setup you have on your machine. If this is the case, you will get errors returned.

So if you are working from ASP, you may find that you need to enable access to the temp directory for the ASPNET user, the IUSR_MACHINENAME user or the IWAM_MACHINENAME user.

Styles and Images. HTML does not exist within a file, and so it does not have a location.

External stylesheets and images are often referenced via relative URLs. Because the HTML has no location, it is impossible to resolve these relative reference.

So you need to provide your stylesheet and image links as absolute references. Or you may be able to use the HTML BASE element to specify an appropriate base location. Or you can save your HTML to file in an appropriate location and then use AddImageUrl.