# PdfDocumentStamper

Fluent stamping and watermarking operations for a PdfDocument.

Class 

`OfficeIMO.Pdf`

**Namespace**

`OfficeIMO.Pdf`

**Assembly**

`OfficeIMO.Pdf`

**Source revision**

`be6c300e4ab1` with working tree changes

**Source**

[PdfDocumentStamper.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L18)

**Modifiers**

sealed

Fluent stamping and watermarking operations for a [PdfDocument](/api/pdf/officeimo-pdf-pdfdocument/).

## Inheritance

- object
- PdfDocumentStamper

## Usage

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

- Property [PdfDocument.Stamp](/api/pdf/officeimo-pdf-pdfdocument/#property-stamp)

Filter members 

Show inherited

## Methods

Content 2 overloads

`public PdfDocument Content(Action<PdfPageCanvas, PdfStampPageContext> build, PdfCanvasStampOptions? options = null, PdfLoadOptions? readOptions = null, CancellationToken cancellationToken = default)` [#](#method-content-action-officeimo-pdf-pdfpagecanvas-officeimo-pdf-pdfstamppagecontext-officeimo-pdf-pdfcanvasstampoptions-officeimo-pdf-pdfloadoptions-threading-cancellationtoken)

[PdfDocumentStamper.Content.cs:14](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.Content.cs#L14)

Stamps arbitrary visual [PdfPageCanvas](/api/pdf/officeimo-pdf-pdfpagecanvas/) content onto selected existing pages. Annotations, form fields, interactive metadata, outlines, and tagged structure remain separate editor concerns and are rejected by this visual-only operation.

Parameters

**build System.Action<OfficeIMO.Pdf.PdfPageCanvas, OfficeIMO.Pdf.PdfStampPageContext> required**

**options OfficeIMO.Pdf.PdfCanvasStampOptions? = null optional**

**readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

`public PdfDocument Content(Action<PdfPageCanvas> build, PdfCanvasStampOptions? options = null, PdfLoadOptions? readOptions = null, CancellationToken cancellationToken = default)` [#](#method-content-action-officeimo-pdf-pdfpagecanvas-officeimo-pdf-pdfcanvasstampoptions-officeimo-pdf-pdfloadoptions-threading-cancellationtoken)

[PdfDocumentStamper.Content.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.Content.cs#L24)

Stamps the same arbitrary visual canvas content onto selected existing pages.

Parameters

**build System.Action<OfficeIMO.Pdf.PdfPageCanvas> required**

**options OfficeIMO.Pdf.PdfCanvasStampOptions? = null optional**

**readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

Image 4 overloads

`public PdfDocument Image(byte[] imageBytes, PdfImageStampOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-image-byte-officeimo-pdf-pdfimagestampoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:60](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L60)

Creates a new PDF with an image stamped above existing content unless options request otherwise.

Parameters

**imageBytes byte[] required**

**options OfficeIMO.Pdf.PdfImageStampOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

`public PdfDocument Image(byte[] imageBytes, PdfImageStampOptions? options, PdfLoadOptions? readOptions, CancellationToken cancellationToken = default)` [#](#method-image-byte-officeimo-pdf-pdfimagestampoptions-officeimo-pdf-pdfloadoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:66](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L66)

Creates a new PDF with an image stamped above existing content using explicit target read options.

Parameters

**imageBytes byte[] required**

**options OfficeIMO.Pdf.PdfImageStampOptions? required**

**readOptions OfficeIMO.Pdf.PdfLoadOptions? required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

`public PdfDocument Image(Stream imageStream, PdfImageStampOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-image-io-stream-officeimo-pdf-pdfimagestampoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:84](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L84)

Creates a new PDF with an image stamped from a readable image stream.

Parameters

**imageStream System.IO.Stream required**

**options OfficeIMO.Pdf.PdfImageStampOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

`public PdfDocument Image(Stream imageStream, PdfImageStampOptions? options, PdfLoadOptions? readOptions, CancellationToken cancellationToken = default)` [#](#method-image-io-stream-officeimo-pdf-pdfimagestampoptions-officeimo-pdf-pdfloadoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:90](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L90)

Creates a new PDF with an image stream stamped using explicit target read options.

Parameters

**imageStream System.IO.Stream required**

**options OfficeIMO.Pdf.PdfImageStampOptions? required**

**readOptions OfficeIMO.Pdf.PdfLoadOptions? required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

ImageWatermark 4 overloads

`public PdfDocument ImageWatermark(byte[] imageBytes, PdfImageStampOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-imagewatermark-byte-officeimo-pdf-pdfimagestampoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:106](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L106)

Creates a new PDF with an image watermarked behind existing content.

Parameters

**imageBytes byte[] required**

**options OfficeIMO.Pdf.PdfImageStampOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

`public PdfDocument ImageWatermark(byte[] imageBytes, PdfImageStampOptions? options, PdfLoadOptions? readOptions, CancellationToken cancellationToken = default)` [#](#method-imagewatermark-byte-officeimo-pdf-pdfimagestampoptions-officeimo-pdf-pdfloadoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:112](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L112)

Creates an image watermark behind existing content using explicit target read options.

Parameters

**imageBytes byte[] required**

**options OfficeIMO.Pdf.PdfImageStampOptions? required**

**readOptions OfficeIMO.Pdf.PdfLoadOptions? required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

`public PdfDocument ImageWatermark(Stream imageStream, PdfImageStampOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-imagewatermark-io-stream-officeimo-pdf-pdfimagestampoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:130](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L130)

Creates a new PDF with an image watermark from a readable image stream.

Parameters

**imageStream System.IO.Stream required**

**options OfficeIMO.Pdf.PdfImageStampOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

`public PdfDocument ImageWatermark(Stream imageStream, PdfImageStampOptions? options, PdfLoadOptions? readOptions, CancellationToken cancellationToken = default)` [#](#method-imagewatermark-io-stream-officeimo-pdf-pdfimagestampoptions-officeimo-pdf-pdfloadoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:136](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L136)

Creates an image-stream watermark using explicit target read options.

Parameters

**imageStream System.IO.Stream required**

**options OfficeIMO.Pdf.PdfImageStampOptions? required**

**readOptions OfficeIMO.Pdf.PdfLoadOptions? required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

OverlayPage 6 overloads

`public PdfDocument OverlayPage(byte[] sourcePdf, PdfPageOverlayOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-overlaypage-byte-officeimo-pdf-pdfpageoverlayoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:150](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L150)

Imports one page from another PDF above selected pages.

Parameters

**sourcePdf byte[] required**

**options OfficeIMO.Pdf.PdfPageOverlayOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

`public PdfDocument OverlayPage(byte[] sourcePdf, PdfPageOverlayOptions? options, PdfLoadOptions? targetReadOptions, CancellationToken cancellationToken = default)` [#](#method-overlaypage-byte-officeimo-pdf-pdfpageoverlayoptions-officeimo-pdf-pdfloadoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:156](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L156)

Imports one page from another PDF above selected pages using explicit target read options.

Parameters

**sourcePdf byte[] required**

**options OfficeIMO.Pdf.PdfPageOverlayOptions? required**

**targetReadOptions OfficeIMO.Pdf.PdfLoadOptions? required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

`public PdfDocument OverlayPage(Stream sourceStream, PdfPageOverlayOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-overlaypage-io-stream-officeimo-pdf-pdfpageoverlayoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:163](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L163)

Imports one page from a readable PDF stream above selected pages.

Parameters

**sourceStream System.IO.Stream required**

**options OfficeIMO.Pdf.PdfPageOverlayOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

`public PdfDocument OverlayPage(Stream sourceStream, PdfPageOverlayOptions? options, PdfLoadOptions? targetReadOptions, CancellationToken cancellationToken = default)` [#](#method-overlaypage-io-stream-officeimo-pdf-pdfpageoverlayoptions-officeimo-pdf-pdfloadoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:169](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L169)

Imports one page from a readable PDF stream using explicit target read options.

Parameters

**sourceStream System.IO.Stream required**

**options OfficeIMO.Pdf.PdfPageOverlayOptions? required**

**targetReadOptions OfficeIMO.Pdf.PdfLoadOptions? required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

`public PdfDocument OverlayPage(string sourcePath, PdfPageOverlayOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-overlaypage-string-officeimo-pdf-pdfpageoverlayoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:176](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L176)

Imports one page from a PDF file above selected pages.

Parameters

**sourcePath string required**

**options OfficeIMO.Pdf.PdfPageOverlayOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

`public PdfDocument OverlayPage(string sourcePath, PdfPageOverlayOptions? options, PdfLoadOptions? targetReadOptions, CancellationToken cancellationToken = default)` [#](#method-overlaypage-string-officeimo-pdf-pdfpageoverlayoptions-officeimo-pdf-pdfloadoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:182](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L182)

Imports one page from a PDF file using explicit target read options.

Parameters

**sourcePath string required**

**options OfficeIMO.Pdf.PdfPageOverlayOptions? required**

**targetReadOptions OfficeIMO.Pdf.PdfLoadOptions? required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

ReadWatermarks 2 overloads

`public IReadOnlyList<PdfWatermarkOptions> ReadWatermarks(PdfLoadOptions? readOptions = null)` [#](#method-readwatermarks-officeimo-pdf-pdfloadoptions)

[PdfDocumentStamper.Watermark.cs:6](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.Watermark.cs#L6)

Reads editable settings for watermarks created by this API, with their current page selections.

Parameters

**readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional**

Returns

`IReadOnlyList<PdfWatermarkOptions>`

`public IReadOnlyList<PdfWatermarkOptions> ReadWatermarks(PdfLoadOptions? readOptions, CancellationToken cancellationToken)` [#](#method-readwatermarks-officeimo-pdf-pdfloadoptions-threading-cancellationtoken)

[PdfDocumentStamper.Watermark.cs:9](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.Watermark.cs#L9)

Reads editable watermark settings with cooperative cancellation.

Parameters

**readOptions OfficeIMO.Pdf.PdfLoadOptions? required**

**cancellationToken System.Threading.CancellationToken required**

Returns

`IReadOnlyList<PdfWatermarkOptions>`

Text 2 overloads

`public PdfDocument Text(string text, PdfTextStampOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-text-string-officeimo-pdf-pdftextstampoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:18](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L18)

Creates a new PDF with text stamped above existing content unless options request otherwise.

Parameters

**text string required**

**options OfficeIMO.Pdf.PdfTextStampOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

`public PdfDocument Text(string text, PdfTextStampOptions? options, PdfLoadOptions? readOptions, CancellationToken cancellationToken = default)` [#](#method-text-string-officeimo-pdf-pdftextstampoptions-officeimo-pdf-pdfloadoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:24](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L24)

Creates a new PDF with text stamped above existing content using explicit target read options.

Parameters

**text string required**

**options OfficeIMO.Pdf.PdfTextStampOptions? required**

**readOptions OfficeIMO.Pdf.PdfLoadOptions? required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

TextWatermark 2 overloads

`public PdfDocument TextWatermark(string text, PdfTextStampOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-textwatermark-string-officeimo-pdf-pdftextstampoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:39](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L39)

Creates a new PDF with text watermarked behind existing content.

Parameters

**text string required**

**options OfficeIMO.Pdf.PdfTextStampOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

`public PdfDocument TextWatermark(string text, PdfTextStampOptions? options, PdfLoadOptions? readOptions, CancellationToken cancellationToken = default)` [#](#method-textwatermark-string-officeimo-pdf-pdftextstampoptions-officeimo-pdf-pdfloadoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:45](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L45)

Creates a text watermark behind existing content using explicit target read options.

Parameters

**text string required**

**options OfficeIMO.Pdf.PdfTextStampOptions? required**

**readOptions OfficeIMO.Pdf.PdfLoadOptions? required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

UnderlayPage 6 overloads

`public PdfDocument UnderlayPage(byte[] sourcePdf, PdfPageOverlayOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-underlaypage-byte-officeimo-pdf-pdfpageoverlayoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:207](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L207)

Imports one page from another PDF below selected pages.

Parameters

**sourcePdf byte[] required**

**options OfficeIMO.Pdf.PdfPageOverlayOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

`public PdfDocument UnderlayPage(byte[] sourcePdf, PdfPageOverlayOptions? options, PdfLoadOptions? targetReadOptions, CancellationToken cancellationToken = default)` [#](#method-underlaypage-byte-officeimo-pdf-pdfpageoverlayoptions-officeimo-pdf-pdfloadoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:213](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L213)

Imports one page from another PDF below selected pages using explicit target read options.

Parameters

**sourcePdf byte[] required**

**options OfficeIMO.Pdf.PdfPageOverlayOptions? required**

**targetReadOptions OfficeIMO.Pdf.PdfLoadOptions? required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

`public PdfDocument UnderlayPage(Stream sourceStream, PdfPageOverlayOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-underlaypage-io-stream-officeimo-pdf-pdfpageoverlayoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:220](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L220)

Imports one page from a readable PDF stream below selected pages.

Parameters

**sourceStream System.IO.Stream required**

**options OfficeIMO.Pdf.PdfPageOverlayOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

`public PdfDocument UnderlayPage(Stream sourceStream, PdfPageOverlayOptions? options, PdfLoadOptions? targetReadOptions, CancellationToken cancellationToken = default)` [#](#method-underlaypage-io-stream-officeimo-pdf-pdfpageoverlayoptions-officeimo-pdf-pdfloadoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:226](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L226)

Imports one page from a readable PDF stream below selected pages using explicit target read options.

Parameters

**sourceStream System.IO.Stream required**

**options OfficeIMO.Pdf.PdfPageOverlayOptions? required**

**targetReadOptions OfficeIMO.Pdf.PdfLoadOptions? required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

`public PdfDocument UnderlayPage(string sourcePath, PdfPageOverlayOptions? options = null, CancellationToken cancellationToken = default)` [#](#method-underlaypage-string-officeimo-pdf-pdfpageoverlayoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:233](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L233)

Imports one page from a PDF file below selected pages.

Parameters

**sourcePath string required**

**options OfficeIMO.Pdf.PdfPageOverlayOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

`public PdfDocument UnderlayPage(string sourcePath, PdfPageOverlayOptions? options, PdfLoadOptions? targetReadOptions, CancellationToken cancellationToken = default)` [#](#method-underlaypage-string-officeimo-pdf-pdfpageoverlayoptions-officeimo-pdf-pdfloadoptions-threading-cancellationtoken)

[PdfDocumentStamper.cs:239](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.cs#L239)

Imports one page from a PDF file below selected pages using explicit target read options.

Parameters

**sourcePath string required**

**options OfficeIMO.Pdf.PdfPageOverlayOptions? required**

**targetReadOptions OfficeIMO.Pdf.PdfLoadOptions? required**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

`public PdfDocument Watermark(PdfWatermarkOptions options, PdfLoadOptions? readOptions = null, CancellationToken cancellationToken = default)` [#](#method-watermark-officeimo-pdf-pdfwatermarkoptions-officeimo-pdf-pdfloadoptions-threading-cancellationtoken)

[PdfDocumentStamper.Watermark.cs:17](https://github.com/EvotecIT/OfficeIMO/blob/be6c300e4ab1859837b961c64fbfb2b2a1886cd0/Sources/OfficeIMO.Pdf/Core/PdfDocumentStamper.Watermark.cs#L17)

Adds or revises a text or image watermark with a centered rotation origin and common opacity, placement, and page-selection options. Reusing an identifier replaces that watermark on the requested pages and removes its previous occurrences on other pages. An unchanged foreground or background setting preserves its position relative to other page content.

Parameters

**options OfficeIMO.Pdf.PdfWatermarkOptions required**

**readOptions OfficeIMO.Pdf.PdfLoadOptions? = null optional**

**cancellationToken System.Threading.CancellationToken = default optional**

Returns

`PdfDocument`

## 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?`

<!-- PowerForge markdown artifact sha256:64CBB413EB8C9011F129761B2FCE0C24784AA903E5EABF318759BDBF03A84BE1 -->
