__init__ constructor
Leave feedback
On this page
Initializes a new TextWatermark with the specified text and font.
def __init__(self, text, font):
...
| Parameter | Type | Description |
|---|---|---|
| text | str |
The text to be used as watermark. |
| font | Font |
The font of the text. |
from groupdocs.watermark import Watermarker
from groupdocs.watermark.watermarks import TextWatermark, Font, Color
with Watermarker("document.pdf") as watermarker:
watermark = TextWatermark("CONFIDENTIAL", Font("Arial", 48))
watermark.foreground_color = Color.red
watermarker.add(watermark)
watermarker.save("watermarked.pdf")
- class
TextWatermark
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.