# HtmlConversionLimits

Shared safety and complexity limits applied before HTML is analyzed by target adapters.

Class 

`OfficeIMO.Html`

**Namespace**

`OfficeIMO.Html`

**Assembly**

`OfficeIMO.Html`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[HtmlConversionLimits.cs:71](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionLimits.cs#L71)

**Modifiers**

sealed

Shared safety and complexity limits applied before HTML is analyzed by target adapters.

## Inheritance

- object
- HtmlConversionLimits

## Remarks

This is the single owner for source, DOM, stylesheet, selector, responsive-resource, and semantic-metadata budgets. Target adapters may add native-format limits, but should not independently reinterpret these shared HTML boundaries.

## Usage

Explore 5 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 5

- Property [HtmlConversionDocumentOptions.Limits](/api/html/officeimo-html-htmlconversiondocumentoptions/#property-limits)
- Method [HtmlConversionLimits.Clone](/api/html/officeimo-html-htmlconversionlimits/#method-clone)
- Property [HtmlConversionLimits.UntrustedDefaults](/api/html/officeimo-html-htmlconversionlimits/#property-untrusteddefaults)
- Property [HtmlNormalizationOptions.Limits](/api/html/officeimo-html-htmlnormalizationoptions/#property-limits)
- Property [HtmlResourcePipelineOptions.Limits](/api/html/officeimo-html-htmlresourcepipelineoptions/#property-limits)

Filter members 

Show inherited

## Constructors

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

[HtmlConversionLimits.cs:71](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionLimits.cs#L71)

## Methods

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

[HtmlConversionLimits.cs:95](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionLimits.cs#L95)

Creates an independent limits snapshot.

Returns

`HtmlConversionLimits`

## 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 static HtmlConversionLimits UntrustedDefaults { get; }` [#](#property-untrusteddefaults)

[HtmlConversionLimits.cs:16](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionLimits.cs#L16)

Creates conservative limits suitable for untrusted HTML ingestion.

`public int? MaxInputCharacters { get; set; }` [#](#property-maxinputcharacters)

[HtmlConversionLimits.cs:41](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionLimits.cs#L41)

Maximum UTF-16 source or normalized serialized characters, or null for no character limit.

`public int? MaxHtmlNodes { get; set; }` [#](#property-maxhtmlnodes)

[HtmlConversionLimits.cs:44](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionLimits.cs#L44)

Maximum DOM nodes, or null for no node limit.

`public int? MaxHtmlDepth { get; set; }` [#](#property-maxhtmldepth)

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

Maximum DOM nesting depth, or null for no depth limit.

`public long? MaxCssBytes { get; set; }` [#](#property-maxcssbytes)

[HtmlConversionLimits.cs:50](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionLimits.cs#L50)

Maximum UTF-8 bytes in one embedded stylesheet, or null for no per-sheet limit.

`public long? MaxTotalCssBytes { get; set; }` [#](#property-maxtotalcssbytes)

[HtmlConversionLimits.cs:53](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionLimits.cs#L53)

Maximum UTF-8 bytes across embedded stylesheets, or null for no total limit.

`public int? MaxCssRules { get; set; }` [#](#property-maxcssrules)

[HtmlConversionLimits.cs:58](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionLimits.cs#L58)

Maximum active, selector-expanded CSS style entries, or null for no limit.

`public int? MaxCssRuleCandidates { get; set; }` [#](#property-maxcssrulecandidates)

[HtmlConversionLimits.cs:62](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionLimits.cs#L62)

Maximum selector-expanded style entries examined before document-presence filtering, or null for no limit.

`public int? MaxCssDeclarations { get; set; }` [#](#property-maxcssdeclarations)

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

Maximum declarations across active, selector-expanded style entries, or null for no limit.

`public int? MaxCssTokens { get; set; }` [#](#property-maxcsstokens)

[HtmlConversionLimits.cs:68](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionLimits.cs#L68)

Maximum lexical tokens produced while parsing one inline declaration block, or null for no token limit.

`public int? MaxCssNestingDepth { get; set; }` [#](#property-maxcssnestingdepth)

[HtmlConversionLimits.cs:71](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionLimits.cs#L71)

Maximum nested CSS grouping/rule-block depth. Defaults to 256 even for trusted input.

`public int? MaxCssSyntaxNodes { get; set; }` [#](#property-maxcsssyntaxnodes)

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

Maximum syntax nodes materialized while parsing one inline declaration block, or null for no node limit.

`public int? MaxCssSelectorCharacters { get; set; }` [#](#property-maxcssselectorcharacters)

[HtmlConversionLimits.cs:77](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionLimits.cs#L77)

Maximum UTF-16 characters in one selector list after CSS nesting is resolved.

`public int? MaxCssSelectorsPerRule { get; set; }` [#](#property-maxcssselectorsperrule)

[HtmlConversionLimits.cs:80](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionLimits.cs#L80)

Maximum selectors in one rule after CSS nesting is resolved.

`public long? MaxSelectorEvaluations { get; set; }` [#](#property-maxselectorevaluations)

[HtmlConversionLimits.cs:83](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionLimits.cs#L83)

Maximum element/selector match attempts, or null for no evaluation limit.

`public int? MaxResponsiveImageCandidates { get; set; }` [#](#property-maxresponsiveimagecandidates)

[HtmlConversionLimits.cs:86](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionLimits.cs#L86)

Maximum responsive image candidates per source set, or null for no candidate limit.

`public int? MaxResponsiveImageSizesCharacters { get; set; }` [#](#property-maxresponsiveimagesizescharacters)

[HtmlConversionLimits.cs:89](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Html/Engine/HtmlConversionLimits.cs#L89)

Maximum UTF-16 characters parsed from one responsive image sizes value, or null for no limit.

`public int? MaxSemanticMetadataCharacters { get; set; }` [#](#property-maxsemanticmetadatacharacters)

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

Maximum characters accepted from one semantic metadata field.

<!-- PowerForge markdown artifact sha256:1BFDFD0D6D8083F9523C9664FFB59B8575FC07E225DD0E9C2529D4C9F8C6B281 -->
