PdfFormField.GetOriginalPageNumber in v. 4.0

PdfFormField.GetOriginalPageNumber in v. 4.0

Forum member · Aug 31, 2007
Hello everybody, we installed the 4.0 version of DynamicPDF library and the code we wrote and used with version 3.0 doesn't work any more. Let me explain what happens: we have to get the page to which a form field belongs and we use this piece of code: page = document.Pages[pdfdocument.Form.Fields[sLabel].GetOriginalPageNumber() - 1]; where sLabel is a string that contains the label that identifies the field we are looking for. If we have just 1 field in the document with that name the method returns -1 If we have more than 1 field with that name we use: page = document.Pages[pdfdocument.Form.Fields[sLabel].ChildFields[i].GetOriginalPageNumber()-1]; cycling on all childs with that name the method GetOriginalPageNumber() works fine and we get the index of all the pages in which the label is located. All other properties of the PdfFormField I'm looking for work fine; it seems we have a problem with the GetOriginalPageNumber method only. Many thanks in advance Carla Covizzi

Re: PdfFormField.GetOriginalPageNumber in v. 4.0

Support · Aug 31, 2007
Hello Carla, You may have to do some minor code changes when upgrading to the v4.0 from v3.0. You can refer to the Compatibility Page on our website for the changes to do. The GetOriginalPageNumber returns -1 if the form field is a container field and you can check if the field has child feilds by using the HasChildFields property of the PdfFormField. It will give a correct value when used with a particular child field. If you still have problem in using this method then please send over the PDF and the code you are using to our [^a|mailto:support@cete.com|Support Team^] so that they can take a look at it. Thanks, ceTe Software Support Team.