DynaPDF Manual - Page 775

Previous Page 774   Index   Next Page 776

Function Reference
Page 775 of 787
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
\BM[char*]
// add a bookmark
\CS[float]
// char spacing
\EK#
// end link
\EL#
// end list
 

Previous topic: Text formatting, Alignment tags

Next topic: Special characters, Escape Sequences

Start Chat