Type   Default Value   Read Only   Description
Float 0.0 No The horizontal justification factor.

 

   
Notes
 
     

Allows you to adjust the horizontal justification.

Every line of text is drawn within a bounding box determined by the Doc.Rect property. The justification property can be used to space out words so that they fit the bounding box exactly.

Typically you will only need to use values of zero - no justification - and one - full justification. However intermediate values can be used to partially justify text.

As each line is drawn the difference between the width of the line and the width of the bounding box is evaluated to determine the amount of free width. This free width is divided by the number of space characters in the line and then multiplied by the justification factor to produce an inter-word spacing for the line. Lines at the end of paragraphs are not justified.

Text alignment is determined by the Doc.HPos and Doc.VPos properties.

 

   
Example
 
     

In this example we add two blocks of text to a document. The first is added with no justification and the second is added with a justification factor of one.

Set theDoc = Server.CreateObject("ABCpdf3.Doc")
theText = "Gallia est omnis divisa in partes tres, quarum unam incolunt Belgae, aliam Aquitani, tertiam qui ipsorum lingua Celtae, nostra Galli appellantur."
theDoc.Rect.Inset 20, 40
theDoc.TextStyle.Size = 48
theDoc.AddText theText
theDoc.Rect.Move 0, -350
theDoc.TextStyle.Justification = 1
theDoc.AddText theText
theDoc.Save "c:\mypdfs\stylejustification.pdf"


stylejustification.pdf

 

 

   

 

Browser Based Help. Published by chm2web software.