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. (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)

Properties

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

Example

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")

See Also