Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about iOS development and PDF
  • Page:
  • 1

TOPIC:

HOW REMOVE ANNOTATION 9 years 7 months ago #7037

  • ex93nball
  • ex93nball's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 13
  • Thank you received: 0
How can i remove an annotation on PDF

i don't have any idea to get annotation type from position its always return 0

here my code:

- (void)OnSingleTapped:(float)x :(float)y :(NSString *)text{

struct PDFV_POS pos;

[m_view vGetPos:&pos];

int pageNo = pos.pageno;

PDFPage *vp = [m_doc page:pageNo];

PDF_ANNOT an = Page_getAnnotFromPoint(vp, pos.x, pos.y);

int type = Page_getAnnotType(vp, an);

NSLog(@"tipe annot = %d at %f %f",type,x,y);
}

Please Log in or Create an account to join the conversation.

HOW REMOVE ANNOTATION 9 years 7 months ago #7039

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
PDFVPage vpage = [m_view vGetPage:pos.pageno];
PDFPage *page = [vpage Page];
if( page )
{
PDFAnnot *an = [page annotAtPoint:pos.x, pos.y];
[an type];
[an removeFromPage];
an = nil;
}

Please Log in or Create an account to join the conversation.

  • Page:
  • 1
Powered by Kunena Forum