Left-justify and Right-justify within same line not possible

I tried the following code to add a right-justified segment immediately after a left-justified segment. It doesn’t work. They just print out right next to each other.



Pdf pdf = new Pdf();

MarginInfo margin = new MarginInfo();

margin.Left = 60;

margin.Top = 50;

margin.Right = 95;

margin.Bottom = 60;

pdf.OpenType = OpenType.Auto;

pdf.DestinationType = DestinationType.FitHeight;

pdf.PageSetup.Margin = margin;

Aspose.Pdf.TextInfo txtInfo = new Aspose.Pdf.TextInfo();

txtInfo.FontName = “Arial”;

txtInfo.FontSize = 12;

txtInfo.Alignment = AlignmentType.Left;

Segment s1 = new Segment("This is supposed to be left justified but isn’t ");

s1.TextInfo.Alignment = AlignmentType.Left;

text4.Segments.Add(s1);

Segment s2 = new Segment(“This is supposed to be right justified but isn’t”);

s2.TextInfo.Alignment = AlignmentType.Right;

text4.Segments.Add(s2);

section1.Paragraphs.Add(text4);

pdf.Save(“C:/WINNT/ACTIVEPDF/Fallbeurteilung3.pdf”);

Hi,

Thank you for considering Aspose.

This question is already answered at: http://www.aspose.com/Wiki/default.aspx/Aspose.Corporate/ContactChangsha.html