We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Reading certificate from asset to use in PdfSignatureField

I am trying to read the pix from assets folder but do not know what file type I should use.

      if (document.form.fields[i].name == 'Signature') {

        final ByteData data =

            await rootBundle.load('assets/pfx/certificate.pfx');

        final List<int> bytes =

            data.buffer.asUint8List(data.offsetInBytes, data.lengthInBytes);


          PdfSignatureField(document.pages.add(), 'Sign',

              bounds: document.form.fields[i].bounds,

              signature: PdfSignature(

                  certificate: PdfCertificate(bytes, 'password123'))),



1 Reply

CM Chinnu Muniyappan Syncfusion Team April 21, 2023 12:14 PM UTC

To perform digital signing, it is recommended to utilize a certificate that has a private key, such as a .pfx file. The user guide documentation on signing PDF documents using a .pfx file is available for your reference. https://help.syncfusion.com/flutter/pdf/working-with-digital-signature#adding-a-digital-signature

Additionally, we kindly ask for further information regarding your needs, as this will assist us in analyzing the situation more thoroughly and providing you with updates accordingly.

Live Chat Icon For mobile
Up arrow icon