WordProcessingWatermarkSectionOptions

WordProcessingWatermarkSectionOptions class

Represents options when adding shape watermark to a Word document section.

public sealed class WordProcessingWatermarkSectionOptions : WordProcessingWatermarkBaseOptions

Constructors

Name Description
WordProcessingWatermarkSectionOptions() Initializes a new instance of the WordProcessingWatermarkSectionOptions 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.
Password { get; set; } Gets or sets a password used to lock the watermark.
SectionIndex { get; set; } Gets or sets the index of a section to add the watermark to.

Remarks

Learn more:

Examples

Add watermark to a particular section of a Word document.

WordProcessingLoadOptions loadOptions = new WordProcessingLoadOptions();
using (Watermarker watermarker = new Watermarker(@"C:\Documents\test.doc", loadOptions))
{
    TextWatermark watermark = new TextWatermark("Test watermark", new Font("Arial", 36, FontStyle.Bold | FontStyle.Italic));
    watermark.HorizontalAlignment = HorizontalAlignment.Center;
    watermark.VerticalAlignment = VerticalAlignment.Center;
    watermark.ForegroundColor = Color.Red;

    WordProcessingWatermarkSectionOptions options = new WordProcessingWatermarkSectionOptions();
    options.SectionIndex = 0;

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

See Also