This is a simple docker project that will run a API that cryptograpically signs the PDF.
The project assumes JDK17 as the run time environment.
To pull the latest image use the following command:
docker pull anandsdocs/sdocs-pdfsignapi
docker run -e PORT=8080 -p 8080:8080 anandsdocs/sdocs-pdfsignapi:latest
The API exposes two endpoints:
This supports a HTTP GET
and is there to make sure the API is up and working. It returns a simple Hello the time is 7/31/23, 2:47 PM
This is the API that signs the PDF and returns the signed PDF. This supports HTTP POST
The API expects three parameters:
publicCert
: This is the public certificate that is used to sign your PDF.privateKey
: This is the private key used to sign the PDFpdfFileBase64
: This is a base64 encoded string of your PDF file.
Sample request:
{
"privateKey":"-----BEGIN PRIVATE KEY-----....",
"publicCert":"-----BEGIN CERTIFICATE----- ...",
"pdfFileBase64":"..."
}
The output is a binary PDF file that can then be saved or rendered accordingly.