Closed gabrieltosh closed 7 months ago
hi, do you mean a visible text for the signature?
Hello Alfonso, if reviewing the code I saw that there is a function for the metadata for the signature, is this function available?
hi,
there is a "reason" value in the metadata, which appears as metadata for the signature but has no visual effect (i.e. it is not rendered). If you use the PDFSignatureObject class, you can add the metadata and it would be added to the resulting PDF.
But the thing is that the library does not implement adding a reason at this moment at an upper level. It is easy to implement (e.g. adding a new parameter to the set_signature_appearance or creating a new method). Please try it and if you manage to include it, please pull it to the library.
Hi @dealfonso,
Please give me a pointer on adding info to the signature.
I want to add Reason, Name, Location, and ContactInfo to the signature. I want to do this by adding the extra parameter to set_signature_certificate()
since it will be invisible.
I have tried tweaking _generate_signature_in_document()
by setting the metadata of the PDFSignatureObject created in __generate_signature_in_document()
on Line 400
This doesn't work. The document doesn't come out with a signature instead.
I have also tried to add a "Reason" element to the $annotation_object
on Line 403 But it doesn't work.
Hopefully, I can get this right and do a PR.
This is what the fields are supposed to look like if it works properly.
Thanks for all the work and your response.
@dealfonso Hi, I have figured this out. And I have created a PR. Please review it as soon as you can. Thank you!
I find that PR #68 solves this problem
I need to enter the signature detail, but I see that the set_signature_certificate function is only for the certificate, is there any other function?