CPDFWatermarkConfig class

Configuration options for adding a watermark.

Supports both text and image watermarks, with full control over appearance, placement, and rendering behavior.

Constructors

CPDFWatermarkConfig({bool saveAsNewFile = true, Color? outsideBackgroundColor, List<CPDFWatermarkType> types = const [CPDFWatermarkType.text, CPDFWatermarkType.image], String text = "Watermark", String image = "", int textSize = 30, Color textColor = Colors.black, double scale = 1.5, int rotation = -45, int opacity = 255, bool isFront = false, bool isTilePage = false})
const

Properties

hashCode int
The hash code for this object.
no setterinherited
image String
The image source for the watermark.
final
isFront bool
Whether to render the watermark in front of the content.
final
isTilePage bool
Whether to tile the watermark across the entire page.
final
opacity int
Opacity of the watermark (0–255).
final
outsideBackgroundColor Color?
Background color outside the page area (optional).
final
rotation int
Rotation angle of the watermark (in degrees).
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
saveAsNewFile bool
Whether to save the watermarked document as a new file.
final
scale double
Scale factor for the watermark size.
final
text String
The watermark text content.
final
textColor Color
Color of the watermark text.
final
textSize int
Font size of the watermark text.
final
types List<CPDFWatermarkType>
Types of watermarks to apply (text, image, or both).
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toJson() Map<String, dynamic>
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited