如何像在图像中一样在PDF下方添加签名行?
我知道如何在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();
}
}