Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
WordProcessingLoadOptions loadOptions = new WordProcessingLoadOptions();
using (Watermarker watermarker = new Watermarker("document.docx", loadOptions))
TextWatermark watermark = new TextWatermark("Watermark text", new Font("Arial", 19));
watermark.ForegroundColor = Color.Red;
WordProcessingWatermarkPagesOptions options = new WordProcessingWatermarkPagesOptions();
options.IsLocked = true;
options.LockType = WordProcessingLockType.AllowOnlyComments;
options.LockType = WordProcessingLockType.AllowOnlyRevisions;
options.LockType = WordProcessingLockType.AllowOnlyFormFields;
options.LockType = WordProcessingLockType.ReadOnlyWithEditableContent;
options.LockType = WordProcessingLockType.ReadOnly;
// To protect with password
//options.Password = "7654321";
watermarker.Add(watermark, options);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment