Skip to content

MarkYav/PDF-digital-sign

Repository files navigation

PDF digital sign

Demonstration how to sign a PDF using certificate

I want to share how to sign a pdf from the very beggining when I haven't forgot everyting.

First

First thing first it is noce to know what is a pdf signature and how you can make it in other programms. Here go videos I like:

Second

Basically, to make a digital sign (not electronic sign) of a PDF you have to have two thing: a PDF to sign and a certificate. Also, you can create a certificate (I have done it too). Good article about it:

Third

We will use two libraries: spongycastle and pdfbox-android

The spongycastle (https://glossarytech.com/terms/android/spongycastle) is the bouncycastle with little work around so it is easier use on Android. But it is up to you which one to use. It will be used for cryptographic algorithms in order to make your application secure and also to generate a certificate.

THe pdfbox-android is the pdfbox by Apache with little work around so it is easier use on Android. There are many other libraries (like iText), but be careful not to mess up with the licence (using iText you have to make your code open source). It will be used for signing a PDF.

Fourth

Lets start from creating a new certificate. I think we should do it first to understand what it is and how it is build. Good article about it:

Fifth

As you can see, there are a lot of new things like KeyStore... It is a good book (if you want to dive in):

Also, these classes might be usefull too:

Sixth

Creating a singing. There are some very good articles:

Seventh

Future plans: There is an option to add a Time Stamp to your signing. It may help:

Eighth

Other useful matherials:

About

Demonstration how to sign a PDF using certificate

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages