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
|
|
|