|
The following code adds two blocks of text to a document. The
first block is bottom aligned and the second is top aligned. Before
adding the text we change the current rectangle and frame it so
that you can see how the text is aligned.
[C#]
Doc theDoc = new Doc();
theDoc.FontSize = 96;
theDoc.Rect.Magnify(1.0, 0.5);
theDoc.Rect.Inset(40, 40);
theDoc.FrameRect();
theDoc.AddText("Top aligned text...");
theDoc.Rect.Move(0, theDoc.Rect.Height + 80);
theDoc.FrameRect();
theDoc.VPos = 1.0;
theDoc.AddText("Bottom aligned text...");
theDoc.Save(Server.MapPath("docvpos.pdf"));
theDoc.Clear();
[Visual Basic]
Dim theDoc As Doc = New Doc()
theDoc.FontSize = 96
theDoc.Rect.Magnify(1.0, 0.5)
theDoc.Rect.Inset(40, 40)
theDoc.FrameRect()
theDoc.AddText("Top aligned text...")
theDoc.Rect.Move(0, theDoc.Rect.Height + 80)
theDoc.FrameRect()
theDoc.VPos = 1.0
theDoc.AddText("Bottom aligned text...")
theDoc.Save(Server.MapPath("docvpos.pdf"))
theDoc.Clear()

docvpos.pdf
|
|
|