|
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.
using var doc = new Doc();
doc.FontSize = 96;
doc.Rect.Magnify(1.0, 0.5);
doc.Rect.Inset(40, 40);
doc.FrameRect();
doc.AddText("Top aligned text...");
doc.Rect.Move(0, doc.Rect.Height + 80);
doc.FrameRect();
doc.TextStyle.VPos = 1.0;
doc.AddText("Bottom aligned text...");
doc.Save(Server.MapPath("docvpos.pdf"));
Using doc As New Doc()
doc.FontSize = 96
doc.Rect.Magnify(1.0, 0.5)
doc.Rect.Inset(40, 40)
doc.FrameRect()
doc.AddText("Top aligned text...")
doc.Rect.Move(0, doc.Rect.Height + 80)
doc.FrameRect()
doc.TextStyle.VPos = 1.0
doc.AddText("Bottom aligned text...")
doc.Save(Server.MapPath("docvpos.pdf"))
End Using

docvpos.pdf
Also see example code in: ABCpdf Deletion Example,
ABCpdf Headers and
Footers Example, Doc
AddPage Function, Doc
Append Function, Doc
Read Function, Doc
RemapPages Method, XRendering SaveAlpha
Property, XTransform
AngleUnit Property.
|