Good day
I want to know on how to get correct coordinates if you creating a field on a pdf using PTField for iOS.
I’m detecting my coordinates using CGPoint to get an X and Y, so I could create my own box with a width and height of 200 each.
I want to get the coordinates based on where I tapped with my finger on the pdf view.
Please see the code below.
PTField *field = [[_pdfViewCtrl GetDoc] FieldCreate:@“MySignature” type:e_ptsignature field_value:nil];
PTPage *page = [[_pdfViewCtrl GetDoc] GetPage:[_pdfViewCtrl GetCurrentPage]];
CGPoint point = [gesture locationInView:_pdfViewCtrl];
PTPDFRect *rect = [[PTPDFRect alloc] initWithX1:point.x y1:point.y x2:50 y2:50];
PTWidget *wigdget = [PTWidget Create:[[_pdfViewCtrl GetDoc] GetSDFDoc] pos:rect field:field];
PTPage *page = [[_pdfViewCtrl GetDoc] GetPage:[_pdfViewCtrl GetCurrentPage]];
[page AnnotPushBack:wigdget];
[wigdget SetPage:page];
PTObj *obj = [wigdget GetSDFObj];
[obj PutNumber:@“F” value:132];
[obj PutName:@“Type” name:@“Annot”];
Thank you.