Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about iOS development and PDF

Need to delete all annotation of particular type like rectangle or oval.

More
IP: 114.143.252.148 6 years 9 months ago #14788 by apdeveloper
Dear Team,
I want to delete all annotation of particular type whenever i am opening the pdf suppose i have added rectangle,oval and ink annotation on pdf and now again when i open the pdf i want to delete all the rectangle annotation but other should remain.
More
IP: 37.183.44.177 6 years 9 months ago - 6 years 9 months ago #14793 by federico
Hi,
Rectangle, ellipse and ink have the type value so you can delete just rect annots by type using:
Code:
-(int)type;
in PDFObjc class.
Last edit: 6 years 9 months ago by federico.
More
IP: 114.143.252.148 6 years 9 months ago #14798 by apdeveloper
Dear Team,
You didn't get my question whenever i open the pdf i want to delete all rectangle and other should remain.
More
IP: 212.97.62.176 6 years 9 months ago - 6 years 9 months ago #14800 by federico
Hi,
You should process every annots of certain page in a cycle, then check annots by type value and delete them
In your case, rect annot's type has 5 as value.
Last edit: 6 years 9 months ago by federico.
More
IP: 111.196.244.148 6 years 9 months ago - 6 years 9 months ago #14801 by radaee
Hi,
do you mean following codes?
Code:
int pg_cnt = [doc pageCount]; int pg_num = 0; for(pg_num = 0; pg_num < pg_cnt; pg_num++) { PDFPage *pg = [doc page:pg_num]; [pg ObjsStart]; int annot_cnt = [page annotCount]; int annot_num; for(annot_num = 0; annot_num < annot_cnt; annot_num++) { PDFAnnot *annot = [pg annotAtIndex:annot_num]; int atype = [annot type]; if(atype == 5 || atype == 6)//rectangle and oval { [annot removeFromPage]; annot_num--; annot_cnt--; } } [pg Close]; }
Last edit: 6 years 9 months ago by radaee.
More
IP: 114.143.255.84 6 years 9 months ago #14809 by apdeveloper
Dear Team,

What is annot type for note .
Time to create page: 0.440 seconds
Powered by Kunena Forum