Do you own a Debenu Quick PDF Library version 7, 8, 9, 10, 11, 12, 13 or iSEDQuickPDF license? Upgrade to Debenu Quick PDF Library 14 today!

Debenu Quick PDF Library - PDF SDK Community Forum Homepage
Forum Home Forum Home > For Users of the Library > General Discussion
  New Posts New Posts RSS Feed - Unable to remove annotations
  FAQ FAQ  Forum Search   Register Register  Login Login

Unable to remove annotations

 Post Reply Post Reply
Author
Message
lakkan View Drop Down
Senior Member
Senior Member


Joined: 10 Dec 15
Location: Bangalore
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote lakkan Quote  Post ReplyReply Direct Link To This Post Topic: Unable to remove annotations
    Posted: 16 Dec 16 at 7:22AM
Hi,Cry

I am using following piece of code to remove all annotations from the selected page. Though it deletes all annotations from selected page, but sticky note annotations are still present on the page. Any help on this please..
QP.SelectPage(1);
int nAnnotCount = QP.AnnotationCount();
for(int nIndex=1; nIndex<=nAnnotCount; nIndex++)
{
int nRetVal  = QP.DeleteAnnotation(nIndex);
}

Lakkan


Edited by lakkan - 16 Dec 16 at 7:30AM
Back to Top
tfrost View Drop Down
Senior Member
Senior Member


Joined: 06 Sep 10
Location: UK
Status: Offline
Points: 437
Post Options Post Options   Thanks (0) Thanks(0)   Quote tfrost Quote  Post ReplyReply Direct Link To This Post Posted: 16 Dec 16 at 11:40AM
It does not completely explain the symptoms you describe, but the direction of your loop is incorrect.

For deletions, you should normally start with the last item and decrement the index.  Otherwise the deletion of item 1 will change the index in all the later items, and the deletion will fail when the index exceeds the number of items remaining.
Back to Top
lakkan View Drop Down
Senior Member
Senior Member


Joined: 10 Dec 15
Location: Bangalore
Status: Offline
Points: 53
Post Options Post Options   Thanks (0) Thanks(0)   Quote lakkan Quote  Post ReplyReply Direct Link To This Post Posted: 28 Dec 16 at 9:07AM
Thanks for your information. I did as you said, it worked.

Lakkan.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 11.01
Copyright ©2001-2014 Web Wiz Ltd.

Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. AboutContactBlogSupportOnline Store