Skip to content

Phase D.23: Watermark support (text and image) #36

@loadfix

Description

@loadfix

Add support for adding text and image watermarks to documents.

API Design

  • section.add_text_watermark(text, font='Calibri', size=Pt(72), color=RGBColor(0xC0,0xC0,0xC0), layout='diagonal')
  • section.add_image_watermark(image_path, width, height)
  • section.remove_watermark()

Implementation

Watermarks are implemented as shapes in the header:

  • Text watermark: VML shape (v:shape with v:textpath) in the default header
  • Image watermark: VML shape with v:imagedata in the default header
  • Modern Word also supports DrawingML-based watermarks

Needs to add/modify the header part for each section.

Upstream: python-openxml#845 (8 comments)

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestphase-dQuality of Life

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions