Expand my Community achievements bar.

New Line in pdf display

Avatar

Level 4

Using xdp + xml data to generate pdf.

I have a floating field that is bind to data. Data is a paragraph with multiple \n to indicate new line. When form is preview in designer it shows \n char instead of moving next content in paragraph to new line.

It used to work in old version of Designer but not any more in ES2 (9)

I need to know what data need to be sent so that content would display on new line.

Thanks

YogLC

5 Replies

Avatar

Level 10

Hi YogLC,

Try using 
 (all five characters) instead of \n to add a new line.

Bruce

Avatar

Level 4

Thanks Bruce.

I tried 
  it did worked in designer but not on the server Forms ES2.

I have a text area and content from that are get passed as data to the floting field. As I understood textarea can generate soft and hard CR LF.

Which caracter I should pass to get the new line work correctly on the form?

Thanks

YogLC

Avatar

Former Community Member

I just tried it here and I got it to work but simply adding a CRLF to the data file...like this:

<?xml version="1.0" encoding="UTF-8"?>
<form1>
   <TextField> This is line 1.
    This is line 2</TextField>
</form1>

The \n is not being interpretted because there is no script involved in this. The data value is simply being bound to the field so whatever is in the data node will get put into the field.

Paul

Avatar

Level 4

Paul,

the old version of the designer and Form server was displaying paragraph correctly with following xml data but with Designer ES2 9 SP1 shows \u000d\u000a character inside the paragraph  and server throw exception on this xml data. (cobra communication error ...)

I tried replacing \u000d\u000a  with &#xA; &#xD;  but server throws exception.

Also If user enter multiple CR in the textarea still server throws exception.

<Paragraph>My comments for content from the textfield paragraph are here My comments for content from the textfield paragraph are here My comments for content from the textfield paragraph are here My comments for content from the textfield paragraph are here \u000d\u000a</Paragraph>

or

<Paragraph>My comments for content from the textfield paragraph are here My comments for content from the textfield paragraph are here My comments for content from the textfield paragraph are here My comments for content from the textfield paragraph are here

for content from the textfield paragraph are here My comments for content from the textfield paragraph are here

\u000d\u000a</Paragraph>

Avatar

Former Community Member

I just tried it here and I cannot get the \u000d\u000a to be respected at all but the spacing in the data is respected in both of the versions that I tried. When you say the older version worked ...which one are you referring to?

There is not much I can do about this ..your best approach is to open a bug with support and get them to tell you if it is a bug or not.

Paul