Class ContentOverlapBehavior
Controls what IronPDF does when an HTML header or footer added to an existing PDF
(via AddHtmlHeaders/AddHtmlFooters) would overlap content already on the page.
Detection scope: only text and image objects are considered. Vector/path content (table borders, ruled lines, shapes) is not detected, so a passing result, including Throw not throwing, is not a guarantee that the output is free of all visible overlap. Detection never moves or reflows content.
Inheritance
Namespace: IronPdf
Assembly: IronPdf.dll
Syntax
public sealed class ContentOverlapBehavior : Enum
ContentOverlapBehavior tells IronPDF how to respond when an HTML header or footer added via AddHtmlHeaders or AddHtmlFooters would overlap text or image content already on the page. Ignore skips detection entirely, Warn surfaces a diagnostic without aborting, and Throw raises an exception on detected overlap. Detection covers only text and image objects; vector paths such as table borders and ruled lines are not checked. See the headers and footers how-to for configuration guidance.
pdfDocument.AddHtmlHeaders(header, overlapBehavior: ContentOverlapBehavior.Warn);Fields
Ignore
Do not check for overlap. Header/footer is stamped as-is. This is the default behaviour.
Declaration
public const ContentOverlapBehavior Ignore
Field Value
| Type | Description |
|---|---|
| ContentOverlapBehavior |
Throw
Detect overlapping content and throw an System.InvalidOperationException before stamping, listing the affected page indexes.
Declaration
public const ContentOverlapBehavior Throw
Field Value
| Type | Description |
|---|---|
| ContentOverlapBehavior |
value__
Declaration
public int value__
Field Value
| Type | Description |
|---|---|
| System.Int32 |
Warn
Detect overlapping content and emit a warning listing the affected page indexes. The header/footer is still stamped.
Declaration
public const ContentOverlapBehavior Warn
Field Value
| Type | Description |
|---|---|
| ContentOverlapBehavior |