Closed aphoe closed 7 months ago
Hi, while your solution is working, there was already a function set_metadata
in object PDFSignatureObject
whose aim is to address this problem. The body of set_signature_options
function should be moved to PDFSignatureObject
(because the PDFValueString
objects are missing) and so there is no need for modifying the constructor of PDFSignatureObject
.
The reason to set the fields in the PDFSignatureObject
is that this object encapsulates the appropriate key values, and avoids coupling the code from the PDFDoc
object.
@dealfonso Hi. The first thing I tried was using that option, but it didn't work. This is quite surprising because the set_metadata()
method updated the $_value
property of the PDFDoc
class.
I understand the coupling part and agree. However, I tried many options, and this is the only one that works.
The problem is that set_metadata
does not convert to PDFValueString
(my fault).
Oh! I see!
I'll work on that and create a PR if I have some time over the weekend.
Thank you for the help.
Developers can now add signature options (e.g., Name, Reason, Location, and ContactInfo) to a document's digital signature.
How it works