private void button1_Click(object sender, EventArgs e) { debug("Started ..."); debug("Checking certificate ..."); Cert myCert=null; try { myCert = new Cert(certTextBox.Text, passwordBox.Text); debug("Certificate OK"); } catch (Exception ex) { debug("Error : please make sure you entered a valid certificate file and password"); debug("Exception : "+ex.ToString()); return; } debug("Creating new MetaData ... "); //Adding Meta Datas MetaData MyMD = new MetaData(); MyMD.Author = authorBox.Text; MyMD.Title = titleBox.Text; MyMD.Subject = subjectBox.Text; MyMD.Keywords = kwBox.Text; MyMD.Creator = creatorBox.Text; MyMD.Producer = prodBox.Text; debug("Signing document ... "); PDFSigner pdfs = new PDFSigner(inputBox.Text, outputBox.Text, myCert, MyMD); pdfs.Sign(Reasontext.Text, Contacttext.Text, Locationtext.Text, SigVisible.Checked); debug("Done :)"); }
public PDFSigner(string input, string output, Cert cert, MetaData md) { this.inputPDF = input; this.outputPDF = output; this.myCert = cert; this.metadata = md; }
public PDFSigner(string input, string output, Cert cert) { this.inputPDF = input; this.outputPDF = output; this.myCert = cert; }