Type Default Value Read Only Description

[Visual Basic]
null No The multicast delegate to be called when embedding an object while HTML rendering is taking place.




This delegate is called when embedding an object.

Objects embedded in HTML, such as those with the embed HTML tags, will trigger the callback if they are of certain content types. This callback provides a way to change the parameters of the embedded objects.

The definition of the HtmlEmbedCallback multicast delegate is as follows.

delegate void HtmlEmbedCallback(Doc doc, HtmlEmbedInfo info);

[Visual Basic]
Delegate Sub HtmlEmbedCallback(doc As Doc, info As HtmlEmbedInfo);

doc is the target Doc for the added HTML. The properties of HtmlEmbedInfo are as follows:

Property of HtmlEmbedInfo Type Default Value Read Only Description
Url [C#]

[Visual Basic]
n/a Yes The URL of the embedded object.
BaseUrl [C#]

[Visual Basic]
n/a Yes The base URL for resolving relative URLs. This could be the URL of the HTML or the URL from the base tag.
EmbedType HtmlEmbedType See description. Yes The content type of the embedded object. See the table below for the possible values.
ParameterNamesAreCaseSensitive [C#]

[Visual Basic]
n/a Yes Indicates whether parameter names are case-sensitive.
Parameters HtmlParameterDictionary n/a Yes The parameters for the embedded object. It depends on the value of EmbedType. The public API of HtmlParameterDictionary closely resembles that of System.Collections.Generic.Dictionary. It behaves like a dictionary with string keys and HtmlParameter values.

Parameters depends on EmbedType as follows:

EmbedType EmbedType Description ParameterNamesAreCaseSensitive Parameters
None No content. This value is not used.
Swf SWF files true if the version of the SWF file is 7 or above. Parameters contains those in the FlashVars parameter and the parameters in the URL of the SWF file.

The values in HtmlParameterDictionary are of type HtmlParameter.

Property of HtmlParameter Type Default Value Read Only Description
Value [C#]

[Visual Basic]
n/a No The parameter value.
Conversion HtmlParameterConversionType None No The conversion for the value.
HtmlParameterConversionType Description
None No conversion.
UrlToTextFileContent Sets the value to the text content of the file pointed to by Value as a URL.




The following example shows the effect that this parameter has on HTML rendering.

Doc theDoc = new Doc();
string theURL = "file:///C:/myChart.html";
// Setup the callback
theDoc.HtmlOptions.HtmlEmbedCallback = MyHtmlEmbedCallback;
// Render html page
// Save the document

public static void MyHtmlEmbedCallback(Doc doc, HtmlEmbedInfo info)
  if (info.EmbedType==HtmlEmbedType.Swf) {
    HtmlParameter param;
    if (info.Parameters.TryGetValue("dataURL", out param)) {
      param.Conversion = HtmlParameterConversionType.UrlToTextFileContent;
      info.Parameters["dataXML"] = param;

[Visual Basic]
Dim theDoc As Doc = New Doc()
Dim theURL As String = "file:///C:/myChart.html"
' Setup the callback
theDoc.HtmlOptions.HtmlEmbedCallback = AddressOf MyHtmlEmbedCallback
' Render html page
' Save the document

[Visual Basic]
Public Shared Sub MyHtmlEmbedCallback(doc As Doc, info As HtmlEmbedInfo)
  If info.EmbedType = HtmlEmbedType.Swf Then
    Dim param As HtmlParameter
    If info.Parameters.TryGetValue("dataURL", param) Then
      param.Conversion = HtmlParameterConversionType.UrlToTextFileContent
      info.Parameters("dataXML") = param
    End If
  End If
End Sub