Type Default Value Read Only Description
Double   0.0 No The current horizontal positioning.




This property determines the horizontal offset of blocks of text - used for left aligning, right aligning or centering.

The offset is measured as a proportion of the distance from the left. A value of zero indicates left aligning, a value of one half indicates centered text and a value of one indicates right aligning. Intermediate values can be used for intermediate offsets.

To vertically align text, use the VPos property. To justify text, use the XTextStyle.Justification property.




The following code adds two blocks of text to a document. The first block is left aligned, and the second is right aligned. Before adding the text, we change the current rectangle and frame it so that you can see how the text is aligned.

Set theDoc = Server.CreateObject("ABCpdf13.Doc")
theDoc.FontSize = 96
theDoc.Rect.Magnify 1.0, 0.5
theDoc.Rect.Inset 40, 40
theDoc.AddText "Left justified text..."
theDoc.Rect.Move 0, theDoc.Rect.Height + 80
theDoc.HPos = 1.0
theDoc.AddText "Right justified text..."
theDoc.Save "c:\mypdfs\dochpos.pdf"