Paragraph Spacing on Text Fields
hello,
i creating interactive pdf, , 1 of things trying set front end "panel" questions receive user's input, , these answers used create static letter, building various parts different fields. basic setup doing this. however, problem have run on user input text fields have multiple paragraphs (set multi-line). need grab text in these fields , place in final letter, styled design standard. can set font family , line spacing on final static letter fine.
but have tried unsuccessfully set paragraph spacing. there countless attributes, , every website seems know few, not right ones this. tried using "para.spacebelow =" did not work. tried different "receiving" containers paragraphs on final static form, such protected text field , floating field in basic text object. none of seems allow me control space between paragraphs, unfortunately. beginning think have ask user add separate paragraphs unique text fields grab data , able space paragraphs correctly.
i hope can this.
thanks,
keith
hi keith,
if input text field set rich text need add margin-top attribute style <p> element (which paragraph element), so;
default xml namespace =
"http://www.w3.org/1999/xhtml";
var richtext = new
xml(textfield1.value.exdata["##xhtml"].savexml("pretty").replace(/^<\?xml\s+version\s*=\s*(["'])[^\1]+\1[^?]*\?>\n*/,
""))
for each (var p in richtext.p) {
p.@style = "margin-top:10pt;";
}
textfield2.value.exdata.loadxml(richtext.toxmlstring(), /* ignore root node */
false, /* overwrite
content */ true);
try sample , see if heading in right direction. https://sites.google.com/site/livecycledesignercookbooks/home/richtext%20margin-top.pdf?at tredirects=0&d=1
if have more work retaining of other style attributes can added <p> element.
you might able use span objects, support limited set of rich text formatting. there sample here, adobe livecycle designer cookbooks br001: programmatically updating rich text (or xhtml)
is sort of thing trying do?
regards
bruce
More discussions in LiveCycle Designer
adobe
Comments
Post a Comment