WordProcessingContent class
Leave feedback
On this page
Represents a Word document (doc, docx, etc.) where a watermark can be placed.
Learn more:
- Add watermarks to word processing documents: https://docs.groupdocs.com/display/watermarknet/Add+watermarks+to+word+processing+documents
- Existing objects in word processing document: https://docs.groupdocs.com/display/watermarknet/Existing+objects+in+word+processing+document
- Locking watermark in word processing document: https://docs.groupdocs.com/display/watermarknet/Locking+watermark+in+word+processing+document
- Protecting word processing documents: https://docs.groupdocs.com/display/watermarknet/Protecting+word+processing+documents
- Watermarks in word processing document: https://docs.groupdocs.com/display/watermarknet/Watermarks+in+word+processing+document
The WordProcessingContent type exposes the following members:
| Method | Description |
|---|---|
| decrypt | Decrypts the document. |
| encrypt | Encrypts the document. |
| encrypt_file | |
| encrypt_string | |
| protect | Protects the document from changes and sets a protection password. |
| protect_file | |
| protect_string | |
| protect_word_processing_protection_type | |
| unprotect | Removes protection from the document regardless of the password. |
| dispose | Disposes the current instance. (inherited from Content) |
| find_images | Finds images according to the specified search criteria. (inherited from ContentPart) |
| find_images_image_search_criteria | (inherited from ContentPart) |
| search | Finds possible watermarks according to the specified search criteria. (inherited from ContentPart) |
| search_search_criteria | (inherited from ContentPart) |
| Property | Description |
|---|---|
| page_count | The number of pages in the document. |
| sections | The collection of all sections of this WordProcessingContent. |
import groupdocs.watermark as gw
import groupdocs.watermark.contents.wordprocessing as gwc_wp
load_options = gw.WordProcessingLoadOptions()
with gw.Watermarker("document.docx", load_options) as watermarker:
content = watermarker.get_content(gwc_wp.WordProcessingContent)
content.unprotect() # remove protection to allow editing
watermarker.save("document.docx")
Was this page helpful?
Any additional feedback you'd like to share with us?
Please tell us how we can improve this page.
Thank you for your feedback!
We value your opinion. Your feedback will help us improve our documentation.