HOW REMOVE ANNOTATION - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about iOS development and PDF
  • Page:
  • 1

TOPIC: HOW REMOVE ANNOTATION

HOW REMOVE ANNOTATION 4 years 9 months ago #7037

  • ex93nball
  • ex93nball's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • 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 4 years 9 months ago #7039

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 879
  • Karma: 43
  • Thank you received: 15
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