PdfSignatureField constructor
PdfSignatureField(
- PdfPage page,
- String name, {
- Rect bounds = Rect.zero,
- int? borderWidth,
- PdfHighlightMode? highlightMode,
- PdfSignature? signature,
- String? tooltip,
- PdfColor? backColor,
- PdfColor? borderColor,
- PdfBorderStyle? borderStyle,
Initializes a new instance of the PdfSignatureField class.
Implementation
PdfSignatureField(PdfPage page, String name,
{Rect bounds = Rect.zero,
int? borderWidth,
PdfHighlightMode? highlightMode,
PdfSignature? signature,
String? tooltip,
PdfColor? backColor,
PdfColor? borderColor,
PdfBorderStyle? borderStyle}) {
_helper = PdfSignatureFieldHelper(this);
_helper.internal(page, name, bounds,
borderWidth: borderWidth,
highlightMode: highlightMode,
tooltip: tooltip,
backColor: backColor,
borderColor: borderColor,
borderStyle: borderStyle);
form!.fieldAutoNaming
? PdfAnnotationHelper.getHelper(_helper.widget!)
.dictionary!
.setProperty(PdfDictionaryProperties.ft,
PdfName(PdfDictionaryProperties.sig))
: _helper.dictionary!.setProperty(
PdfDictionaryProperties.ft, PdfName(PdfDictionaryProperties.sig));
if (PdfPageHelper.getHelper(page).document != null) {
PdfFormHelper.getHelper(form!).signatureFlags = <SignatureFlags>[
SignatureFlags.signaturesExists,
SignatureFlags.appendOnly
];
}
if (signature != null) {
this.signature = signature;
}
if (borderWidth != null ||
borderColor != null ||
backColor != null ||
borderStyle != null) {
_helper.appearance = true;
}
}