DynaPDF Manual - Page 826

Previous Page 825   Index   Next Page 827

Function Reference
Page 826 of 839
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
\dl#
// Double underline
\st#
// Strikeout
\us#
// Underline + strikeout
\np#
// New page
\BM[char*]
// Add a bookmark
\CS[float]
// Char spacing
\EH#
// End highlight text
\EK#
// End link
 

Previous topic: Text formatting, Alignment tags

Next topic: Special characters