Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about Android development and PDF

Get and remove annotations programmatically

More
IP: 192.168.0.71 8 years 10 months ago #12389 by iosDeveloper
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!
More
IP: 192.168.0.71 8 years 10 months ago #12395 by nermeen
To get a list of the annotation in a document, you need to do a simple loop like the following:
Code:
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:
Code:
Annotation.RemoveFromPage()
Time to create page: 0.447 seconds
Powered by Kunena Forum