1

I am using pyhanko for a digital sign app development.

A PDF signature is always contained in a signature field in the PDF’s form structure. Freeware PDF readers that do not have form editing functionality will typically not allow you to manipulate signature fields directly, but might allow you to fill existing form fields with a signature, or create a signature together with its corresponding form field. Using pyHanko, we can both insert new (empty) signature fields, and fill in existing ones.

If someone had experience in pyhanko, could you help me with that?

Here is a sample code;

from pyhanko.sign import fields

fields.SigFieldSpec(
    'Sig1', box=(10, 74, 140, 134),
    field_mdp_spec=fields.FieldMDPSpec(
        fields.FieldMDPAction.INCLUDE, fields=['SomeTextField']
    ),
    doc_mdp_update_value=fields.MDPPerm.FORM_FILLING
)
Martin Thoma
  • 124,992
  • 159
  • 614
  • 958
MaSao93
  • 132
  • 1
  • 10
  • Did you ever get an answer to your question? I've got some experience with pyhanko – cjl Sep 22 '22 at 13:20
  • No, I did not get yet – MaSao93 Sep 23 '22 at 02:16
  • Hi, are you still having issues? If so, would you mind explaining in a little more detail what exactly you're trying to do? I wrote (and continue to maintain) pyHanko, so I can probably help you out. For what it's worth, the `box` parameter determines the position of the field on the page: https://pyhanko.readthedocs.io/en/latest/api-docs/pyhanko.sign.fields.html#pyhanko.sign.fields.SigFieldSpec.box. But maybe that wasn't what you meant? – mval Sep 27 '22 at 19:57

0 Answers0