This script allows your users to review and sign a PDF document, such as a contract, invoice, bill, ...
First, it will display a pdf file from your server, whether it contains only one, or several pages.
Then, the script will automatically look for a string of text, such as "Signature" to identity where the signature should be placed on the document, and adds a "Sign the contract" button at this position, in addition to the button in the fixed navbar at the bottom of the screen.
When your user clicks one of these two buttons, a drawing pad is displayed and your user can either draw with their mouse, or their finger, if they see the document from a smartphone/tablet (yes, the whole script is responsive and mobile friendly!).
Alternatively, they can also write their name and select the font they want to use for their name. Adding more fonts and/or removing the included ones is easy and I explain how to do so.
The script validates different points and either returns an error if something happened, or if your user have tricked the code (ahhhhhh!!!), or will generate the signed PDF and redirect to a confirmation page, that offers a link to download a copy of the PDF.
When your user confirm their signature, a new PDF is generated PDF, their signature and a signing date is added, to the template, as well as an additional page at the end of the file, with some details about the contract and a history of the signing process, plus your logo at the bottom of this additional page. The idea being to help you to see a working example of how to do that, if you don't need this, of course, you will remove that part of the code.
The code is kept as simple as possible while being quite complete, the idea is for you to be able to customize it easily to fit your own needs and adjust it to your own branding etc.
All the librairies used in the script are included using composer.
I'm already sure that you will quickly feel at ease to modify this code, and to save you even more time, I added a "Read me" file with some helpful tips to modify the code and do your thing.
Enjoy the time you saved, and have a good day!
- Display a .pdf document
- Your user can sign the document, by drawing their signature or writing their name with a font of their choice
- A new file is created with the added signature as well as an additional page with the signing history
- A PHP server
Everything is explained in a "Read me.txt" file provided along with the code.
Future product updates
Quality checked by Codester
Lowest price guarantee
|First release||4 March 2023|
|Last update||13 March 2023|
|Software version||PHP 7.0, PHP 7.1, PHP 7.2, PHP 7.3, PHP 7.4, PHP 8.0, PHP 5.x, PHP 5.4, PHP 5.5, PHP 5.6|