On the serverside, we've created a key store containing a self-signed certificate for an Unknown person working for an Unknown unit in an Unknown company. We'll use that keystore to create a PrivateKey object and a Certificate[] chain. The document you upload will be signed using those objects, as well as the reason and location you enter in this form:

PDF file:
Reason for signing:
Location:

Note that we didn't use all best practices here. This is just a simple demo using a keystore that can't be used to create a legally binding signature.