TileOptions class
Leave feedback
On this page
Represents options for configuring watermarks in tile mode.
The TileOptions type exposes the following members:
| Constructor | Description |
|---|---|
| init |
| Property | Description |
|---|---|
| line_spacing | The spacing between lines for watermarks in tile mode. |
| rotate_around_origin | The property indicates whether repeated watermarks are rotated around the center of the document. |
| tile_type | The type of tile alignment for watermarks. |
| watermark_spacing | The spacing between serials for watermarks in tile mode. |
from groupdocs.watermark import Watermarker
from groupdocs.watermark.watermarks import (
TextWatermark, Font, Color, TextAlignment,
TileOptions, TileType, MeasureValue, TileMeasureType,
)
with Watermarker("./sample.pdf") as watermarker:
watermark = TextWatermark("CONFIDENTIAL", Font("Arial", 19.0))
watermark.foreground_color = Color.gray
watermark.opacity = 0.3
watermark.rotate_angle = -45.0
watermark.text_alignment = TextAlignment.CENTER
line_spacing = MeasureValue()
line_spacing.measure_type = TileMeasureType.PERCENT
line_spacing.value = 12.0
watermark_spacing = MeasureValue()
watermark_spacing.measure_type = TileMeasureType.PERCENT
watermark_spacing.value = 10.0
tile_options = TileOptions()
tile_options.tile_type = TileType.ONE_THIRD_OFFSET
tile_options.line_spacing = line_spacing
tile_options.watermark_spacing = watermark_spacing
watermark.tile_options = tile_options
watermarker.add(watermark)
Task guides that use TileOptions:
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.