Frequently Asked Question:
How do I apply a digital signature to a PDF using Quick PDF Library?
Question
How do I apply a digital signature to a PDF using Quick PDF Library?
Answer
Applying a digital signature to a PDF using Quick PDF Library is a relatively simple process using the SignFile function. Here is a short sample in C# that demonstrates how simple it is to sign a file.
// Setup the parameters
string InputFileName = "unsigned.pdf";
string OpenPassword = "";
string SignaturesFieldName = "";
string OutPutFileName = "signed.pdf";
string PFXFileName = "testing.pfx";
string PFXPassword = "test";
string Reason = "Form review process.";
string Location = "San Francisco";
string ContactInfo = "test@test.com";
// Call the SignFile function. The function will return a value that
// tells you whether signing the file was successful or not.
int status = qp.SignFile(InputFileName, OpenPassword, SignaturesFieldName,
OutPutFileName, PFXFileName, PFXPassword, Reason, Location, ContactInfo);
// We'll display the return value of SignFile in a message box so that
// we can see if signing the file succeeded or not.
MessageBox.Show(Convert.ToString(status));