Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to use Signature? How to digitally sign the generated PDF. #1730

Open
xSuperMu opened this issue Aug 28, 2024 · 5 comments
Open

How to use Signature? How to digitally sign the generated PDF. #1730

xSuperMu opened this issue Aug 28, 2024 · 5 comments
Labels
needs triage support Asking for help writing an application

Comments

@xSuperMu
Copy link

Screenshot 2024-08-28 at 5 26 36 PM

pw.Container(
            width: double.infinity,
            padding: const pw.EdgeInsets.all(8),
            decoration: pw.BoxDecoration(
              border: pw.Border.all(
                color: PdfColors.blue,
                width: .5,
              ),
            ),
            child: pw.Column(
              crossAxisAlignment: pw.CrossAxisAlignment.start,
              children: [
                pw.Row(
                  children: [
                    pw.Text(
                      'First Name:',
                      style: customerDetailsTextStyle,
                    ),
                    pw.SizedBox(width: 10),
                    pw.Text(
                      _fNameCtrl.text,
                    ),
                  ],
                ),
                pw.SizedBox(height: 8),
                pw.Row(
                  children: [
                    pw.Text(
                      'Surname:',
                      style: customerDetailsTextStyle,
                    ),
                    pw.SizedBox(width: 10),
                    pw.Text(
                      _surNameCtrl.text,
                    ),
                  ],
                ),
                pw.SizedBox(height: 8),
                pw.Row(
                  children: [
                    pw.Text(
                      'Installation Address:',
                      style: customerDetailsTextStyle,
                    ),
                    pw.SizedBox(width: 10),
                    pw.Text(
                      _addressCtrl.text,
                    ),
                  ],
                ),
                pw.SizedBox(height: 8),
                pw.Row(
                  children: [
                    pw.Text(
                      'Email:',
                      style: customerDetailsTextStyle,
                    ),
                    pw.SizedBox(width: 10),
                    pw.Text(
                      _emailCtrl.text,
                    ),
                  ],
                ),
                pw.SizedBox(height: 8),
                pw.Signature(
                  name: 'signature',
                  child: pw.Text('Please sign here'),
                  // value: ,  <<<<<<<---------------------------------------------
                ),
              ],
            ),
          )

How to use the value attribute?

@xSuperMu xSuperMu added needs triage support Asking for help writing an application labels Aug 28, 2024
@DavBfr
Copy link
Owner

DavBfr commented Aug 28, 2024

Something like:

Signature(
          name: 'Signature',
          value: PdfSign.rsaSha1(
            privateKey: privateKey,
            certificates: chain,
          ),
          child: PdfLogo(),
        ),

It's described here: https://pub.nfet.net/pdf_crypto/

@xSuperMu
Copy link
Author

@DavBfr This is a paid feature, Right?

@DavBfr
Copy link
Owner

DavBfr commented Aug 28, 2024

Yes it is. It's for digital cryptographic signature, not for hand-signed.

@xSuperMu
Copy link
Author

Thank you @DavBfr for the prompt response.
I think that I only need the hand-signed feature. How to achieve that?

@DavBfr
Copy link
Owner

DavBfr commented Aug 28, 2024

Ask the user to draw with a hand sign flutter plugin and add it as an image in the pdf.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs triage support Asking for help writing an application
Projects
None yet
Development

No branches or pull requests

2 participants