DEV Community

Aniket Chaturvedi
Aniket Chaturvedi

Posted on

Sign a PDF in C# / .NET with a green tick and true LTV

Getting a .NET-signed PDF to show Adobe Reader's green tick"Signed and all signatures are valid" — and to stay valid long-term (LTV) usually takes a lot of manual work: PAdES, a trusted timestamp, the DSS, and the in-document appearance.

ATick gives you all of 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

dotnet add package ATick
Enter fullscreen mode Exit fullscreen mode

Sign with a green tick, timestamp and LTV

using System.IO;
using Aniketc068.ATick;

byte[] pdf = File.ReadAllBytes("doc.pdf");
byte[] pfx = File.ReadAllBytes("my.pfx");

byte[] 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.WriteAllBytes("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

  • Windows certificate store, built in — Atick.SignWinStore(...) with a thumbprint (or the system picker).
  • USB token / smart-card / HSM via PKCS#11 — Atick.SignPkcs11(...).
  • Deferred / remote-key / eSignAtick.Prepare(...) then Atick.Embed(...).
  • Certified (no-changes) signatures, encrypted output, and a fully customizable appearance.

The same API exists in Python, Java, Node.js and PHP — 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)