0
我们需要获取包含特定PdfTextField的PpdfPage,我们该如何做?获取包含PdfTextField的PDF页面
代码:
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[???];
你在使用itextsharp的库是什么库? – retslig
根据标签pdfsharp。 – mkl
@retslig PdfSharp,我们过去使用过itextsharp,但是PdfSharp许可证更开放 – VSP