Digital Document Signer

Sign your PDF documents digitally.

``` **Before Running:** 1. **Composer Dependencies:** * Ensure `setasign/fpdi` is in your `composer.json` and installed. Your `composer.lock` shows it, so `composer install` should suffice. * TCPDF is a dependency of `mpdf/mpdf` or you might have `tecnickcom/tcpdf` directly. If you encounter class not found errors for TCPDF, you might need to explicitly add `tecnickcom/tcpdf` to your `composer.json` and run `composer update`. ```json // In your composer.json, ensure you have something like: { "require": { // ... other dependencies "setasign/fpdi": "^2.0", // Version from your lock file "tecnickcom/tcpdf": "^6.0" // Or a version compatible with FPDI } } ``` 2. **Create Directories:** * In `d:\PMSAI\xampp\htdocs\iloveitools\toolpages\`, create a new folder named `signed_documents`. * Ensure your web server (Apache) has **write permissions** for this `signed_documents` directory and for the system's temporary directory (`sys_get_temp_dir()`). 3. **Logs Directory:** Ensure `d:\PMSAI\xampp\htdocs\iloveitools\logs\` directory exists and is writable by the web server for PHP error logging. 4. **Digital Certificate:** You will need a `.p12` or `.pfx` certificate file and its password to test the signing functionality. This script provides a starting point. Digital signing can be complex, especially regarding certificate chain validation, timestamping, and long-term validation (LTV), which are not covered here but are important for legally binding signatures in many contexts.