WordProcessingWatermarkPagesOptions

WordProcessingWatermarkPagesOptions class

Represents options when adding watermark to Word document pages.

public sealed class WordProcessingWatermarkPagesOptions : WordProcessingWatermarkBaseOptions

Constructors

Name Description
WordProcessingWatermarkPagesOptions() Initializes a new instance of the WordProcessingWatermarkPagesOptions class.

Properties

Name Description
AlternativeText { get; set; } Gets or sets the descriptive (alternative) text that will be associated with a shape.
Effects { get; set; } Gets or sets a value of WordProcessingImageEffects or WordProcessingTextEffects for effects that should be applied to the watermark.
IsLocked { get; set; } Gets or sets a value indicating whether an editing of the shape in Word is forbidden.
LockType { get; set; } Gets or sets the watermark lock type.
Name { get; set; } Gets or sets the name a shape.
PageNumbers { get; set; } Gets or sets the page numbers to add the watermark.
Password { get; set; } Gets or sets a password used to lock the watermark.

Remarks

Learn more:

Examples

Add watermark to a particular page of a Word document.

WordProcessingLoadOptions loadOptions = new WordProcessingLoadOptions();
using (Watermarker watermarker = new Watermarker(@"D:\test.doc", loadOptions))
{
    TextWatermark watermark = new TextWatermark("text", new Font("Arial", 42));

    WordProcessingWatermarkPagesOptions options = new WordProcessingWatermarkPagesOptions();
    options.PageNumbers = new[] { 1 };

    watermarker.Add(watermark, options);
    watermarker.Save();
}

See Also