Watermark

data class Watermark(val text: String, val anchor: WatermarkAnchor? = null, val offsetX: Double? = null, val offsetY: Double? = null, val rotation: Double? = null, val color: String? = null, val size: Double? = null, val opacity: Double? = null, val font: String? = null, val fromPage: Int? = null, val toPage: Int? = null)

One entry of Watermarks. text supports {#PAGE_NUMBER} and {#PAGE_TOTAL}.

Constructors

Link copied to clipboard
constructor(text: String, anchor: WatermarkAnchor? = null, offsetX: Double? = null, offsetY: Double? = null, rotation: Double? = null, color: String? = null, size: Double? = null, opacity: Double? = null, font: String? = null, fromPage: Int? = null, toPage: Int? = null)

Types

Link copied to clipboard
class Builder(text: String)

Builder for one Watermark, used through PdfOptions.Builder.watermark.

Properties

Link copied to clipboard

Anchor point on the page; null leaves the Carbone default.

Link copied to clipboard

#RGB or #RRGGBB.

Link copied to clipboard
val font: String?

Font family name.

Link copied to clipboard

First page the watermark appears on, 1-based; null leaves the Carbone default.

Link copied to clipboard

Horizontal offset from anchor, in points.

Link copied to clipboard

Vertical offset from anchor, in points.

Link copied to clipboard

0..1

Link copied to clipboard

Rotation, in degrees.

Link copied to clipboard
val size: Double?

Font size.

Link copied to clipboard
Link copied to clipboard
val toPage: Int?

Last page the watermark appears on, 1-based; null leaves the Carbone default.