XTextStyle Indent Property. The first line of paragraph indent. ABCpdf .NET PDF Library.

ABCpdf .net

 
   

 

Type Default Read Only Description
[C#] double

[Visual Basic]
Double
0 No The first line of paragraph indent.

 

   

Notes
 

This property determines the horizontal indent applied to the first line of every paragraph.

If the indent is positive the start of the first line is shifted to the right by the specified number of points. If the indent is negative it is shifted to the left by the specified number of units.

 

   

Example
 

In this example we add a block of text to a document. We specify a ParaSpacing value to space out the paragraphs and an Indent value to indent the first line of each paragraph.

[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.";
theText = theText + theText;
theText = theText + "\r\n" + theText + "\r\n";
theText = theText + theText + theText + theText;
theDoc.Rect.Inset(20, 40);
theDoc.TextStyle.Size = 16;
theDoc.TextStyle.ParaSpacing = 16;
theDoc.TextStyle.Indent = 48;
theDoc.AddText(theText);
theDoc.Save(Server.MapPath("styleindent.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."
theText = theText + theText
theText = theText + vbCrLf + theText + vbCrLf
theText = theText + theText + theText + theText
theDoc.Rect.Inset(20, 40)
theDoc.TextStyle.Size = 16
theDoc.TextStyle.ParaSpacing = 16
theDoc.TextStyle.Indent = 48
theDoc.AddText(theText)
theDoc.Save(Server.MapPath("styleindent.pdf"))
theDoc.Clear()


styleindent.pdf