Closed rossinicolas closed 11 months ago
Thou you are not asking any question, I think this answers them: https://github.com/vbuch/node-signpdf/blob/cef8915064d3862e2e08f5fa9e6e09687a468d42/README.md?plain=1#L61
Here is where this requirement comes from: https://github.com/vbuch/node-signpdf/blob/4cedc49fffa4d4bbac2bd855b78555a9cff64e4d/src/signpdf.js#L57
Basically, because we are not parsing anything as a structure from the file, but just moving a cursor withing strings, we introduce that limitation. If you want this to work, you would have to rework it not to do findByteRange() but rather get the whole Sig
as a structure and work with it.
As usually, PRs are welcome.
Thou you are not asking any question, I think this answers them:
Here is where this requirement comes from:
Basically, because we are not parsing anything as a structure from the file, but just moving a cursor withing strings, we introduce that limitation. If you want this to work, you would have to rework it not to do findByteRange() but rather get the whole
Sig
as a structure and work with it.As usually, PRs are welcome.
Yes, i understood the Requirement but i don't know why that's different than a pdf files signed using Acrobat Reader for example. That's a big problem in our implementation bacause if an enduser upload a file firstly signed by Acrobat and make a second Sign using node-signpdf, the pdf file just show me the last Sign when i open it in Acrobat, losing the first one.
This issue has been automatically marked as stale because it has not had activity in the past 90 days. It will be closed if no further activity occurs. Thank you for your contributions.
Hi @vbuch , now a day, i'm using FortifyApp client in our web application to access to Token certificate that i'm using to sign the PDF files. Previously, i'm adding placeholder with node-signpdf library (plainAddPlaceholder helper). we are making multiple signatures in this way, without any ploblem, but, if i use an external tools to add a new sign, like xolidosign, CryptoId or other similar the /Type/Sig section had different order than the produced by node-signpdf. There's an example of the issue that i have:
using node-signpdf `<< /Type /Sig /Filter /Adobe.PPKLite /SubFilter /adbe.pkcs7.detached /ByteRange [0 8327 24713 894]
/Contents <3082059406092a864886f70d010702a082058...> /Reason (FD) /M (D:20221213114802Z) /ContactInfo (informatica@jus.gov.ar) /Name (Firma Digital) /Location (Poder Judicial)
using external tools:
<</Contents <308208a406092a864886f70d010702a0...>/Filter/Adobe.PPKLite/Type/Sig/ByteRange [0 7912 37914 1624 ] /SubFilter/adbe.pkcs7.detached/Reason()/Location()/ContactInfo()/M(D:20221213120145-03'00')>>
summary, /Contents tag is in different order, so, depending on the method used, acrobat is show me all the sign or just the last one. TIA.