WordProcessingContent class

WordProcessingContent class

Represents a Word document (doc, docx, etc.) where a watermark can be placed.

Learn more:

The WordProcessingContent type exposes the following members:

Methods

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. The search is conducted in the objects specified in Watermarker.SearchableObjects. (inherited from ContentPart)
find_images_image_search_criteria (inherited from ContentPart)
search Finds possible watermarks according to the specified search criteria. The search is performed on the objects listed in Watermarker.SearchableObjects. (inherited from ContentPart)
search_search_criteria (inherited from ContentPart)

Properties

Property Description
page_count The number of pages in the document.
sections The collection of all sections of this WordProcessingContent.

Example

from groupdocs.watermark import Watermarker
from groupdocs.watermark.options.word_processing import WordProcessingLoadOptions

load_options = WordProcessingLoadOptions()
with Watermarker("input.docx", load_options) as watermarker:
    # Add watermark to a particular or all sections here if needed.
    watermarker.save("output.docx")

See Also