Type Description
[C#]
MSHtmlSubsetType

[Visual Basic]
MSHtmlSubsetType
A filter that contains only the HTML options supported by the MSHTML engine.

 

   

Notes
 

Characteristics

Due to differences in paradigms and engines' working internals, there are things to note when using the MSHTML engine to render HTML documents:

  • The Screen style sheets are used during the rendering process.
  • Page heights can vary across different pages. Segments of the HTML document are composed dynamically to fit the target rectangle as accurately as possible during each call to Doc.AddImageToChain. This means the target rectangle will be filled with more contents for larger target rectangles instead of scaled to fit.

Supported methods

Supported options


Internet Explorer 9 support

ABCpdf 8 automatically detects and accommodates the new architectural changes introduced in Microsoft Internet Explorer 9. For many server applications, this is transparent and and requires no code changes.

The Fusion Log Viewer is known to interfere with the initialization of the MSHtml engine. If any problems arise, try disabling it or specify a local custom log path.

Currently, there are some limitations when using the MSHtml engine with IE9:

   

Example
 

[C#]
Doc doc = new Doc();

doc.HtmlOptions.Engine = EngineType.MSHtml;

doc.HtmlOptions.MSHtmlSubset.AddLinks = true;

// You can save a reference to the subset filter to save typing
XHtmlOptions.MSHtmlSubsetType opts = doc.HtmlOptions.MSHtmlSubset;

opts.UseActiveX = true;
opts.AutoTruncate = true;

doc.AddImageUrl("http://websupergoo.com");
doc.Save(Server.MapPath("wsg.pdf"));

[Visual Basic]
Dim theDoc As Doc = New Doc();

doc.HtmlOptions.Engine = EngineType.MSHtml;

doc.HtmlOptions.MSHtmlSubset.AddLinks = true;

' You can save a reference to the subset filter to save typing
Dim opts As XHtmlOptions.MSHtmlSubsetType = doc.HtmlOptions.MSHtmlSubset;

opts.UseActiveX = True;
opts.AutoTruncate = True;

doc.AddImageUrl("http://websupergoo.com");
doc.Save(Server.MapPath("wsg.pdf"));