All readonly fields are editable - 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...
Development and suggestions about third part tool integration.
Cordova, Xamarin, Basic4Android topics are listed here.
  • Page:
  • 1

TOPIC: All readonly fields are editable

All readonly fields are editable 1 year 4 months ago #12671

  • dpetrov
  • dpetrov's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 1
  • Thank you received: 0
Hi!

I have made a pdf form where some acro fields are read only, but when I open this pdf with a radaee plugin for cordova - all of the acro fields are editable.
Is it possible to make only non-readonly fields editable?
Attachments:

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

All readonly fields are editable 1 year 4 months ago #12719

  • emanuele
  • emanuele's Avatar
  • Online
  • Moderator
  • Moderator
  • Posts: 526
  • Karma: 20
  • Thank you received: 60
Hi,

you can check if the annotation is readonly with [PDFAnnot isReadonly].
In PDFView class, you can edit the onSingleTap method where it checks if the annotation is an edit text:
            NSString *nuri = [m_annot getEditText];
            if (nuri) {
                if (m_delegate) {
                    CGRect annotRect;
                    annotRect.origin.x = m_annot_rect.left / m_scale;
                    annotRect.origin.y = m_annot_rect.top / m_scale;
                    annotRect.size.width = (m_annot_rect.right - m_annot_rect.left)/m_scale;
                    annotRect.size.height = (m_annot_rect.bottom - m_annot_rect.top)/m_scale;
                    [m_delegate OnAnnotEditBox :annotRect : nuri];
                }
                return;
            }
and add the readonly check:
            NSString *nuri = [m_annot getEditText];
            if (nuri) {
                if (m_delegate && ![m_annot isReadonly]) {  // <-- Here is the readonly check
                    CGRect annotRect;
                    annotRect.origin.x = m_annot_rect.left / m_scale;
                    annotRect.origin.y = m_annot_rect.top / m_scale;
                    annotRect.size.width = (m_annot_rect.right - m_annot_rect.left)/m_scale;
                    annotRect.size.height = (m_annot_rect.bottom - m_annot_rect.top)/m_scale;
                    [m_delegate OnAnnotEditBox :annotRect : nuri];
                }
                return;
            }

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

  • Page:
  • 1
Powered by Kunena Forum