//given FDFDoc fdfdoc instance
Obj fdfroot = fdfdoc.GetRoot();
Obj fdfdict = fdfroot.FindObj("FDF");
Obj annotsarray = fdfdict.FindObj("Annots");
if(annotsarray == null || !annotsarray.IsArray()) return;
int annots_sz = annotsarray.Size();
for(int i = 0; i < annots_sz; ++i)
{
Obj annotobj = annotsarray.GetAt(i);
Annot annot = new Annot(annotobj);
Annot.Type annotType = annot.GetType();
int page_index = annotobj.FindObj("Page").GetNumber();
// change the page number to page 10 for example
annotobj.PutNumber("Page", 9)' // zero indexed, so index 9 is the tenth page in the PDF
}