I am using Java/ Spring/jsp. Please see the code below.
I checked in the database, copied the content and pasted it on a text editor, I see the new line char are preserved in the database. The data I pasted now shows in multiple lines. So.. I don't think it is a problem with the text box.
But when I use the same content and pass it on to the PDF generator. I see the new line characters missing. I mean it prints all lines back to back, instead of printing the individual lines as a sparate line.
Any help is greatly appreciated.
Thanks in advance!
===============================================================
Here is my jsp code, using Spring.
<tr>
<td colspan="2" align="left">Enter Guest Comments:</td>
</tr>
<tr>
<td colspan="3" align="left"><form:textarea id="comments" path="recognition.comments" rows="12" cols="95"/></td>
</tr>
<tr>
<td colspan="3">
<input class="button" id="previewButton" style="cursor:pointer;" type="button" value="Preview/Print" onClick="handlePreviewSelected()"/>
<input class="button" id="saveButton" type="submit" value="Submit"/>
</td>
</tr>
</table>
</form:form>
======================================================================
Font pCommentsFont = FontFactory.getFont(aEraCmReader.getCommFontType(lAsset), aEraCmReader.getCommentsFontSize(lAsset), Font.BOLD, aEraCmReader.getCommFontColor(lAsset));
p = new Paragraph("");
p.setAlignment(Element.ALIGN_CENTER);
p.add(new Chunk(pRecognition.getComments(), pCommentsFont));
lDocument.add(p);
==============================================================
Mathias Nilsson wrote:
What sort of text box do you use? Html textarea, Swing JtextArea or .net?
Can you post some code on how you create the pdf and what the input are?