DynaPDF Manual - Page 766

Previous Page 765   Index   Next Page 767

Function Reference
Page 766 of 777
As you can see above, the string is not delimited, each alignment tag follows just a string without a
carriage return or line feed. We use the command tag "\FC[]" to change the text color so that we
can better distinguish between the alignments. However, after changing the alignment the cursor
moves always to the next line and the text is printed in the new alignment.
You can also see how the rectangle was filled with text. The function GetLastTextPosY() returns the
baseline of the last text line in bottom-up coordinates . We use this value to calculate the height of the
rectangle. However, the last baseline is often required to place other objects onto the page after the
text was printed.
The x-coordinate can also be determined by the function GetLastTextPosX() so that it is quite easy to
get the exact position of the end of the string.
The text alignment is active until it will be changed by an alignment tag. If the string contains no
alignment tag, the entire text is printed in the same alignment. Now we want to see what kind of
command tags are available. You have already seen a command tag (\FC[]), let's take a look on the
other tags.
Command tags
A command tag is a tag that causes the execution of a function. This function can change a property,
set a font, create a bookmark, or other things.
// underline
// strikeout
// underline + strikeout
// new page
// tab length
\LD[float] // leading
\CS[float] // char spacing
\TR[float] // text rise
\TS[float] // text scaling

Previous topic: Text formatting, Alignment tags

Next topic: Special characters