-
Notifications
You must be signed in to change notification settings - Fork 0
/
Program.cs
31 lines (28 loc) · 1.04 KB
/
Program.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
using ceTe.DynamicPDF.PageElements.Forms;
using ceTe.DynamicPDF;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Security.Cryptography.X509Certificates;
namespace DynamicPDF_TSA_Issue
{
internal class Program
{
static void Main(string[] args)
{
Document document = new Document();
Page page = new Page();
// Create add Signature Form Field
Signature signature = new Signature("SigField", 10, 10, 250, 100);
page.Elements.Add(signature);
document.Pages.Add(page);
Certificate certificate = new Certificate(@"cert\ec_certificate_384.pfx", "");
// Create TimestampServer
TimestampServer timestampServer = new TimestampServer("https://rfc3161.ai.moda");
document.Sign("SigField", certificate, timestampServer);
document.Draw("signed.pdf"); // throws System.NotSupportedException
}
}
}