Javascript – Digital Signature for PDF files through Web Application

architectural-patternsjavascriptpdf

We are developing a Web Application for manage dental clinics.
The app can generate PDF files through the PHP backend (for example invoices, quotes etc.).

Each of those PDF file needs to be digitally signed by both the app user (the clinician) and the patient.
The sign we are looking for is the Legally Signature European Standard (which requires biometrical parameters or a certificate issued by a trusted provider such as Infocert (but we are not 100% sure how to then use such certificate)).

On average, in our country, each patient signs 5-10 documents and because of this we ruled out third party services such as Docusign, Pandadoc, Eversign.. because the average cost of those api services would be excessive for our needs (and country economy).

Another solution we did think about is to use the signature pads (such as Wacom's) that are capable to collect biometrical parameters, but we have no idea how to integrate such devices with our Javascript frontend (assuming it is even possible to interface those devices through the web browser).

Assuming our backend displays the PDF already generated to the client, what would it be the best approach to apply a digital signature to it through the client (which would then send back the signed PDF to the server for storage) ?
Is there a way to interact with signature pads devices through the browser (to extract the biometrical parameters together with the visual signature) ?

Thanks

Best Answer

For web application, to access user's Certificate store (or Digital Signature in USB Token or Smartcard through Certificate store), from modern browsers, which no more supports java applest or activeX, using Browser extension is the solution.

One such free browser extension is Signer.Digital. Working can be checked at https://web.signer.digital. Links to extension, sample project, libs etc is also available.

You may use any server side pdf library with this extension to add signature to pdf.

For PHP, if more choices of native pdf library is not available, you may also run java library on Tomcat in Javabridge and proxy it from Apache.

Related Topic