Free Support Forum - aspose.com

Need page number & all occurences of form field in a PDF

Is there any way to get the page number that a field is contained on? I am trying to use FormFieldFacade.getPageNumber() but it often returns zero (0), so unreliable. Also if a fieldName is repeated on the same same, for example, a checkbox fix is repeated several times, is there any way to determine that via Aspose.Pdf.Kit? I’m finding it very difficult to determine
1) what page the field is on in the pdf
2) if the field is repeated, I need each instance of it (i.e. location, etc).


Hi,


Thanks for contacting support and sorry for the delayed response.

I am afraid Aspose.Pdf.Kit for Java does not support the feature to correctly get the page number associated with form field. However Aspose.Pdf for .NET has a class named Field which contains PageIndex property that can be used to get the page number associated with form field. Please note that recently we have ported Aspose.Pdf for .NET to Java platform and we are currently busy testing the new release versions. Once this new release is published, you will be able to get the page number information related to form fields.

Furthermore, the Document class present in Aspose.Pdf for .NET contains an enumeration named Form which holds all the form fields present in particular document. So it also offers the feature to get the form fields present in particular file. Once all fields are returned, the type of each field can be identified.

We are sorry for this inconvenience.

Hello,


Thanks for your patience.

I am pleased to share that an autoported MergedAPI release version of Aspose.Pdf for Java 4.0.0 has been released. Please try using the latest release version and in case you encounter any issue or you have any related query, please feel free to contact.