Digitally Sign PDF

I would like to digitally sign a PDF. I’ve read the examples but I am confused on this line:

PKCS7 pkcs = new PKCS7(pbxFile, "WebSales");

This appears to be asking for a PKCS7 / PKCS7 Detached objects ? What are these and how would I go about getting one?
Also how does the password parameter feed into this?
Appreciate any information, please tailor it to take into account I’m a novice on this particular subject.


Thanks for contacting support.

The object PKCS7 accepts the .pfx file(s) and their password as constructor overloads, where PFX file is binary format which contains server certificate/intermediate certificates and private key, encrypted together in one file. These files are typically used on Windows machines to import and export certificates and private keys.

In order to create/export your own PFX file, you can follow the instructions specified over “Creating Personal Information Exchange (PFX) Certificate” page of Microsoft Website. In case if you need any further assistance, please feel free to ask.

Best Regards,
Asad Ali