TileOptions class

TileOptions class

Represents options for configuring watermarks in tile mode.

The TileOptions type exposes the following members:

Constructors

Constructor Description
init

Properties

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.

Example

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)

Guides

Task guides that use TileOptions:

See Also