timestampServer property
Gets or sets time stamping server unique resource identifier.
The timestamp is only embedded when signing the PDF document and saving asynchronously.
//Creates a new PDF document
PdfDocument document = PdfDocument();
//Adds a new page
PdfPage page = document.pages.add();
//Creates a digital signature and sets signature information
PdfSignatureField field = PdfSignatureField(page, 'signature',
bounds: Rect.fromLTWH(0, 0, 200, 100),
signature: PdfSignature(
//Creates a certificate instance from the PFX file with a private key
certificate: PdfCertificate(
File('D:/PDF.pfx').readAsBytesSync(), 'syncfusion'),
contactInfo: 'johndoe@owned.us',
locationInfo: 'Honolulu, Hawaii',
reason: 'I am author of this document.',
//Create a new PDF time stamp server
timestampServer:
TimestampServer(Uri.parse('http://syncfusion.digistamp.com'))));
//Add a signature field to the form
document.form.fields.add(field);
//Save and dispose the PDF document
File('Output.pdf').writeAsBytes(await document.save());
document.dispose();
Implementation
TimestampServer? timestampServer;