public void SealVisibleProps() { DsspClient dsspClient = new DsspClient("https://www.e-contract.be/dss-ws/dss"); dsspClient.Application.X509.Certificate = new X509Certificate2("certificate.p12", ""); Document od; SignatureRequestProperties props = new SignatureRequestProperties() { SignerRole = "Gard", SignatureProductionPlace = "Iddergem", VisibleSignature = new ImageVisibleSignature() { Page = 1, X = 100, Y = 100 } }; using (Stream i = File.OpenRead("Blank.pdf")) { Document id = new Document("application/pdf", i); od = dsspClient.Seal(id, props); } using (Stream o = File.OpenWrite("Output.pdf")) { od.Content.CopyTo(o); } od.Content.Seek(0, SeekOrigin.Current); VerifySeal(od, "Gard", "Iddergem"); }
public void SealInvisibleNoProps() { DsspClient dsspClient = new DsspClient("https://www.e-contract.be/dss-ws/dss"); dsspClient.Application.X509.Certificate = new X509Certificate2("certificate.p12", ""); Document od; using (Stream i = File.OpenRead("Blank.pdf")) { Document id = new Document("application/pdf", i); od = dsspClient.Seal(id); } using (Stream o = File.OpenWrite("Output.pdf")) { od.Content.CopyTo(o); } od.Content.Seek(0, SeekOrigin.Current); VerifySeal(od, null, null); }