In this example we add three blocks of text to a document. The
first block uses the default spacing. The second block uses a
positive value to stretch out the text. The last block uses a
negative value to condense the text.
[C#]
Doc theDoc = new
Doc(); string theText = "This is an example of word
spacing."; theDoc.TextStyle.Size =
72; theDoc.AddText(theText); theDoc.Rect.Move(0,
-300); theDoc.TextStyle.WordSpacing =
20; theDoc.AddText(theText); theDoc.Rect.Move(0,
-300); theDoc.TextStyle.WordSpacing =
-20; theDoc.AddText(theText); theDoc.Save(Server.MapPath("stylewspace.pdf")); theDoc.Clear();
[Visual Basic]
Dim theDoc As Doc =
New Doc() Dim theText As String = "This is an example of word
spacing." theDoc.TextStyle.Size =
72 theDoc.AddText(theText) theDoc.Rect.Move(0,
-300) theDoc.TextStyle.WordSpacing =
20 theDoc.AddText(theText) theDoc.Rect.Move(0,
-300) theDoc.TextStyle.WordSpacing =
-20 theDoc.AddText(theText) theDoc.Save(Server.MapPath("stylewspace.pdf")) theDoc.Clear()
stylewspace.pdf
|