CPDFWatermark class

Constructors

CPDFWatermark({required CPDFWatermarkType type, required List<int> pages, String textContent = "", String imagePath = "", Color textColor = Colors.black, int fontSize = 24, double scale = 1.0, double rotation = 45, double opacity = 1, CPDFWatermarkVerticalAlignment verticalAlignment = CPDFWatermarkVerticalAlignment.center, CPDFWatermarkHorizontalAlignment horizontalAlignment = CPDFWatermarkHorizontalAlignment.center, double verticalOffset = 0, double horizontalOffset = 0, bool isFront = true, bool isTilePage = false, double horizontalSpacing = 0, double verticalSpacing = 0})
CPDFWatermark.image({required String imagePath, required List<int> pages, double scale = 1.0, double rotation = 45.0, double opacity = 1.0, CPDFWatermarkVerticalAlignment verticalAlignment = CPDFWatermarkVerticalAlignment.center, CPDFWatermarkHorizontalAlignment horizontalAlignment = CPDFWatermarkHorizontalAlignment.center, double verticalOffset = 0.0, double horizontalOffset = 0.0, bool isFront = true, bool isTilePage = false, double horizontalSpacing = 0.0, double verticalSpacing = 0.0})
Image watermark constructor
CPDFWatermark.text({required String textContent, required List<int> pages, Color textColor = Colors.black, int fontSize = 24, double scale = 1.0, double rotation = 45.0, double opacity = 1.0, CPDFWatermarkVerticalAlignment verticalAlignment = CPDFWatermarkVerticalAlignment.center, CPDFWatermarkHorizontalAlignment horizontalAlignment = CPDFWatermarkHorizontalAlignment.center, double verticalOffset = 0.0, double horizontalOffset = 0.0, bool isFront = true, bool isTilePage = false, double horizontalSpacing = 0.0, double verticalSpacing = 0.0})
Text watermark constructor

Properties

fontSize int
final
hashCode int
The hash code for this object.
no setterinherited
horizontalAlignment CPDFWatermarkHorizontalAlignment
Horizontal alignment of the watermark, default is center alignment
final
horizontalOffset double
Horizontal offset for watermark position
final
horizontalSpacing double
Set the horizontal spacing for tiled watermarks
final
imagePath String
Image path for image-type watermark
final
isFront bool
Position the watermark in front of the content
final
isTilePage bool
Enable watermark tiling
final
opacity double
Watermark opacity, default is 1.0, range is 0.0 to 1.0
final
pages List<int>
Pages to add the watermark to, e.g., "1,2,3,4,5"
final
rotation double
Watermark rotation angle, default is 45°
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
scale double
Scaling factor, default is 1.0
final
textColor Color
final
textContent String
Text content for text-type watermark
final
type CPDFWatermarkType
Watermark type, can be either CPDFWatermarkType.text or CPDFWatermarkType.image
final
verticalAlignment CPDFWatermarkVerticalAlignment
Vertical alignment of the watermark, default is vertical center alignment
final
verticalOffset double
Vertical offset for watermark position
final
verticalSpacing double
Set the vertical spacing for tiled watermarks
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