Posted 30 April 2020, 8:14 am EST
Dear friends,
I will place text with different font-heights in the same line in a C1PrintDocument.
Why it is not possible to read the height or the Y-Position of a render Object as RenderArea, RenderText, RenderRichText. I tried it in thousends of variants. You ever gets the value “auto” and a value. There is a sample to get the Y position of RenderParagraph. But this did not work with RenderArea or RenderText. Otherwise I did not see, how to set the X-Position in a RenderParagraph.
Imports C1.C1Preview
Imports System.IO
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
MakeDoc1(C1PrintDocument1)
End Sub
Private Sub MakeDoc1(ByVal doc As C1PrintDocument)
Dim rrt1 As New RenderRichText(File.ReadAllText(“D:\Test.rtf”))
doc.Body.Children.Add(rrt1)
C1PrintDocument1.Generate()
Label1.Text = rrt1.Height
Label2.Text = rrt1.Y
End Sub
End Class