-
Notifications
You must be signed in to change notification settings - Fork 256
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
[BUG] Protected files cannot be signed #169
Comments
@gunnsth No, #175 solves a different issue. In the meantime, as a workaround, you could use a writer to create a temporary file with no encryption and use that with the appender. What I'm suggesting is basically:
|
@knadh Were you able to try the workaround suggested? |
My memory is a little hazy here, but I think you would end up decrypting a password protected file and signing it, but losing password protection in the process. As in, it didn't work. |
Hi, is there any update? I am facing same issue and workaround doesn't work. As mentioned by @knadh using workaround will losing password protection in signed file |
it works perfectly for me. thank you |
Description
A PDF that's already password protected, or one that's created with unipdf's Encrypt() can no longer be digitally signed using the Appender{}. It throws the error
page 1 not found
.Expected Behavior
It should be possible to open a PDF, decrypt it using Decrypt(), and use an Appender{} to apply a digital signature.
NewPdfAppender()
makes a copy of an incoming readerunipdf/model/appender.go
Line 136 in 47ae7e2
.Decrypt()
right after the copy is made and the error vanished, but the output lost all PDF contents and produced a blank page. This could potentially be due to the object comparison that happens in the update methods in the Appender.The text was updated successfully, but these errors were encountered: