Hi Rohan,
Thanks for your patience.
I am pleased to share that your requested feature has been implemented and it will be available in our upcoming release version of Aspose.Pdf for .NET 7.0.0. Please note that in order to accomplish this requirement, following new properties are introduced.
Page.TabOrder - gets or sets tab order for the page:
TabOrder.Row = Fields will be visited in rows running horizontally across the page
TabOrder.Column = Fields will be visited in columns running vertically up and down the page
TabOrder.Default = Fields will be visited accordign field order
TabRoder.Manual = Fields will be visited according annotation order on the page.
To change Annotation Order, property AnnotationIndex was added.
Field.AnnotationIndex is used to get or set index of the annotation on the page. (Started from 1). When this property is set the annotation will be swapped with annotation on the specified position.
For example:
field.AnnotationIndex = 5;
Annotation which was on the 5th position on the page will be moved to position of the field, and field will have new position 5.
Example:
//10th field of the document will be 1st annotation on the //page (and first field in tab order because Page.TabOrder is set to TabOrder.Manual)
[C#]
Document doc1 = new Document(“33470.pdf”);
(doc1.Form[10] as Field).AnnoationIndex = 1;
doc1.Pages[1].TabOrder = TabOrder.Manual;
doc1.Save(“33470-1.pdf”);