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!
![]() |
Unable to remove annotations |
Post Reply ![]() |
Author | |
lakkan ![]() Senior Member ![]() Joined: 10 Dec 15 Location: Bangalore Status: Offline Points: 53 |
![]() ![]() ![]() ![]() ![]() Posted: 16 Dec 16 at 7:22AM |
Hi,
![]() 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 |
|
![]() |
|
tfrost ![]() Senior Member ![]() Joined: 06 Sep 10 Location: UK Status: Offline Points: 437 |
![]() ![]() ![]() ![]() ![]() |
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.
|
|
![]() |
|
lakkan ![]() Senior Member ![]() Joined: 10 Dec 15 Location: Bangalore Status: Offline Points: 53 |
![]() ![]() ![]() ![]() ![]() |
Thanks for your information. I did as you said, it worked.
Lakkan.
|
|
![]() |
Post Reply ![]() |
|
Tweet
|
Forum Jump | Forum Permissions ![]() You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |
Copyright © 2017 Debenu. Debenu Quick PDF Library is a PDF SDK. All rights reserved. About — Contact — Blog — Support — Online Store