-
-
Notifications
You must be signed in to change notification settings - Fork 172
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem signing more than once on some PDF files. #75
Comments
I have reviewed the signed trailer twice and I really can't find the problem.
|
Did you try debugging with https://github.com/ninja-labs-tech/verify-pdf ? |
I've finished testing it with the library you recommend, but from what I see, I only get the first signature to verify, not all. I did tests with correctly signed PDFs and others with error and it only takes the first signature, not all.
|
In some cases I use large PDF files, it cuts the pages and replaces them on blank pages. |
In the library, there is a Before the first signature, the document gets this extract.
At the time of getting the references before signing for the second time, there is a jump:
If we see, there is no reference 187, and the same thing happens after signing a second time. |
I found something that seems to be the problem. Here the image of what I explain. Now my question is where can you find the function that this |
It is great that you found and fixed the issue. That's what the repo is all about. I've written a comment in the related PR #76 |
The issue regarding
But when I check the @vbuch, You think you can keep this issue open until you fix it. |
Hi guys, the bug has been fixed. The problem is that the library was looking for the This can be seen in this line of your code @vbuch lineError In this line of code, you will see that once the @vbuch, you can check it to do |
Nice find. I was wondering how magical this 12 was when I was first reviewing it. Well, itbwas not magical enough obviously. The problem with such a regex is that it is executed on a potentially large amount of content. Thats why i would prefer not to have a regex directly but first try to find a smaller portion of relevant content. Extracting the dictionary and then regexing on top of it. It would be really nice if you can find a way to do this. This piece of code is in the pdfkit helper which is a bit of an error but thats just unfortunate. Dont waste too much time on it. It needs some refactoring either way. I guess ill do it when i split the packages. I will accept it with the regex. Give it a quick try just in case you can think of something more performant. |
You are right to make a regular expression in a smaller section. But I am with a late project that does not leave me much time. I hope to solve it later! |
Done, I've already uploaded this update. |
Hi @therpobinski I downloaded your repository but i still have the same issue. Have you come across a solution for this? |
Mmmmm is very very strange! |
Hi @therpobinski, thank you for helping. I have the buffer before and after signing it, i'm attaching them both. Also, i tried with 4 other files but encountered the same problem! |
You can supply the PDF files or the buffer.string.
|
@therpobinski thanks again! I'm attaching 3 files:
Seems like the signature is changing the document somehow. signTest_original.pdf |
Ok, so I check it out! I think it's something from cross-referencing. |
@therpobinski thanks again! |
Not yet, I am honest, I am very busy at my work, I will review it during the weekend and I tell you some news. |
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 guys, I hope you can help me. I have a pdf that I want to sign more than once. When I sign the first time, it usually does, but when I sign the second time, I have an error signing.
I thought the error was somewhat similar to before when we added links, but I think the error is another. I hope you can help me.
This is the pdf signed and with error.
The text was updated successfully, but these errors were encountered: