forked from python-openxml/python-docx
-
Notifications
You must be signed in to change notification settings - Fork 0
Phase D.23: Watermark support (text and image) #36
Copy link
Copy link
Open
Labels
Description
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)
Reactions are currently unavailable