Signin/Signup with: 
Welcome, Guest
Username: Password: Remember me
Development and suggestions about third part tool integration.
Cordova, Xamarin, Basic4Android topics are listed here.
  • Page:
  • 1

TOPIC:

All readonly fields are editable 6 years 8 months ago #12671

  • dpetrov
  • dpetrov's Avatar Topic Author
  • Offline
  • New Member
  • New Member
  • 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 6 years 8 months ago #12719

  • emanuele
  • emanuele's Avatar
  • Offline
  • User is blocked
  • User is blocked
  • Posts: 580
  • Thank you received: 67
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