Sign a PDF document with JavaScript and PHP by Legibe

Description
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. Expect a clean code, with a html file, a little css file (bootstrap 5 is loaded, and does most of the styling/reponsive job), a javascript file, as well as a php file to generate the signed pdf file. 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!
Features
- 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
Requirements
- A PHP server - You need to be a JavaScript and聽PHP developer!
Instructions
Everything is explained in a "Read me.txt" file provided along with the code.
| Author | legibe |
|---|---|
| Category | Scripts & Code / JavaScript / Miscellaneous |
| Price | $22 |
| Extended License | $66 |
| Rating | 4.30 from 4 ratings |
| Reviews | 4 |
| Likes | 14 |
| First Release | Mar 4, 2023 |
| Last Update | Mar 13, 2023 |
| Files included | .php, .css, .html, JavaScript .js |
| 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 |
Tags
External listing. code.market does not sell this product and does not process payment for it. Pricing, payment, delivery, licensing, refunds, and support are handled by the third-party merchant on its own website. We may earn an affiliate commission from a referral. Details.
Products of the Week.
Submit馃
Free LinkedIn Likes From Real Members | LinkedInLikes
Get free LinkedIn likes on your posts from real members who react by hand. No password needed: you only share a link.
Website 路 12,847 views 路 46 clicksWebsite 路 Week 49 路 12,847 views 路 46 clicks
馃
Free Medium Claps From Real Writers | MediumPlace
Free Medium claps on your stories from verified accounts of real writers, each given by hand. No bots, no Medium password, nothing to pay. Paste a link.
Website 路 7,964 views 路 10 clicksWebsite 路 Week 49 路 7,964 views 路 10 clicks
馃
Free GitHub Stars From Real Developers | GitWow
Get free GitHub stars on your repository from real developers who star by hand. No token or password, and it's free.
Website 路 15,624 views 路 28 clicksWebsite 路 Week 49 路 15,624 views 路 28 clicks
#4
Free Substack Likes From Real Writers | StackRooms
Free Substack likes on your posts and Notes from verified accounts of real writers, given by hand. Free to ask, free to receive. Just share a link.
Website 路 7,784 views 路 2 clicksWebsite 路 Week 49 路 7,784 views 路 2 clicks
#5
Free Twitter Likes From Real People | SupaTwitter
Free Twitter likes on your tweets from verified accounts of real people, each given by hand. No bots, no Twitter password, nothing to pay. Paste a link.
Website 路 7,679 views 路 4 clicksWebsite 路 Week 49 路 7,679 views 路 4 clicks
#6
Free X Likes From Real People, Given by Hand | XFast
Free X likes on your posts from verified accounts of real people, each one given by hand. No bots, no X password, no conditions. Paste a link to start.
Website 路 7,591 views 路 0 clicksWebsite 路 Week 49 路 7,591 views 路 0 clicks