Microsoft Windows Phone 8.1 support ends (13 Jul 2017)

Microsoft has ended support for Windows Phone 8.1

Questions about iOS development and PDF

Cannot write text in EditBox

More
IP: 192.168.0.71 8 years 3 months ago #12962 by umberto.marini
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
Code:
- (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
Code:
- (void)setEditBoxWithText:(NSString *)text
Here m_status is correctly sta_annot but the line of code
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)
More
IP: 192.168.0.71 8 years 3 months ago #12965 by emanuele
Hi,

which kind of license are you using?
To use editBox field you need premium license.
More
IP: 192.168.0.71 8 years 3 months ago - 8 years 3 months ago #12967 by umberto.marini
Hi Emanuele
I'm in a development phase and I'm using the test license, which should be a premium one:
Code:
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
Last edit: 8 years 3 months ago by umberto.marini.
More
IP: 192.168.0.71 8 years 3 months ago #12970 by emanuele
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.
More
IP: 192.168.0.71 8 years 3 months ago - 8 years 3 months ago #12973 by umberto.marini
I'm working in the cache directory, but the problem appears also in the Documents folder.
Just before updating the value, if I call
Code:
[m_doc canSave]
the answer is true.
In addition, I have the same problem with comboBoxes: in this case, the value seems to change
Code:
Page_setAnnotComboItem( m_page, m_handle, index )
returns true and calling
Code:
[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!
Last edit: 8 years 3 months ago by umberto.marini.
More
IP: 192.168.0.71 8 years 3 months ago #12974 by emanuele
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).
Time to create page: 0.487 seconds
Powered by Kunena Forum