Issues during PPTX files tile watermarking

Hey, another issue is related to PPTX files during tile watermarking. There are two issues that I would like to underline.

Firstly, it looks like line_spacing value is completely broken (e.g there is almost no difference between 100.0 and 200.0 POINTS / PIXELS and it accepts negative values which work in strange way as well).

Secondly, in case of specifying rotate_angle for tile pattern, watermarks are visible and added far beyond the content of the page. I’ve noticed that this bug is not that bad in case of setting positive value, but it’s pretty annoying in case of negative value. I’m attaching screenshots for both.

Negative -45.0 rotate_angle value - Screenshot 2024-12-15 at 20.24.24.jpg (80.3 KB)
Positive 45.0 rotate_angle value - Screenshot 2024-12-15 at 20.25.14.png (82.3 KB)

The overall code snippet that I’m using:

def main():
    document_path = 'input.pptx'
    output_document_path = 'output.pptx'

    with gw.Watermarker(document_path) as watermarker:
        font = gww.Font('Helvetica', 12.0)
        watermark = gww.TextWatermark(f'{USER_EMAIL}\n{FILE_ID}\n{DISCLAIMER}', font)
        watermark.foreground_color = gww.Color.gray
        watermark.opacity = 0.4
        watermark.rotate_angle = -45.0
        watermark.text_alignment = gww.TextAlignment.CENTER

        line_spacing = gww.MeasureValue()
        line_spacing.measure_type = gww.TileMeasureType.POINTS
        line_spacing.value = 100.0

        watermark_spacing = gww.MeasureValue()
        watermark_spacing.measure_type = gww.TileMeasureType.POINTS
        watermark_spacing.value = 50.0

        watermark.tile_options = gww.TileOptions()
        watermark.tile_options.line_spacing = line_spacing
        watermark.tile_options.watermark_spacing = watermark_spacing

        watermark_options = gwop.PresentationWatermarkSlideOptions()
        watermark_options.is_locked = True

        watermarker.add(watermark, options=watermark_options)

        watermarker.save(output_document_path)

Do you have any ideas how I can fix this in current latest version or maybe you already have plans / ideas for fixing these two issues in next versions?

Thanks for your response in advance

@artempenteskul
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WATERMARKNET-1949

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Hi @artempenteskul ,
Thank you for reporting the issue with the line_spacing value. We will investigate this and work on a fix as soon as possible.
Regarding watermarks appearing outside of the presentation page content, this is a known issue that we are currently working on. We’ll notify you once both issues are resolved and included in a future release.

Thank you for your patience and for bringing these matters to our attention.

1 Like