Forums

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF Generator for .NET (v4.x)  /  Line Breaks

Forum Thread - Line Breaks

 Mar 16 2007 5:50 PM
Okay, simple question.  How do you peform line breaks within a table cell, label or textarea?
 Mar 19 2007 8:52 AM
Posted by a ceTe Software moderator
Hello,

You can add the line breaks using the "\n" escape sequence. Following is the sample code snippet:

C# Code:
string text = "Hello\nWorld";
Label label = new Label( text, 0, 0, 504, 100, Font.Helvetica, 18, TextAlign.Center );

VB.Net Code:

Dim Text As String = "Hello" & vbCrLf & "World"
Dim MyLabel As Label = New Label(Text, 0, 0, 504, 100, Font.Helvetica, 18, TextAlign.Center)

Thanks,
ceTe Software Support Team
 Mar 19 2007 9:15 AM
Great thanks for your help!

Jason
 Feb 12 2018 1:16 PM
The vbcrlf doesn't seem to work for me.

 For Each line As String In MailingAddress
            vars.newdoc.Form.Fields("Address").Value = line & vbCrLf
Next

What I get is just the last line of the address.

 Feb 13 2018 11:44 AM
Posted by a ceTe Software moderator
Hello,

Can you please send over the following details so support@cete.com so we can look into it further?

1.        Source PDF used for merging and filling.
2.        Code sample.
3.        Exact version and build number of the DynamicPDF DLL file used in the application. You can get this information in DLL references properties (Version and Description fields) in Visual Studio.
4.        Output PDF.

Thanks,
ceTe Software Support Team.
 Feb 16 2018 12:15 PM
Posted by a ceTe Software moderator
Hello,

When setting PDF form field values with multi-line strings containing vbcrlf, you would need to make sure that the form field has multi-line property enabled. You should be able to set this multi-line property in whatever tool (like Adobe Acrobat Professional) that was used to create the PDF form. 

Thanks,
ceTe Software Support Team.

All times are US Eastern Standard time. The time now is 7:19 AM.