syncfusion / flutter-widgets

Syncfusion Flutter widgets libraries include high quality UI widgets and file-format packages to help you create rich, high-quality applications for iOS, Android, and web from a single code base.
1.6k stars 788 forks source link

Bug: Adding a digital signature to a pdf with an existing digital signature field doesn't work #1616

Closed cyberneid closed 10 months ago

cyberneid commented 10 months ago

I have to add a digital signature to an existing document containing a digital signature field, ready to be signed. I used your example code below but document.form.fields is always empty. It seems that syncfusion_flutter_pdf library is not able to return an existing signature field.

//Loads an existing PDF document.
PdfDocument document =
    PdfDocument(inputBytes: File('input.pdf').readAsBytesSync());

//Gets the first signature field of the PDF document.
PdfSignatureField field = document.form.fields[0] as PdfSignatureField;
cyberneid commented 10 months ago

My mistake. it works