DDX - New Line

18 views
Skip to first unread message

Abhishek Kolluru

unread,
Sep 21, 2022, 3:10:26 PM9/21/22
to live...@googlegroups.com
Hello Everyone - I needed a quick help to print a paragraph within DDX in multiple lines, basically each string that I append. I want to print them in a new line, i tried \n, <br>, neither of them worked, couldn't think of any, please suggest. Here is my DDX. The line in bold, where i append Strings, i want each in a new line.

String ddx = "";
ddx += "<?xml version='1.0' encoding='UTF-8'?>\n";
ddx += "<DDX xmlns='http://ns.adobe.com/DDX/1.0/'>\n";
String headerStr = patExecContext.getProcessDataStringValue("/process_data/@overlayStr");
String headerStr1 = patExecContext.getProcessDataStringValue("/process_data/@overlayStr1");
String headerStr2 = patExecContext.getProcessDataStringValue("/process_data/@overlayStr2");
String headerStr3 = patExecContext.getProcessDataStringValue("/process_data/@overlayStr3");
ddx += "<PDF result='doc2'>"+"\n";
ddx+="<PDF source='doc1'>" +"\n";
ddx+="<Header padding='.3in'><Left>" + "\n";
ddx+="<StyledText><p color = '#ff0000'>" + (headerStr)  + (headerStr1) + (headerStr2) + (headerStr3) +"</p></StyledText></Left>";
ddx+="</Header><Footer padding='.25in'><Center><StyledText><p>A centered footer</p></StyledText></Center></Footer>" + "\n";
ddx += "</PDF></PDF><?ddx-source-hint name='doc1'?>\n";
ddx +="</DDX>\n";
System.out.println("DDX string= "+ ddx);
patExecContext.setProcessDataStringValue("/process_data/@inDDXStr",ddx);

Thanks,
Abhishek

fred.pantalone

unread,
Sep 23, 2022, 4:54:11 PM9/23/22
to Adobe LiveCycle Developers
This works for me:

ddx+="<StyledText><p color = '#ff0000'>" + (headerStr)  +"</p>";
ddx+="<p color = '#ff0000'>" + (headerStr1) + "</p>";
ddx+="<p color = '#ff0000'>" + (headerStr2) + "</p>";
ddx+="<p color = '#ff0000'>"  + (headerStr3) +"</p></StyledText></Left>";

Abhishek Kolluru

unread,
Sep 23, 2022, 5:01:10 PM9/23/22
to live...@googlegroups.com
works like a charm ! i tried everything except this :-(.

Thanks Fred.

--
You received this message because you are subscribed to the Google Groups "Adobe LiveCycle Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to livecycle+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/livecycle/db1c8c82-3144-41ce-9707-06fa809751dbn%40googlegroups.com.

Adam D.

unread,
Sep 23, 2022, 10:39:36 PM9/23/22
to live...@googlegroups.com, Abhishek Kolluru
Mr. Pantalone does it again! Your commitment ro the group is valued. Thanks Fred!



- Adam
Reply all
Reply to author
Forward
0 new messages