# HtmlConversionDocumentOptions

Options for building the shared OfficeIMO HTML conversion document.

Class 

`OfficeIMO.Html`

**Namespace**

`OfficeIMO.Html`

**Assembly**

`OfficeIMO.Html`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[HtmlConversionDocumentOptions.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionDocumentOptions.cs#L8)

**Modifiers**

sealed

Options for building the shared OfficeIMO HTML conversion document.

## Inheritance

- object
- HtmlConversionDocumentOptions

## Guides & Samples

Authored walkthroughs and practical samples linked to this API.

- [Convert HTML to PDF](/docs/html/html-to-pdf/) Guide
  
  Convert HTML pages and reports to PDF in .NET without a browser, with page size, margins, extra CSS, headers and footers, and local images and fonts.
- [HTML and MHTML in .NET](/docs/html/) Guide
  
  Parse HTML and MHTML safely in .NET and turn web content into PDF, images, Word, Markdown or RTF with one HTML engine, PSWriteOffice and the CLI.

## Usage

Explore 9 API references to this type

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 3

- Method [HtmlConversionDocumentOptions.Clone](/api/html/officeimo-html-htmlconversiondocumentoptions/#method-clone)
- Method [HtmlConversionDocumentOptions.CreateTrustedProfile](/api/html/officeimo-html-htmlconversiondocumentoptions/#method-createtrustedprofile)
- Property [HtmlConversionDocumentOptions.UntrustedDefaults](/api/html/officeimo-html-htmlconversiondocumentoptions/#property-untrusteddefaults)

### Accepted by parameters 6

- Method [HtmlConversionDocument.FromDocument](/api/html/officeimo-html-htmlconversiondocument/#method-fromdocument-officeimo-html-dom-htmldocument-officeimo-html-htmlconversiondocumentoptions) parameter `options`
- Method [HtmlConversionDocument.Load](/api/html/officeimo-html-htmlconversiondocument/#method-load-string-officeimo-html-htmlconversiondocumentoptions-text-encoding) parameter `options`
- Method [HtmlConversionDocument.LoadAsync](/api/html/officeimo-html-htmlconversiondocument/#method-loadasync-string-officeimo-html-htmlconversiondocumentoptions-text-encoding-threading-cancellationtoken) parameter `options`
- Method [HtmlConversionDocument.Parse](/api/html/officeimo-html-htmlconversiondocument/#method-parse-string-officeimo-html-htmlconversiondocumentoptions) parameter `options`
- Method [HtmlSiteBundle.Load](/api/html/officeimo-html-htmlsitebundle/#method-load-string-officeimo-html-htmlsitebundleoptions-officeimo-html-htmlconversiondocumentoptions-threading-cancellationtoken) parameter `htmlOptions`
- Method [HtmlSiteBundle.LoadAsync](/api/html/officeimo-html-htmlsitebundle/#method-loadasync-string-officeimo-html-htmlsitebundleoptions-officeimo-html-htmlconversiondocumentoptions-threading-cancellationtoken) parameter `htmlOptions`

Filter members 

Show inherited

## Constructors

`public HtmlConversionDocumentOptions()` [#](#constructor-ctor)

[HtmlConversionDocumentOptions.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionDocumentOptions.cs#L8)

## Methods

`public HtmlConversionDocumentOptions Clone()` [#](#method-clone)

[HtmlConversionDocumentOptions.cs:106](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionDocumentOptions.cs#L106)

Creates an independent options snapshot that can be safely adjusted for one load operation.

Returns

`HtmlConversionDocumentOptions`

`public static HtmlConversionDocumentOptions CreateTrustedProfile()` [#](#method-createtrustedprofile)

[HtmlConversionDocumentOptions.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionDocumentOptions.cs#L24)

Creates compatibility-oriented defaults for caller-trusted HTML.

Returns

`HtmlConversionDocumentOptions`

`public HtmlResourcePipelineOptions ToResourcePipelineOptions()` [#](#method-toresourcepipelineoptions)

[HtmlConversionDocumentOptions.cs:92](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionDocumentOptions.cs#L92)

Creates a resource-pipeline options snapshot from this conversion-document configuration.

Returns

`HtmlResourcePipelineOptions`

## Inherited Methods

`public virtual bool Equals(object? obj)` [#](#method-equals-object)

Inherited from object

Parameters

**obj object? required**

Returns

`bool`

`public virtual int GetHashCode()` [#](#method-gethashcode)

Inherited from object

Returns

`int`

`public Type GetType()` [#](#method-gettype)

Inherited from object

Returns

`Type`

`public virtual string? ToString()` [#](#method-tostring)

Inherited from object

Returns

`string?`

## Properties

`public IHtmlParserProvider ParserProvider { get; set; }` [#](#property-parserprovider)

[HtmlConversionDocumentOptions.cs:8](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionDocumentOptions.cs#L8)

Inert parser supplying the document contract. The current provider is retained by default.

`public IHtmlEncodingProvider InputEncodingProvider { get; set; }` [#](#property-inputencodingprovider)

[HtmlConversionDocumentOptions.cs:11](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionDocumentOptions.cs#L11)

Charset labels used when loading source HTML bytes. Explicit encodings override sniffing. External resource decoders use their own configured/default provider.

`public static HtmlConversionDocumentOptions UntrustedDefaults { get; }` [#](#property-untrusteddefaults)

[HtmlConversionDocumentOptions.cs:21](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionDocumentOptions.cs#L21)

Creates bounded, web-only options for untrusted HTML. They match the defaults.

`public HtmlConversionProfile Profile { get; set; }` [#](#property-profile)

[HtmlConversionDocumentOptions.cs:31](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionDocumentOptions.cs#L31)

Conversion profile the document should advertise to downstream adapters.

`public HtmlInputTrust Trust { get; set; }` [#](#property-trust)

[HtmlConversionDocumentOptions.cs:37](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionDocumentOptions.cs#L37)

Caller-assigned input trust boundary. This is independent from the semantic or visual fidelity profile.

`public Uri? BaseUri { get; set; }` [#](#property-baseuri)

[HtmlConversionDocumentOptions.cs:47](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionDocumentOptions.cs#L47)

Optional base URI used for URL normalization and resource planning.

`public HtmlUrlPolicy UrlPolicy { get; set; }` [#](#property-urlpolicy)

[HtmlConversionDocumentOptions.cs:55](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionDocumentOptions.cs#L55)

URL policy used for hyperlinks, navigation targets, and normalized HTML output.

`public HtmlUrlPolicy ResourceUrlPolicy { get; set; }` [#](#property-resourceurlpolicy)

[HtmlConversionDocumentOptions.cs:65](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionDocumentOptions.cs#L65)

Separate URL policy for images, stylesheets, fonts, media, and other non-navigation resources.

`public HtmlConversionLimits Limits { get; set; }` [#](#property-limits)

[HtmlConversionDocumentOptions.cs:74](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionDocumentOptions.cs#L74)

Shared limits applied before logical, style, resource, normalization, or adapter work.

`public bool UseBodyContentsOnly { get; set; }` [#](#property-usebodycontentsonly)

[HtmlConversionDocumentOptions.cs:82](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionDocumentOptions.cs#L82)

When true, logical analysis and normalized output use body contents as the conversion root.

`public bool IncludeNormalizedHtml { get; set; }` [#](#property-includenormalizedhtml)

[HtmlConversionDocumentOptions.cs:85](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionDocumentOptions.cs#L85)

When true, the builder emits a normalized HTML representation alongside the source HTML.

`public HtmlNormalizationOptions NormalizationOptions { get; set; }` [#](#property-normalizationoptions)

[HtmlConversionDocumentOptions.cs:88](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionDocumentOptions.cs#L88)

Options used when producing normalized HTML.

<!-- PowerForge markdown artifact sha256:83EFBDA5D8B4AE71FE3E79037E2F9ECC47ABA4E639BD1A88FF22365CBE4B9C30 -->
