using System.Security.Cryptography.X509Certificates;
using Vintasoft.Imaging.Pdf;
/// <summary>
/// Adds invisible digital signature to a PDF page.
/// </summary>
public class PdfPageDigitalSignatureHelper_InvisibleAppearance
{
public static void Run()
{
// get the X509 certificate from .pfx-file
using (X509Certificate2 certificate = new X509Certificate2("TestCertificate.pfx", "test"))
{
// create a helper that allows to add digital signature to a PDF document
PdfPageDigitalSignatureHelper digitalSignatureHelper = new PdfPageDigitalSignatureHelper(certificate);
// set the reason for signing
digitalSignatureHelper.SigningReason = "Approve document";
// add digital signature to the first PDF page, sign PDF document and save PDF document to the output file
digitalSignatureHelper.SignDocument("TestDocumentToSign.pdf", "TestDocumentToSign-signed.pdf", 0);
}
}
}
Forum 'Code samples'
Code samples for VintaSoft PDF .NET Plug-in. Here you can request a code sample.
Board index < VintaSoft Imaging < VintaSoft PDF .NET Plug-in Discussions < Code samples
