|
The following example adds two blocks of styled text to a document.
The first block is in Helvetica and the second in Courier.
[C#]
Doc theDoc = new Doc();
theDoc.FontSize = 96; // big text
theDoc.Font = theDoc.AddFont("Helvetica");
theDoc.AddText("Helvetica Text.");
theDoc.Font = theDoc.AddFont("Courier");
theDoc.AddText("Courier Text.");
theDoc.Save(Server.MapPath("docfont.pdf"));
theDoc.Clear();
[Visual Basic]
Dim theDoc As Doc = New Doc()
theDoc.FontSize = 96 ' big text
theDoc.Font = theDoc.AddFont("Helvetica")
theDoc.AddText("Helvetica Text.")
theDoc.Font = theDoc.AddFont("Courier")
theDoc.AddText("Courier Text.")
theDoc.Save(Server.MapPath("docfont.pdf"))
theDoc.Clear()

docfont.pdf
|