1. Go to this page and download the library: Download aniketc068/atick library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
Atick::signPfx($pdf, $pfx, $options); // sign with a .pfx / .p12 / .pem (auto-detected)
Atick::prepare($pdf, $options); // deferred / eSign: returns [$prepared, $bytesToSign]
Atick::cmsPfx($data, $pfx, $options); // detached CMS over data
Atick::embed($prepared, $cms); // embed a detached CMS into a prepared PDF
Atick::prepareFields($pdf, $options); // make an empty signature field (template)
Atick::signField($pdf, $pfx, $options); // sign an existing empty field
Atick::setMetadata($pdf, $options); // Title / Author / Subject / Keywords / …
Atick::addDocTimestamp($pdf, $options); // archive DocTimeStamp (PAdES-B-LTA)
Atick::setFastSigning(true | false); // revocation-cache toggle
Atick::decrypt($pdf, $password); // decrypt a password-protected PDF
Atick::version(); // engine version
['green_tick' => true] // the "?" mark — Adobe paints it GREEN for valid+trusted, RED if invalid
['always_check' => true] // the green-tick graphic as the base
['green_tick' => false] // no mark — a plain signature
[$prepared, $bytesToSign] = Atick::prepare($pdf, [
'cn' => 'DS TEST', 'reason' => 'eSign',
'placements' => [[1, [300, 55, 575, 175]]], 'contents_size' => 16384,
]);
// the eSign InputHash is the SHA-256 of $bytesToSign:
$inputHash = hash('sha256', $bytesToSign);
// ... sign with your provider / eSign ESP, get back a detached CMS ...
$signed = Atick::embed($prepared, $cms);