In this example we add two blocks of text to a document. The
first is added with no justification and the second is added with a
justification factor of one.
using (Doc doc = new Doc()) {
string theText = "Gallia est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae, nostra Galli appellantur.";
doc.Rect.Inset(20, 40);
doc.TextStyle.Size = 48;
doc.AddText(theText);
doc.Rect.Move(0, -350);
doc.TextStyle.Justification = 1.0;
doc.AddText(theText);
doc.Save(Server.MapPath("stylejustification.pdf"));
}
Using doc As New Doc()
Dim theText As String = "Gallia est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae, nostra Galli appellantur."
doc.Rect.Inset(20, 40)
doc.TextStyle.Size = 48
doc.AddText(theText)
doc.Rect.Move(0, -350)
doc.TextStyle.Justification = 1.0
doc.AddText(theText)
doc.Save(Server.MapPath("stylejustification.pdf"))
End Using