I am trying to implement a solution where I have to populate a text field with a string that may be too large to fit in the text field. In this case, I want to populate a second text field with the overspill.
The field does not have a character limit, but has "Scroll long text" set to false, multiline to true.
Is there any way to simulate the key press, so that the event is triggered as if the user entered via the keyboard?
Any other solutions to this problem?
Why would you need to do it? If you're setting the value with a script you can easily check the length of that value and if necessary split it yourself and apply each part to a different field.
Although there are methods for calculating the space required for a large string, they are not 100% reliable, as I have discovered in other areas of the project. It would be much cleaner for Acrobat to do the calculating and flag whether a string fits or not, rather than performing the calculation elsewhere.