Class HtmlFormatter
Controls the structure and rendering mode of the HTML output produced by HtmlOptions.
Use the static Create methods for common configurations,
or construct directly and set properties for full control.
Inherited Members
Namespace: DRIT.Presentation
Assembly: DRIT.Presentation.dll
Syntax
public class HtmlFormatter
Properties
CssClassNamePrefix
Gets or sets a prefix for auto-generated CSS class names. Default: "drit-".
Declaration
public string CssClassNamePrefix { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
DocumentBodyFooter
Gets or sets HTML markup to emit at the bottom of the
<body> element, after the last slide.
When null, no body footer is emitted.
Declaration
public string DocumentBodyFooter { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
DocumentBodyHeader
Gets or sets HTML markup to emit at the top of the
<body> element, before the first slide.
When null, no body header is emitted.
Declaration
public string DocumentBodyHeader { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
DocumentHead
Gets or sets additional HTML markup to inject inside the
<head> element, after the auto-generated
<meta> and <title> tags.
When null, no extra head markup is emitted.
Declaration
public string DocumentHead { get; set; }
Property Value
| Type | Description |
|---|---|
| string |
OutputMode
Gets or sets how slides are rendered in the HTML output. Default: FixedLayout.
Declaration
public HtmlOutputMode OutputMode { get; set; }
Property Value
| Type | Description |
|---|---|
| HtmlOutputMode |
Methods
CreateCustom(string, string, string)
Creates a formatter with custom head and body markup.
Declaration
public static HtmlFormatter CreateCustom(string head, string bodyHeader, string bodyFooter)
Parameters
| Type | Name | Description |
|---|---|---|
| string | head | Additional HTML for the |
| string | bodyHeader | HTML to emit before the first slide. |
| string | bodyFooter | HTML to emit after the last slide. |
Returns
| Type | Description |
|---|---|
| HtmlFormatter |
CreateDefault()
Creates a default formatter that renders slides as fixed-layout HTML with absolutely positioned elements.
Declaration
public static HtmlFormatter CreateDefault()
Returns
| Type | Description |
|---|---|
| HtmlFormatter |
CreateSlideImageFormatter()
Creates a formatter that renders each slide as a raster image (PNG) embedded in the HTML.
Declaration
public static HtmlFormatter CreateSlideImageFormatter()
Returns
| Type | Description |
|---|---|
| HtmlFormatter |