Type Default Read Only Description
[C#]
XTextStyle

[Visual Basic]
XTextStyle
Ten point text. No The current style for drawing text.

 

   

Notes
 

This property determines the current style settings used for adding text.

 

   

Example
 

The following code creates a PDF document and adds some text using a number of the text style properties to control formatting.

[C#]
Doc theDoc = 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. Hi omnes lingua, institutis, legibus inter se differunt. Gallos ab Aquitanis Garumna flumen, a Belgis Matrona et Sequana dividit.";
theText = theText + "\r\n" + theText + "\r\n" + theText + "\r\n";
theDoc.Rect.Inset(20, 20);
theDoc.TextStyle.Size = 32;
theDoc.TextStyle.Justification = 1;
theDoc.TextStyle.Indent = 64;
theDoc.TextStyle.ParaSpacing = 32;
theDoc.AddText(theText);
theDoc.Save(Server.MapPath("doctextstyle.pdf"));
theDoc.Clear();

[Visual Basic]
Dim theDoc As Doc = 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. Hi omnes lingua, institutis, legibus inter se differunt. Gallos ab Aquitanis Garumna flumen, a Belgis Matrona et Sequana dividit."
theText = theText + vbCrLf + theText + vbCrLf + theText + vbCrLf
theDoc.Rect.Inset(20, 20)
theDoc.TextStyle.Size = 32
theDoc.TextStyle.Justification = 1
theDoc.TextStyle.Indent = 64
theDoc.TextStyle.ParaSpacing = 32
theDoc.AddText(theText)
theDoc.Save(Server.MapPath("doctextstyle.pdf"))
theDoc.Clear()


doctextstyle.pdf