Share Share
Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Questions about Android development and PDF
  • Page:
  • 1

TOPIC:

Which page have annotation or not 11 years 11 months ago #6875

  • Mahesh007
  • Mahesh007's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • 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 11 years 11 months ago #6876

  • Davide
  • Davide's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 814
  • 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 11 years 11 months ago #6910

  • Mahesh007
  • Mahesh007's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • 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 11 years 11 months ago #6917

  • radaee
  • radaee's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 1123
  • Thank you received: 73
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