Quantcast
Channel: Aspose.Pdf Product Family
Viewing all articles
Browse latest Browse all 3131

Setting line spacing for FreeTextAnnotations

$
0
0
Hello - 

I'm trying to add a multi-line content to a freetextannotation object but I'm getting a double line spacing between the lines. Please see the code snippet below:

Dim text as string = "line 1" & vbnewline & "line 2" & vbnewline & "line 3"
 Dim content As Aspose.Pdf.Text.TextFragment = New Aspose.Pdf.Text.TextFragment(text)
 Dim annotation As New Annotations.FreeTextAnnotation(page, New Rectangle(llx, lly, urx, ury), default_appearance)

            ' Specify the contents of annotation
            annotation.Contents = content.Text
            annotation.Color = Color.LightBlue
            annotation.Flags = AnnotationFlags.Print + AnnotationFlags.LockedContents

            page.Annotations.Add(annotation)

How can I set the line spacing within a freetextannotation ?

Thank you

Viewing all articles
Browse latest Browse all 3131

Trending Articles