DEV Community

Aniket Chaturvedi
Aniket Chaturvedi

Posted on

Sign a PDF in PHP with a green tick — PAdES, timestamp & LTV

Signing a PDF from PHP so that Adobe Reader shows the green tick"Signed and all signatures are valid" — with a trusted timestamp and long-term validation (LTV) is normally a lot of work.

ATick does it in one call — free under AGPL-3.0.

ATick's verified signature appearance — a green-tick validity mark with signer, date, reason and location

Install

composer require aniketc068/atick
Enter fullscreen mode Exit fullscreen mode

Sign with a green tick, timestamp and LTV

<?php
require 'vendor/autoload.php';

use Aniketc068\ATick\Atick;

$pdf = file_get_contents("doc.pdf");
$pfx = file_get_contents("my.pfx");

$signed = Atick::signPfx($pdf, $pfx, [
    "password" => "your-password", "cn" => "Axonate Tech", "reason" => "Approved",
    "green_tick" => true, "page" => 1, "rect" => [300, 55, 575, 175],
    "pades" => true, "timestamp" => true, "ltv" => true,   // PAdES-B-LT
]);

file_put_contents("signed.pdf", $signed);
Enter fullscreen mode Exit fullscreen mode

Open signed.pdf in Adobe Reader — with a trusted certificate it shows the green tick and "Signed and all signatures are valid."

Adobe Reader:

  • green_tick → the validity mark Adobe greens for a valid + trusted certificate
  • pades / timestamp / ltv → PAdES-B-LT (add lta for B-LTA)

More than the basics

  • USB token / smart-card / HSM via PKCS#11 — Atick::signPkcs11(...).
  • Deferred / remote-key / eSignAtick::prepareDeferred(...) then Atick::embed(...).
  • Certified (no-changes) signatures, encrypted output, and a fully customizable appearance.

The same API exists in Python, Java, .NET and Node.js — one engine, five languages.

Links

ATick is free under AGPL-3.0 (a commercial license is only needed to resell it). A product by Axonate Tech.

Top comments (0)