CPDFBackground class

Complete document background configuration.

Native SDKs do not expose the source image of an existing image background. Consequently, imagePath is a write-only input and is null when an image background is read from a document.

Constructors

CPDFBackground({required List<int> pages, required CPDFBackgroundType type, Color? color, String? imagePath, double opacity = 1, double scale = 1, double rotation = 0, CPDFBackgroundHorizontalAlignment horizontalAlignment = CPDFBackgroundHorizontalAlignment.center, CPDFBackgroundVerticalAlignment verticalAlignment = CPDFBackgroundVerticalAlignment.center, double horizontalOffset = 0, double verticalOffset = 0, bool allowView = true, bool allowPrint = true})
const
CPDFBackground.color({required List<int> pages, required Color color, double opacity = 1, double scale = 1, double rotation = 0, CPDFBackgroundHorizontalAlignment horizontalAlignment = CPDFBackgroundHorizontalAlignment.center, CPDFBackgroundVerticalAlignment verticalAlignment = CPDFBackgroundVerticalAlignment.center, double horizontalOffset = 0, double verticalOffset = 0, bool allowView = true, bool allowPrint = true})
const
CPDFBackground.fromJson(Map<String, dynamic> json)
factory
CPDFBackground.image({required List<int> pages, required String imagePath, double opacity = 1, double scale = 1, double rotation = 0, CPDFBackgroundHorizontalAlignment horizontalAlignment = CPDFBackgroundHorizontalAlignment.center, CPDFBackgroundVerticalAlignment verticalAlignment = CPDFBackgroundVerticalAlignment.center, double horizontalOffset = 0, double verticalOffset = 0, bool allowView = true, bool allowPrint = true})
const

Properties

allowPrint → bool
final
allowView → bool
final
color → Color?
final
hashCode → int
The hash code for this object.
no setterinherited
horizontalAlignment → CPDFBackgroundHorizontalAlignment
final
horizontalOffset → double
final
imagePath → String?
Local image path used when applying an image background.
final
opacity → double
final
pages → List<int>
final
rotation → double
final
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited
scale → double
final
type → CPDFBackgroundType
final
verticalAlignment → CPDFBackgroundVerticalAlignment
final
verticalOffset → double
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
validateForUpdate() → String?
Validates this value before it is sent to a native SDK.

Operators

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