WordProcessingContent
Contents
[
Hide
]
WordProcessingContent class
Class representing Word document (doc, docx etc) where watermark should be placed.
public class WordProcessingContent : Content
Properties
Name | Description |
---|---|
PageCount { get; } | Gets the number of pages in the document. |
Sections { get; } | Gets the collection of all sections of this WordProcessingContent . |
Methods
Name | Description |
---|---|
Decrypt() | Decrypts the document. |
Dispose() | Disposes the current instance. |
Encrypt(string) | Encrypts the document. |
FindImages() | Finds all images in the content. The search is conducted in the objects specified in SearchableObjects . |
FindImages(ImageSearchCriteria) | Finds images according to the specified search criteria. The search is conducted in the objects specified in SearchableObjects . |
Protect(WordProcessingProtectionType, string) | Protects the document from changes and sets a protection password. |
Search() | Finds all possible watermarks in the content. The search is conducted in the objects specified in SearchableObjects . |
Search(SearchCriteria) | Finds possible watermarks according to specified search criteria. The search is conducted in the objects specified in SearchableObjects . |
Unprotect() | Removes protection from the document regardless of the password. |
Remarks
Learn more:
- Add watermarks to word processing documents
- Existing objects in word processing document
- Locking watermark in word processing document
- Protecting word processing documents
- Watermarks in word processing document
Examples
Load and save Word document of any supported type.
WordProcessingLoadOptions loadOptions = new WordProcessingLoadOptions();
using (Watermarker watermarker = new Watermarker(@"D:\input.doc", loadOptions))
{
// Use Add method to add watermark to a particular or all sections.
// Save changes.
watermarker.Save(@"D:\output.doc");
}
See Also
- class Content
- namespace GroupDocs.Watermark.Contents.WordProcessing
- assembly GroupDocs.Watermark