Hi ,
I need to add form field like textbox into an existing pdf based on the text position exits on the pdf . please let me know can we find the location based on the particular text and can add the textbox above the highlighted underline without hardcoding the page no and size of the text box . please find the attached sample pdf and please do the needful. Thanks in advance .
File Information:
addedTextBoxbasedonthestaticlocation - I have added the textbox over the underline using the static location
//create the form filed in the correct location
PdfTextBoxField textbox = new PdfTextBoxField(page, "SertifiDate_1");
textbox.Text = Convert.ToString(DateTime.Today.ToShortDateString());
textbox.ToolTip = "Date";
textbox.Bounds = new RectangleF(118, 310, 195, 15);//xlocation,ylocation,width,height
textbox.BorderWidth = 0.55f;
textbox.BorderStyle = PdfBorderStyle.Solid;
pdf.Form.Fields.Add(textbox);
textbox = new PdfTextBoxField(page, "SertifiSStamp_1");
//textbox.Text = "signatureTextBox";
textbox.ToolTip = "(Type Name)";
textbox.Bounds = new RectangleF(Xlocation, Ylocation + 20, 195, 15);//xlocation,ylocation,width,height
textbox.BorderWidth = 0.55f;
textbox.BorderStyle = PdfBorderStyle.Solid;
pdf.Form.Fields.Add(textbox);
needtoAddbasedontheParticularText - please let me know can we find the location based on the particular text and can add the textbox above the highlighted underline without hardcoding the page no and size of the text box