See the Annotations example project for a full example.
However the following is a code snippet showing how this might
be used.
using var doc = new Doc();
// ... set up the doc perhaps by reading a PDF
if (doc.PageCount == 0)
doc.Page = doc.AddPage();
var sig = doc.Form.AddDocTimestamp("Timestamp");
var uri = new Uri("http://timestamp.digicert.com");
var oid = new Oid(CryptoConfig.MapNameToOID("SHA256"));
sig.TimestampServiceUrl = uri;
sig.Timestamp(oid, 0);
Dim doc = New Doc()
' ... set up the doc perhaps by reading a PDF
If doc.PageCount = 0 Then
doc.Page = doc.AddPage()
End If
Dim sig = doc.Form.AddDocTimestamp("Timestamp")
Dim uri As New Uri("http://timestamp.digicert.com")
Dim oid As New Oid(CryptoConfig.MapNameToOID("SHA256"))
sig.TimestampServiceUrl = uri
sig.Timestamp(oid, 0)