Support for Vertical Alignment of Text Markup in PDF Report Output

As of Release 7.7 Version 05/Release 8.0 Version 01, text can be vertically aligned within Text Objects in PDF format. This feature supports top, middle, and bottom alignment options to explicitly place text within the defined position and dimensions. The vertical alignment tags can be used in conjunction with the horizontal alignment tags (left, right, full) to control the placement of any text object.

Syntax:

Top Alignment:

<top>text</top>

Middle Alignment:

<mid>text</mid>

Bottom Alignment:

<bottom>text</bottom>

Top of page

Example: Vertically Aligning Text Markup in PDF Report Output

The following request creates three boxes and places a text string object within each of the boxes:

Note: Text markup syntax cannot contain hidden carriage return or line feed characters. For purposes of presenting this example in this documentation, line feed characters have been added so that the sample code wraps to fit within the printed page. To run this example in your environment, copy the code into a text editor and delete any line feed characters within the text markup object by going to the end of each line and pressing Delete. In some instances, you may need to add a space to maintain the structure of the string. For additional information on displaying carriage returns within the text object see Text Formatting Markup Tags for a Text Object in Chapter 10, Linking a Report to Other Resources in the Creating Reports With WebFOCUS Language manual.

SET PAGE-NUM=OFF
TABLE FILE GGSALES
BY REGION NOPRINT
ON TABLE PCHOLD FORMAT PDF
ON TABLE SET STYLE *
type=report, font=arial, size=10, $
object=box, position=(1 1), dimension=(6 1), $
object=line, position=(3 1), endpoint=(3 2), $
object=line, position=(5 1), endpoint=(5 2), $ 
object=string, text='<top>Vertically aligned text within a text object using top alignment.</top>', position=(1.05 1), dimension=(2 1), linespacing=exact(.15), markup=on, wrap=on, $
object=string, text='<mid>Vertically aligned text within a text object using middle alignment.</mid>', position=(3.05 1), dimension=(2 1), linespacing=exact(.15), markup=on, wrap=on, $
object=string, text='<bottom>Vertically aligned text within a text object using bottom alignment.</bottom>', position=(5.05 .9), dimension=(2 1),linespacing=exact(.15), markup=on, wrap=on, $ 
END

The output is:


WebFOCUS