如何在PDF中使用iTextSharp添加签名行?

时间:2018-12-04 19:19:21

标签: asp.net itext

如何像在图像中一样在PDF下方添加签名行?

enter image description here

我知道如何在PDF中添加虚线,但是签名线似乎比较棘手。

 public static void testingControlPdf(changeContro_test testingControl)
        {

            using (FileStream fs = new FileStream(filePath, FileMode.OpenOrCreate))
            {
                PdfWriter.GetInstance(doc, fs);
                doc.Open();
                Paragraph p1 = new Paragraph(new Phrase("testing #" + testingControl.ID));
                p1.Add("\n");
                p1.Add("Description: " + testingControl.description);
                p1.Add("\n");
                DottedLineSeparator dottedline1 = new DottedLineSeparator();
                dottedline1.Offset = -2;
                dottedline1.Gap = 4f;
                p1.Add(dottedline1);
                p1.Add("\n");
                p1.Add("put the signature line below ");
                p1.Add("\n");
                //add the signature line here 
                doc.Add(p1);
                doc.Close();
                fs.Close();
                fs.Dispose();
            }
        }

0 个答案:

没有答案
相关问题