I seem unable to add text which has leading spaces to a text object. I have a need to create a paragraph/section that has 8 blank lines at the beginning. If I put a single character on each line (along with carriage return line feed) it works, if I add only the carriage return line feed it seems to get stripped off. Here is a code snippet in VB.net:
Dim loPDFDoc_ As New Pdf
Dim loPDFSection_ As Section
Dim loPDFText_ As Text
Dim loPDFSegment_ As Segment
Dim lsPage_ As String = String.Empty
'this is the shortened version of what I'm trying to do. In practice I'm creating 70+ lines of text with leading/trailing and internal blank lines. While the spaces are irrelevant I need the blank/empty lines.
lsPage_ = " " & vbcrlf & " " & vbcrlf & "this begins the text I want printed"
loPDFText_ = New Text
.TextInfo.Alignment = AlignmentType.Left
.TextInfo.FontName = FontName_
.TextInfo.FontSize = FontSize_
.IsSpaced = True
loPDFSegment_ = loPDFText_.Segments.Add(lsPage_)
loPDFSection_ = loPDFDoc_.Sections.Add()
loPDFSection_.IsLandscape = False
loPDFSection_.Paragraphs.Add(loPDFText_) 'this is where it seems to strip out the leading spaces.