The following code adds three words to a document. The positioning
is done using standard .NET Points.
[C#]
Doc theDoc = new Doc();
theDoc.FontSize = 96;
Point pt = theDoc.Pos.Point;
pt.Offset(100, 150);
theDoc.Pos.Point = pt;
theDoc.AddText("One");
pt.Offset(100, 150);
theDoc.Pos.Point = pt;
theDoc.AddText("Two");
pt.Offset(100, 150);
theDoc.Pos.Point = pt;
theDoc.AddText("Three");
theDoc.Save(Server.MapPath("xptpt.pdf"));
theDoc.Clear();
[Visual Basic]
Dim theDoc As Doc = New Doc()
theDoc.FontSize = 96
Dim pt As Point = theDoc.Pos.Point
pt.Offset(100, 150)
theDoc.Pos.Point = pt
theDoc.AddText("One")
pt.Offset(100, 150)
theDoc.Pos.Point = pt
theDoc.AddText("Two")
pt.Offset(100, 150)
theDoc.Pos.Point = pt
theDoc.AddText("Three")
theDoc.Save(Server.MapPath("xptpt.pdf"))
theDoc.Clear()
xptpt.pdf
|
|
|