GroupDocs.Watermark for Python via .NET 24.5 Release Notes

We are thrilled to announce the first release of our product, the cutting-edge Python library designed to effortlessly add watermarks to your documents. Whether you need to protect sensitive information, establish brand consistency, or simply add a professional touch to your files, GroupDocs.Watermark for Python has got you covered.

Full list of changes in this release

KeyCategorySummary
WATERMARKPYTHON-1★ FeatureIntroduced support for adding a text watermark to a document
WATERMARKPYTHON-2★ FeatureIntroduced support for adding an image watermark to a document
WATERMARKPYTHON-3★ FeatureIntroduce support for searching watermarks in the document

Introduced support for adding a text watermark to a document

🌐 Python via .NET api supports adding text watermarks to documents. Enhance your documents with customizable text overlays, providing a unique touch to your content.

with gw.Watermarker(test_files.sample_docx) as watermarker:
    font = gww.Font("Arial", 36.0)
    watermark = gww.TextWatermark("top secret", font)
    watermark.foreground_color = gww.Color.red;
    watermark.horizontal_alignment = gwс.HorizontalAlignment.CENTER
    watermark.vertical_alignment = gwс.VerticalAlignment.CENTER

    watermarker.add(watermark)
    watermarker.save(join(output_directory, "result.docx"))

Introduced support for adding an image watermark to a document

🌐 Now, with Python, you can easily enhance your documents by adding image watermarks using our new feature

with gw.Watermarker(test_files.sample_xlsx) as watermarker:
    watermark = gww.ImageWatermark(test_files.LogoPng)
    watermark.horizontal_alignment = gwс.HorizontalAlignment.CENTER
    watermark.vertical_alignment = gwс.VerticalAlignment.CENTER

    watermarker.add(watermark)
    watermarker.save(join(output_directory, "result.xlsx"))

Introduce support for searching watermarks in the document

🌐 We’ve introduced support for searching watermarks within the document, making it easier for users to locate and manage their unique marks effortlessly.

with gw.Watermarker(test_files.sample_docx_with_watermarks) as watermarker:
    possible_watermarks = watermarker.search()
    for possible_watermark in possible_watermarks:
        if possible_watermark.image_data is not None:
            print(len(possible_watermark.image_data))

        print(possible_watermark.text)
        print(possible_watermark.x)
        print(possible_watermark.y)
        print(possible_watermark.rotate_angle)
        print(possible_watermark.width)
        print(possible_watermark.height)