July 31st, 2013, 04:45 AM
Create a signed PDF via PHP
I am looking for the tools I can use to create a signed PDF, on the fly. I am not asking for anyone to do it for me, but at least point me in the right direction.
July 31st, 2013, 05:21 AM
By sign you mean you want an image of a signature added to an already existing PDF?
This should get you started.
Next you're going to want to load an image to add it to the document.
...I suspect you're talking about digital signatures.
July 31st, 2013, 11:03 AM
Sorry, I wasn't clear. Yes, I mean a digital signature, requiring a digital certificate.
Originally Posted by WrinkledCheese
August 1st, 2013, 09:37 AM
August 1st, 2013, 10:09 AM
There is a pure PHP PDF library, fpdf which does not reply on the pdflib library, here's the manual page for inserting an image
The site is poorly designed (it uses frames), so here's a link to the main page http://www.fpdf.org to give you a little more context
August 1st, 2013, 10:25 AM
Northie: Can he set the appropriate fields in the PDF in order to have it validate against his digital certificate?
August 1st, 2013, 10:38 AM
Is this not handled by the https protocol by which the document is requested? or am I misunderstanding your question?
Originally Posted by WrinkledCheese
I'm talking about images not digital certificates.....call me naive, but what is a signed PDF and how is it different from an unsigned one?
Last edited by Northie; August 1st, 2013 at 10:40 AM.
August 1st, 2013, 10:46 AM
It has the same attributes as a certificate.
If you follow the link I posted above it shows someone trying to digitally sign the PDF using PDFlib, which I suspect it what he wants.
The certificate signs the file rather than the protocol it's passwd over.
I think it's the same idea when you install a Windows application and Windows says "this is not a trusted application" because it was not digitally signed by a trusted CA certificate.
If you look at the features comparison of the SDKs available form Adobe, it shows that it is possible.
August 1st, 2013, 11:00 AM
Call me naive as well, but isn't the purpose of signed PDFs to avoid automated processes?
Seems like it'd be like a secretary rubber-stamp-signing documents for their employer. If the form only cared about the secretary seeing it then it would just ask for the secretary's signature. A form requesting someone's signature is sort of expecting that person to see and acknowledge its contents.
So when I first saw PDF signing and how a PDF can't be changed after being signed, I sort of assumed the idea was specifically to have an enforced and secure manual process.
August 1st, 2013, 01:56 PM
It's to authenticate the origin.
August 2nd, 2013, 12:34 AM
The web site will generate a PDF (let's call it a COA or certificate of authentication) for an item, and will include a photo of that item.
Think of it like a promise from our company (domain name) that this item is what we say it is, and the PDF could even be passed to another party later.
Even if given to another party, it is still digitally signed by us, and cannot be altered or recreated... Copied yes, but not altered.
Since the "Item" I am referring to is an animal, and the sheet will include a genetic pedigree, and a photo, we would be certifying that this pedigree is a promise by us, that the animal in the photo, has the genetics promised.
This will prevent someone from making up something fake, (like changing a photo) and passing it off as ours.
When we sell the animal, we cam email a copy of the pedigree to the new buyer, and in the PDF pedigree it will specifically tell how to check the digital signature... (like how they tell you on some checks to look for the watermark or other security features.)
So the digital signature is NOT a graphic, it is to certify who created the document, and that it has not been altered.