addSignatureForPage method
Future<void>
addSignatureForPage({
- required PdfPage page,
- required PdfSignatureSigner signer,
- required PdfSignatureBounds bounds,
- String fieldName = 'Signature1',
- String? reason,
- String? location,
- String? contactInfo,
- String? name,
- DateTime? signingTime,
- PdfSignatureAppearance? appearance,
- Widget? appearanceWidget,
- void drawAppearance(
- PdfGraphics graphics,
- PdfRect bounds
- int? docMdpPermissionP,
- PdfTimestampProvider? timestampProvider,
- int contentsReserveSize = 16384,
- int byteRangeDigits = 10,
Implementation
Future<void> addSignatureForPage({
required PdfPage page,
required PdfSignatureSigner signer,
required PdfSignatureBounds bounds,
String fieldName = 'Signature1',
String? reason,
String? location,
String? contactInfo,
String? name,
DateTime? signingTime,
PdfSignatureAppearance? appearance,
pw.Widget? appearanceWidget,
void Function(PdfGraphics graphics, PdfRect bounds)? drawAppearance,
int? docMdpPermissionP,
PdfTimestampProvider? timestampProvider,
int contentsReserveSize = 16384,
int byteRangeDigits = 10,
}) async {
_ensureNotDisposed();
final pageIndex = pages.indexOf(page);
if (pageIndex == -1) {
throw ArgumentError('A pagina informada nao pertence ao documento.');
}
await addSignature(
PdfSignatureRequest(
pageNumber: pageIndex + 1,
signer: signer,
bounds: bounds,
fieldName: fieldName,
reason: reason,
location: location,
contactInfo: contactInfo,
name: name,
signingTime: signingTime,
appearance: appearance,
appearanceWidget: appearanceWidget,
drawAppearance: drawAppearance,
docMdpPermissionP: docMdpPermissionP,
timestampProvider: timestampProvider,
contentsReserveSize: contentsReserveSize,
byteRangeDigits: byteRangeDigits,
),
);
}