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