When I write some text in the textfield and press ENTER (being on the simulator), the text is saved to the PDF.
But when I click on the pdf instead, it is not saved.
Behaviour of the methods mentioned above is the same.
Probably, it can give you some clues, such as tapping removes some focus and setEditBoxWithText does not work as expected
So, it is not about the actual saving to the doc, but about the PDFView instead.
this is the standard behaviour of the demo project: when you tap the pdf page, the vAnnotEnd method of PDFView class is called (in OnAnnotTouchEnd method), and the selected annotation (in this case the editText) lose the focus without calling the save method.
Tapping the "enter" button, the save method is called before the vAnnotEnd keeping the changes of the editText
To reach your needs you can modify the OnAnnotTouchEnd method to save the editText also in this case.
Yeah, did this, fortunately you have UI logic implemented and opensource. thanks for your quick reply. On a side note, I think it is a default behaviour while filling fields - to tap out of a field and do not expect the text to be disappearing.