LineSpacing and newlines

3 posts, 0 answers
  1. Shaun
    Shaun avatar
    31 posts
    Member since:
    Jul 2011

    Posted 06 Feb 2015 Link to this post


    I am struggling to alter the linespacing on the I use the following line of code;

    textBlock1.LineSpacing = 10

    However this doesn't seem to have any effect. Nothing crashes and there is no problems running the code. If I break at this line the value is never set. I can use the Visual Studio debugger to set the value and it works perfectly. Any ideas?

    Secondly when using multiline text from a database the block doesn't seem to respect newlines. I have to use the following code which seems a bit excessive.
    01.Private Sub InsertText(textBlock As Editing.Block, descriptionText As String)
    02.           Dim ascii() As Byte = System.Text.Encoding.ASCII.GetBytes(descriptionText)
    03.           For i As Integer = 0 To descriptionText.Length - 1
    04.               If ascii(i) = 13 Then
    05.                   textBlock.InsertLineBreak()
    06.               Else
    07.                   textBlock.InsertText(descriptionText(i))
    08.               End If
    09.           Next
    10.       End Sub

    Any help would be much appreciated.


  2. Shaun
    Shaun avatar
    31 posts
    Member since:
    Jul 2011

    Posted 09 Feb 2015 Link to this post

    Please ignore the first part of this question. When continuing on with other parts of this document the line spacing has started to work. Unfortunately I am not sure when this was.  
  3. Kammen
    Kammen avatar
    313 posts

    Posted 09 Feb 2015 Link to this post

    Hi Shaun,

    Thank you for the interest in RadPdfProcessing.

    1. LineSpacing does not work correctly. For the official release at the end of the month we will redesign its behavior. The line spacing will work the same way as in RadWordsProcessing - 3 different states AtLeast, Exact and Auto that will affect the line spacing differently.

    2. Currently the Block element does not break multiline text on lines. We will consider this feature request and maybe we will implement it for one of the future releases.

    Hope this answers your questions.


    Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

Back to Top