IResourceLoadingOptions

IResourceLoadingOptions interface

Represents the options that control which external resources a document may load.

public interface IResourceLoadingOptions

Properties

Name Description
ExternalResourceHandler { get; set; } Gets or sets the handler called for each resource the document asks an engine to load. Default: null.
SkipExternalResources { get; set; } Gets or sets whether external resources are denied. Default: true.
WhitelistedResources { get; set; } Gets or sets the absolute URI prefixes of the external resources that load while SkipExternalResources is true.

Remarks

External resources are denied by default. SkipExternalResources says what still loads and how the base directory is chosen, and WhitelistedResources says which entries let more load.

UNC paths are never loaded, whatever these options say.

An ExternalResourceHandler can override the decision for each resource, except for UNC paths, javascript: and vbscript: references, which never load, and XBRL taxonomies, which it can only skip.

The options are read when an operation such as Convert or GetDocumentInfo loads the document. Changing them, or the whitelist, while that operation runs does not affect it.

See Also