pdf forms and digital signatures

Trying to figure a way of digitally signing pdfs created with the pdf forms plugin. The idea is to fill inthe fom then finalize it, and sign it, and store it. Anybody doing anything like this?

Hi msedita.

I’ve done it with iText and Bouncy Castle.

Best regards. Roberto.

Thanks Roberto. That doesn’t look so easy though, for a non-java guy. I’ll see how far I get with it.

I’m close to finish a digital signature plugin with support to Pdf, facturae and XAdES-XL.

Best regards. Roberto Blasco

I’ve done it using iText. Java sample here: http://itextpdf.sourceforge.net/howtosign.html
I can probably add it to the PDF Pro plugin if you’d like: http://www.servoyguy.com/servoy_compone … pro_plugin

Roberto Blasco:
I’m close to finish a digital signature plugin with support to Pdf, facturae and XAdES-XL.

Best regards. Roberto Blasco

Good stuff Roberto! Are we going to see this on ServoyForge soon?

goldcougar:
I’ve done it using iText. Java sample here: http://itextpdf.sourceforge.net/howtosign.html
I can probably add it to the PDF Pro plugin if you’d like: http://www.servoyguy.com/servoy_compone … pro_plugin

Yes, I suppose that would be a welcome addition!

Which iText version are you linking against BTW? I’m asking this because there are a certain number of plugins already using (and shipping) this one: JasperReports, PdfOutput, VelocityReport and yours…

Perhaps it would be best if we could find a way to harmonize this?

Thanks folks, I’m not sure the java code in the examples is really what I need, but maybe I’m wrong. Here’s the workflow I have now:

  1. Use PDF forms plugin to enter and store forms fields from selected template, revise as needed.
  2. When form is complete, use PDF output plugin to create PDF document from form and fields, store PDF doc and thumbnail in table.

As part of step two, I need to be able for the user to add digital signatures to the PDF doc.

I could open the created PDF doc in Acrobat, add signatures, save it as a file, then re-import it into table. But that’s pretty clumsy, and really can;’ be automated. So I’m looking for anything that will make that easier.

BTW - iText 2.1.7 seems to work fine with both jasper and pdf_output, not sure about velocity…

VelocityReport is using 2.1.7 as well.
I was asking about Scott’s PDF Pro plugin and also Roberto about the version he is using for his upcoming plugin…

I’ve just always used the one that defaults with the Jasper plugin I think. The digital signature stuff has been in iText for a long time, so its pretty universal.

The best iText version for pdf digital signature is 2.1.7, wich includes ocsp and timestamping support.

Best regards. Roberto Blasco.

Yes, iText 2.1.7 is also the last version which is MPL/LGPL licensed.

Hey Mike. So do you have an idea of how you would want to use it if I add it to the PDF Pro plugin? Are you wanting it to run server-side (always) so it signs with the certificate that is on the server, or do you want it client-side, or both?

Hi Scott. Here is the specific ideal context in which we are hoping to implement it:

I’m a clinician. My patient comes to my desk or I go to visit the patient. I may have seen the patient before, or it may be the first time. I have a record in the staff table. He has a record in the patient table. We create a form attached to his client record. We fill out a form using a template with signature fields. During the process of finalizing the form and converting it to a document, he digitally signs it and I digitally sign and certify it so there are no further changes.

Questions: Using acrobat, the certificates are created on-the-fly. I don’t know if that is possible using a plugin. Looking at the Java sample, I think the certificates have to be created separately. If that is the case, then I would like to find a way the staff person could create them and attach them somehow to the staff and patient records, and the act of signing would only be entering the password associated with the certificate(s). In any case I think the cert would preferably be on the server.

Do you think this all doable, and in a way that would be easy for a non-technical end user? For example, having them use keytool from a command line in order to create the certs I don’t think would work.

I’m welcoming any advice regarding this approach.

Well, you could supply the certificate for them. So it could be placed on the server. And then you could use the Headless Client plugin to run server side (Or could be part of the plugin), but maybe easier with Headless Client plugin. So the user could click the button so sign, and that would start a Headless Client on the server, which would generate the unsigned pdf. Then it would run a command in the plugin to sign it with the cert on the server, and then stream the file back to the user with the File plugin.

You can get a cert in the pfx format with instructions here: http://servoyguy.com/knowledge_base/dep … _and_beans
It still requires a password to do the signing, which would be in your Servoy solution.

An alternate approach would be to have each client generate their own self signed certl, which would be part of your installation process. You may even be able to automate it.

Note that you don’t need a different certificate for every user/client, etc. You can just use the same one over and over to digitally sign the file. It essentially just creates a hash to keep track that the file hasn’t been modified.

The thing about the signing, it has to indicate that each patient personally reviewed it and signed it, so I think each one will need a unique certificate.

Hmm. well thats not exactly what digitally signing a PDF means. It just means the PDF hasn’t been modified since it was digitally signed. It has nothing to do with a manual signature or anything like that. When a file gets signed, in the metadata it shows the date and time of last modification, and if you use a official SSL cert (not a self-signed), then it is something that can be trusted and verified.
So, once it has been manually signed with a written signature from both parties, you then digitally sign it with the SSL cert, locking the file. If anyone tampers with the file, when you open it you’ll get an error message alerting the file has been tampered with.

OK, I’m no expert, but I think by creating unique digital IDs for all the patients and staff, and controlling access to them, we can be reasonably sure who signed the documents, in addition to knowing they haven’t been tampered with.

Hi All!

How can I create a new project in ServoyForge?

Best Regards. Roberto Blasco.

Roberto Blasco:
How can I create a new project in ServoyForge?

I believe the ServoyForge homepage explains this with the following line:

Check the ServoyForge Wiki for more information on how to register, how to create a project, and anything related to the ServoyForge use.