We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy.
Unfortunately, activation email could not send to your email. Please try again.

How to digitally sign an existing PDF document?


Digital signatures address these security requirements by providing greater assurances of document integrity, authenticity, and non-repudiation. We can digitally sign an existing PDF document using PdfSignature, PdfCertificate classes.


PdfPageBase page = doc.Pages[0];

// Map path of the certificate store.

PdfCertificate pdfCert;



pdfCert = new PdfCertificate("UserName","Password");


catch(Exception ex)


debug("Error : please make sure you entered a valid certificate file and password");

debug("Exception : " + ex.ToString());



debug("Creating new MetaData ... ");

//Set signature display properties

PdfSignature signature = new PdfSignature(doc, page, pdfCert, "Signature");

PdfBitmap bmp = new PdfBitmap(@"..\..\Data\PDFDemo.jpg");

signature.Bounds = new RectangleF(new PointF(5, 5), bmp.PhysicalDimension);

signature.ContactInfo = Contacttext.Text;

signature.LocationInfo = Locationtext.Text;

signature.Reason = Reasontext.Text;

string validto = "Valid To: " + signature.Certificate.ValidTo.ToString();

string validfrom = "Valid From: " + signature.Certificate.ValidFrom.ToString();



Dim page As PdfPageBase = doc.Pages(0)

''Map path of the certificate store.

Dim pdfCert As PdfCertificate


pdfCert = New PdfCertificate("UserName","Password")

Catch ex As Exception

debug("Error : please make sure you entered a valid certificate file and password")

debug("Exception : " & ex.ToString())


End Try

debug("Creating new MetaData ... ")

''Set signature display properties

Dim signature As PdfSignature = New PdfSignature(doc, page, pdfCert, "Signature")

Dim bmp As PdfBitmap = New PdfBitmap("..\..\Data\PDFDemo.jpg")

signature.Bounds = New RectangleF(New PointF(5, 5), bmp.PhysicalDimension)

signature.ContactInfo = Contacttext.Text

signature.LocationInfo = Locationtext.Text

signature.Reason = Reasontext.Text

Dim validto As String = "Valid To: " & signature.Certificate.ValidTo.ToString()

Dim validfrom As String = "Valid From: " & signature.Certificate.ValidFrom.ToString()


Please look into the sample from the below specified location.


Article ID: Published Date: Last Revised Date: Platform: Control:
884 04/30/2011 07/10/2014 Windows Forms PDF
Did you find this information helpful?
Navneet Saraswat Nov 27, 2017


the sample download link Signature_753104ff.zip is not working, can you please check?


Add Comment
You must log in to leave a comment

You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.