Get and remove annotations programmatically - RadaeePDF.com
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
13 Jul 2017
Microsoft has ended support for Windows Phone 8.1
Read More...
Questions about Android development and PDF
  • Page:
  • 1

TOPIC: Get and remove annotations programmatically

Get and remove annotations programmatically 1 year 6 months ago #12389

  • iosDeveloper
  • iosDeveloper's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 4
  • Thank you received: 0
Hi there,

Is it possible to get list of annotations in a document, and remove them programmatically?

I believe this should be easily done, but I don't see any guides or examples that would help me to do it.

Thanks in advance!

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

Get and remove annotations programmatically 1 year 6 months ago #12395

  • nermeen
  • nermeen's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 865
  • Karma: 23
  • Thank you received: 70
To get a list of the annotation in a document, you need to do a simple loop like the following:
for (int i = 0; i < m_doc.GetPageCount(); i++) {
	Page page = m_doc.GetPage(i);
	page.ObjsStart();
	for (int j = 0; j < page.GetAnnotCount(); j++) {
	Annotation annot = page.GetAnnot(j);
       //add it to your list
}
page.Close();
}
To remove an annotation:
Annotation.RemoveFromPage()

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

  • Page:
  • 1
Powered by Kunena Forum