Which page have annotation or not - 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: Which page have annotation or not

Which page have annotation or not 4 years 3 months ago #6875

  • Mahesh007
  • Mahesh007's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 16
  • Thank you received: 0
i want to know which page isannoted in PDFDoc.please help on this.

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

Which page have annotation or not 4 years 3 months ago #6876

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • Karma: 17
  • Thank you received: 65
Hi,

try this to get page annot count:

Page myPage = m_doc.GetPage(pageno);
int numberOfAnnot = myPage.GetAnnotCount();

and then check if numberOfAnnot > 0

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

Which page have annotation or not 4 years 3 months ago #6910

  • Mahesh007
  • Mahesh007's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 16
  • Thank you received: 0
pagecount is working but page annotation count always give me value 0 . please help on this



PDF_ERR err = 0;
m_doc = [[PDFDoc alloc] init];
err = [m_doc open:pdfPath :@""];
if( m_doc == NULL )
{
switch( err )
{
case err_password:
NSLog(@"Error %d",2);
break;
default:
NSLog(@"Error %d",0);
}
}
NSLog(@"no of page in doc %d",m_doc.pageCount);
PDFPage *page = [m_doc page:0];
NSLog(@"annotate %d",page.annotCount)
PDFPage *page1 = [m_doc page:1];
NSLog(@"annotate %d",page1.annotCount);

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

Which page have annotation or not 4 years 3 months ago #6917

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 846
  • Karma: 43
  • Thank you received: 12
like this:
Page page = doc.GetPage(pageNO);
page.ObjsStart();//it is required.
int annot_count = page.getAnnotCount();
//...
page.Close();

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

Last edit: by .
  • Page:
  • 1
Powered by Kunena Forum