Cannot write text in EditBox - 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 iOS development and PDF
  • Page:
  • 1
  • 2

TOPIC: Cannot write text in EditBox

Cannot write text in EditBox 1 year 1 month ago #12962

  • umberto.marini
  • umberto.marini's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
Hi,
I have a PDF file with some textfields in it and I would like to edit them.
I did the same of your example project: I implemented the delegate of the PDFView
- (void)OnAnnotEditBox :(CGRect)annotRect :(NSString *)editText
Here I show a textfield to get the text from the user. On enter key press, the text is passed to the PDFView by
- (void)setEditBoxWithText:(NSString *)text
Here m_status is correctly sta_annot but the line of code
[m_annot setEditText:text];
is returning false instead of true.
The same document in the example project is working as expected.
Am I forgetting something to do to get the text written on the EditBox?

Thank you
Example file in attachment (please look at page 3 for the textfields)
Attachments:

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

Cannot write text in EditBox 1 year 1 month ago #12965

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 516
  • Karma: 15
  • Thank you received: 56
Hi,

which kind of license are you using?
To use editBox field you need premium license.

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

Cannot write text in EditBox 1 year 1 month ago #12967

  • umberto.marini
  • umberto.marini's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
Hi Emanuele
I'm in a development phase and I'm using the test license, which should be a premium one:
BOOL success = Global_activePremium("com.radaee.pdf.PDFViewer", "Radaee", "radaee_com@yahoo.cn", "89WG9I-HCL62K-H3CRUZ-WAJQ9H-FADG6Z-XEBCAO");
Here success is true.
I have no other "license version" related problems, and I can edit all other acrofield types (checkboxes, signatures...)
Thanks for your help

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

Last edit: by umberto.marini.

Cannot write text in EditBox 1 year 1 month ago #12970

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 516
  • Karma: 15
  • Thank you received: 56
Hi,

is your pdf file in a writable folder? If you are opening the pdf file from assets it is in readonly mode, you can try to move it in Documents folder.

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

Cannot write text in EditBox 1 year 1 month ago #12973

  • umberto.marini
  • umberto.marini's Avatar Topic Author
  • Offline
  • Fresh Boarder
  • Fresh Boarder
  • Posts: 6
  • Thank you received: 0
I'm working in the cache directory, but the problem appears also in the Documents folder.
Just before updating the value, if I call
[m_doc canSave]
the answer is true.
In addition, I have the same problem with comboBoxes: in this case, the value seems to change
Page_setAnnotComboItem( m_page, m_handle, index )
returns true and calling
[m_annot getComboSel]
gives you the correct index, but the interface isn't refreshing correclty, always showing the old value.

For checkboxes and images I got no problems, all works fine!

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

Last edit: by umberto.marini.

Cannot write text in EditBox 1 year 1 month ago #12974

  • emanuele
  • emanuele's Avatar
  • Offline
  • Moderator
  • Moderator
  • Posts: 516
  • Karma: 15
  • Thank you received: 56
Hi,

if you modify elements of the current page, you should also call vRenderSync to refresh the page.
You can take a look at PDFView class of demo project, where vRenderSync is called after setter methods (for combobox, editText, draw annotations....).
About EditText, make sure to have a valid m_annot instance in PDFView class when you're calling setEditBoxWithText and do not call vAnnotEnd method before setEditBoxWithText (it set the current m_annot to null).

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

  • Page:
  • 1
  • 2
Powered by Kunena Forum