Highlighted

Dynamically Add Lines based on Text length

Ryan_Lunka

16-12-2008

I have a form with a text field. That field is bound to a string field in the form's attached XSD schema. The length of that string could be up to 9000 characters. My requirement is to fill the text field (which stretches across the page), if needed add another and continue filling, and so on until all of the text is finished.



It has to start out as one text field and the text field has to repeat (because there is a business requirement that there be a black line beneath each line of text and that black line must be spaced out a static distance). I can (and assume I will have to) wrap that text field in a repeatable subform, but my problems are...



1. I cannot find a way to overflow one text field into another.



2. I tried splitting the string into an array of each individual word, then re-assigning it to the text field word by word, but the font is not monospace, so there is no way to know how many numbers of characters will fill the text field.



3. It has to happen at the point you attach XML to the form (while in Designer I use test XML so essentially at initialize). I've been playing with the initialize event and layout:ready event.



Does anyone have any feedback on this issue?



Thank you so much!



Ryan D. Lunka

Cardinal Solutions Group

rlunka@cardinalsolutions.com

Replies

Highlighted

pguerett

16-12-2008

Could you use a floating field to accomplish this? If not we added the ability to break fields across pages in version 8.2 Designer / Version 9 of Acrobat.
Highlighted

Ryan_Lunka

16-12-2008

Well our alternate plan is to let the field break across pages, but then there is only one line under the last line of text. Our requirement is to have a line under each line of text.



What do you mean by floating field?
Highlighted

pguerett

17-12-2008

You can define a field in the midst of a text block that will get populated by the merge operation at start time. The field will expand and th etext will reflow. It is not interactive though. You can place your cursor into a text block and use the Insert menu add choose floating field.
Highlighted

yodadobe

17-12-2008

You could also try setting 'Limit Length to Visible Area' then adding one word at a time until the word does not really get added/errors. If it did not get added, proceed to next line.