Hi,
I tried to iterate over the annotations of your pdf with this code (almost equal to your):
PDFDoc *doc = [[PDFDoc alloc] init];
[doc open:filePath :@""];
int pages = [doc pageCount];
for(int index = 0; index < pages; index++){
PDFPage *page = [doc page:index];
[page objsStart];
int annots = [page annotCount];
for(int annot = 0; annot < annots; annot++){
PDFAnnot *annotation = [page annotAtIndex:annot]; //iterate over annots
NSLog(@"Annot index: %i", [annotation getIndex]);
NSLog(@"Annot edit type: %i", [annotation getEditType]);
NSLog(@"Annot field type: %i", [annotation fieldType]);
NSLog(@"Annot type: %i", [annotation type]);
NSLog(@"Annot value: %@", [annotation getEditText]);
}
}
The annotation count is 62 and the log shows the edit fields correctly.
The annotation at index 0 is an edit text annot (type:20, field type:2); what is the result if you try to call [page annotAtIndex:0]?