Here's the code:
- Code: Select all
// Quality Engineer
PdfCertificate cert1 = new PdfCertificate(@"\\kavmplvdt07.cst.global\NON-ITAR\Manufacturing\Software\AERO Projects\Projects\WIP Quality Database\Certs\" + sUserName.ToUpper() + ".pfx", "");
PdfSignature signature1 = new PdfSignature(pdf, page, cert1, "Signature1");
signature1.Certificated = true;
signature1.SignImageSource = PdfImage.FromFile(@"\\kavmplvdt07.cst.global\NON-ITAR\Manufacturing\Software\AERO Projects\Projects\WIP Quality Database\Certs\" + sUserName.ToUpper() + ".png");
signature1.GraphicsMode = GraphicMode.SignImageOnly;
signature1.Bounds = new RectangleF(81, 631, 122, 30);
// Supplier Quality Engineer
PdfCertificate cert2 = new PdfCertificate(@"\\kavmplvdt07.cst.global\NON-ITAR\Manufacturing\Software\AERO Projects\Projects\WIP Quality Database\Certs\" + sUserName.ToUpper() + ".pfx", "");
PdfSignature signature2 = new PdfSignature(pdf, page, cert2, "Signature2");
signature2.Certificated = true;
signature2.SignImageSource = PdfImage.FromFile(@"\\kavmplvdt07.cst.global\NON-ITAR\Manufacturing\Software\AERO Projects\Projects\WIP Quality Database\Certs\" + sUserName.ToUpper() + ".png");
signature2.GraphicsMode = GraphicMode.SignImageOnly;
signature2.Bounds = new RectangleF(203, 631, 122, 30);
// Manufacturing Engineer
PdfCertificate cert3 = new PdfCertificate(@"\\kavmplvdt07.cst.global\NON-ITAR\Manufacturing\Software\AERO Projects\Projects\WIP Quality Database\Certs\" + sUserName.ToUpper() + ".pfx", "");
PdfSignature signature3 = new PdfSignature(pdf, page, cert3, "Signature3");
signature3.Certificated = true;
signature3.SignImageSource = PdfImage.FromFile(@"\\kavmplvdt07.cst.global\NON-ITAR\Manufacturing\Software\AERO Projects\Projects\WIP Quality Database\Certs\" + sUserName.ToUpper() + ".png");
signature3.GraphicsMode = GraphicMode.SignImageOnly;
signature3.Bounds = new RectangleF(325, 631, 122, 30);
// Design Engineer
PdfCertificate cert4 = new PdfCertificate(@"\\kavmplvdt07.cst.global\NON-ITAR\Manufacturing\Software\AERO Projects\Projects\WIP Quality Database\Certs\" + sUserName.ToUpper() + ".pfx", "");
PdfSignature signature4 = new PdfSignature(pdf, page, cert4, "Signature4");
signature4.Certificated = true;
signature4.SignImageSource = PdfImage.FromFile(@"\\kavmplvdt07.cst.global\NON-ITAR\Manufacturing\Software\AERO Projects\Projects\WIP Quality Database\Certs\" + sUserName.ToUpper() + ".png");
signature4.GraphicsMode = GraphicMode.SignImageOnly;
signature4.Bounds = new RectangleF(446, 631, 122, 30);