Xojo Developer Conference
25/27th April 2018 in Denver.
MBS Xojo Conference
6/7th September 2018 in Munich, Germany.

DynaPDF Manual - Page 739

Previous Page 738   Index   Next Page 740

Function Reference
Page 739 of 750
Output:
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.
\ul#
// underline
\st#
// strikeout
\us#
// underline + strikeout
\np#
// new page
\TL[int]
// tab length
\LD[float] // leading
\CS[float] // char spacing
\TR[float] // text rise
\TS[float] // text scaling
 

Previous topic: Alignment tags

Next topic: Special characters