-
Notifications
You must be signed in to change notification settings - Fork 259
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
External signatures #108
Comments
This class was introduced in v2.0.3 and this library is currently up to date with v1.8.9, so it will be some time before this library will be caught up. I haven't had a chance to take a look at the code for ExternalSigningSupport yet, but I"ll see what it does and if it can easily be replicated easily. |
I believe I've added the functionality you need if that's the only part that's giving you trouble. I've attached an aar with the necessary changes. |
Hello Tom! |
I must have missed PDDocument, Try this one. |
Hey Tom, The code sample i am using is the following: `package com.example.joao.pdfboxtests2; import android.os.Environment; import com.tom_roush.pdfbox.pdmodel.PDDocument; import java.io.BufferedInputStream; public class MainActivity extends AppCompatActivity {
}` The error it gives is the following: Meanwhile i´ve tryed to use the following code provided in the samples setup() and happens exactly the same, the arrayIndexOutOfBounds. |
I too get the same error 👍 .. public ExternalSigningSupport saveIncrementalForExternalSigning(OutputStream output) throws IOException { The error is here ** in the write(this) public void write(PDDocument doc) throws IOException { |
Seems like this is more difficult than I hoped. Would it be possible for either of you to share a test signature file that fails that I could use for testing? |
Hey Tom, |
Never mind, I managed to get the error again with my signature. |
Hello Tom, |
That's great. I can't check right now, but if everything works as it should, feel free to make a pull request. |
Sorry if this is a nub question but I do not find ExternalSigningSupport class when I add this line in build.gradle dependencies - This class is not available - Why? Does this library still depends on PDFBox below v2.0.3? |
Hello!
I am trying to make a digital signature on PDFs and ive been doing some tests with pdfbox-android. First ive tryed to add a external signature on desktop environment with success using the :
ExternalSigningSupport externalSigning = document.saveIncrementalForExternalSigning(fos);
byte[] cmsSignature = Files.readAllBytes(pathToSignedHash);
externalSigning.setSignature(cmsSignature);
So this is where the problem comes now, i dont have the required classes on the android pdfbox and i cant seem to find a way around it. Any way to make an external signature work in this actual version of android pdfbox or in any soon release?
By the way great work so far :)
The text was updated successfully, but these errors were encountered: