Table of Contents

Class WatermarkEditingExtensions

Namespace
DocWright.Dom.Editing
Assembly
DocWright.Dom.dll

Phase 160 (WQ-0133): a text watermark read, set and removed as an edit, as Word's Design > Watermark does. Word keeps one per document: setting one takes every other away and puts the new one in the header in effect for a section's pages of a kind; removing takes every one away. The shape is written as Word writes it, its typed model as the reader builds it, so it lays out behind the text at once and saves without a reload.

public static class WatermarkEditingExtensions
Inheritance
WatermarkEditingExtensions
Inherited Members

Methods

ReadWatermark(WordDocument)

The first watermark in the document's headers, in document order; null when there is none.

RemoveWatermarks(WordDocument, DocumentPosition)

Removes every watermark from the document's headers (Word's Remove Watermark). One undo step; empty when there is none.

SetWatermark(WordDocument, DocumentPosition, Section, HeaderFooterType, Watermark)

Sets the document's watermark: every watermark it has goes, and the header in effect for section's pages of type (the section's own, or the one it links to; a header is added to the section when there is none) gets this one at its start, in Word's Watermarks content control. One undo step.