Type Default Read Only Description
[C#]
XPoint

[Visual Basic]
XPoint
The top left of the current rectangle. No The current drawing position.

 

   

Notes
 

This property determines the current drawing position. This is used by the AddText method.

When you change the Page or Rect properties the Pos is automatically reset to the top left of the current Rect. After adding text using the AddText method the Pos is updated to point to the next text insertion position - just after the last drawn character.

 

   

Example
 

The following code creates a PDF document with text positioned at a number of different points within it.

[C#]
Doc theDoc = new Doc();
theDoc.FontSize = 48;
for (int i = 1; i <= 8; i++) {
  theDoc.Pos.X = i * 40;
  theDoc.Pos.Y = i * 80;
  theDoc.AddText("Pos = " + theDoc.Pos.String);
}
theDoc.Save(Server.MapPath("docpos.pdf"));
theDoc.Clear();

[Visual Basic]
Dim theDoc As Doc = New Doc()
theDoc.FontSize = 48
Dim i As Integer
For i = 1 To 8
  theDoc.Pos.X = i * 40
  theDoc.Pos.Y = i * 80
  theDoc.AddText("Pos = " + theDoc.Pos.String)
Next
theDoc.Save(Server.MapPath("docpos.pdf"))
theDoc.Clear()


docpos.pdf