find_images method
Leave feedback
On this page
Finds images according to the specified search criteria. The search is conducted in the objects specified in Watermarker.SearchableObjects.
def find_images(self, search_criteria):
...
| Parameter | Type | Description |
|---|---|---|
| search_criteria | ImageSearchCriteria |
The search criteria to use. |
Returns: The collection of the found images.
from groupdocs.watermark import Watermarker
from groupdocs.watermark.watermarks import TextWatermark, Font
from groupdocs.watermark.options.word_processing import WordProcessingLoadOptions
with Watermarker("./document.docx", WordProcessingLoadOptions()) as watermarker:
watermark = TextWatermark("Protected image", Font("Arial", 8.0))
content = watermarker.get_content()
for image in content.sections[0].find_images():
image.add(watermark)
watermarker.save("./output.docx")
Finds all images in the content, searching within the objects specified in Watermarker.SearchableObjects.
def find_images(self):
...
Returns: The collection of the found images.
from groupdocs.watermark import Watermarker
from groupdocs.watermark.watermarks import TextWatermark, Font
from groupdocs.watermark.options.word_processing import WordProcessingLoadOptions
with Watermarker("./document.docx", WordProcessingLoadOptions()) as watermarker:
watermark = TextWatermark("Protected image", Font("Arial", 8.0))
content = watermarker.get_content()
for image in content.sections[0].find_images():
image.add(watermark)
watermarker.save("./output.docx")
- class
ContentPart
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.