FitTextBox
Text, Page layout
Description
Similar to the DrawText function, but the text size is adjusted to ensure that all the text fits into the available space.
Syntax
Delphi
function TPDFlib.FitTextBox(Left, Top, Width, Height: Double; Const Text: WideString; Options: Integer): Integer;ActiveX
Function PDFlib::FitTextBox(Left As Double, Top As Double, Width As Double, Height As Double, Text As String, Options As Long) As LongDLL
int DLFitTextBox(int InstanceID, double Left, double Top, double Width, double Height, wchar_t * Text, int Options);Parameters
| Left | The horizontal co-ordinate of the left edge of the bounding box |
|---|---|
| Top | The vertical co-ordinate of the top edge of the bounding box |
| Width | The width of the bounding box |
| Height | The height of the bounding box The text to display in the box |
| Text | |
| Options | Vertical alignment: 0 = Centered 1 = Top 2 = Bottom If 100 is added to these values long words will not be split up, the font size will be reduced until the longest word fits into the available width. If 1000 is addd to these values the font size will be allowed to increase until the text fills the available area. |
Return values
| 0 | The Options specified were out of range |
|---|---|
| 1 | The text was drawn successfully |