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

TOPIC:

How to Lock annotation set from Radeepdf in iOS 4 years 10 months ago #14431

  • mobileapps@dewa.gov.ae
  • mobileapps@dewa.gov.ae's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • Posts: 19
  • Thank you received: 0
Hi Team,

I am trying to find out an away to lock annotation in iOS as it done like in android with below code.


Highly appreciated your support.
//setting the all the annotation as read only
for (int i = 0; i < m_doc.PageCount; i++)
{
PDFPage page = m_doc.GetPage(i);
page.ObjsStart();
for (int j = 0; j < page.AnnotCount; j++)
{
PDFAnnot annot = page.GetAnnot(j);
annot.ReadOnly = true;
}
page.Close();
}
m_doc.Save();

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

How to Lock annotation set from Radeepdf in iOS 4 years 10 months ago #14432

  • federico
  • federico's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 261
  • Thank you received: 18
Dear user,
Here's a working lock annotations' code example for iOS:
for (int i = 0; i < pagecount; i++)
    {
        PDFPage *page = [m_doc page:i];
        page.objsStart;
        for (int j = 0; j < page.annotCount; j++)
        {
            PDFAnnot *annot = [page annotAtIndex:j];
            [annot setReadonly:YES];
        }
    }
    [m_doc save];

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

  • Page:
  • 1
Powered by Kunena Forum