lock document with signature #1097
-
Is there a way to block the document or textfield with digital signature? |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments
-
When you digitally sign a document it is "blocked" so to speak. Conforming readers should not allow to change it. There are tools however (like the apple preview) which completely ignores this and allow changes to the document and thus break it. |
Beta Was this translation helpful? Give feedback.
-
Thanks for your answer @Lonzak Perhaps I have not been very precise in my query, the case that I am trying to solve is that several signatures are inserted in the document and before the last signature the fields are filled in is where I need to block the fields. Reviewing I could verify that it is possible to do it with iText 5.5.6 by means of the following code:
however I would like to know if it is also possible to do it with OpenPDF. thank you for your help. |
Beta Was this translation helpful? Give feedback.
-
Yes that is quite possible. However note, that applying a LOCK to a field doesn't mean that filling the field is blocked. The spec says about the LOCK flag: |
Beta Was this translation helpful? Give feedback.
-
The OP does not talk about the lock flag, he talks about signature field lock dictionaries. More exactly, a use of signature field lock dictionaries that is not already specified in ISO 32000-1 but only in Adobe extensions thereof and in ISO 32000-2, the change of the MDP level of the document. |
Beta Was this translation helpful? Give feedback.
-
Ah you are right, was too skimming to quickly :-) |
Beta Was this translation helpful? Give feedback.
-
Indeed, the |
Beta Was this translation helpful? Give feedback.
-
First of all thank you for your answers. I am just trying to do what @mkl-public mentions in your comment, maybe you could help me to better understand the idea by using a code snippet how to add a LOCK to the dictionary with openPDF, similar to what the thank you for your help. |
Beta Was this translation helpful? Give feedback.
-
Improvements in pull requests are welcome! |
Beta Was this translation helpful? Give feedback.
Indeed, the
PdfSigLockDictionary
class is no magic, merely a dictionary with a very few entries.But one should be aware that there is no explicit OpenPDF support for the lock dictionary during signing; in iText such support started during the 5.3.x versions. This might be of interest if the OP wants to apply that "last signature" using OpenPDF. (It might work out of the box, though. If I recall correctly, the feature the OP wants to use doesn't require further actions during signing.)