我们需要获取包含特定 PdfTextField 的 PpdfPage,我们该怎么做呢?
代码:
PdfDocument document = PdfReader.Open("C:\\filex.pdf", PdfDocumentOpenMode.Modify);
// Get the root object of all interactive form fields
PdfAcroForm form = document.AcroForm;
// Get all form fields of the whole document
PdfAcroField.PdfAcroFieldCollection fields = form.Fields;
PdfTextField textfield1= (PdfTextField)fields["textfield1"];
//how to get the correct page reference respect the especified field?
PdfPage page = textfield1.Owner.Pages[???];