FitTextBox
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 TQuickPDF0813.FitTextBox(Left, Top, Width, Height: Double;
Text: WideString; Options: Integer): Integer;
ActiveX
Function QuickPDF0813.PDFLibrary::FitTextBox(Left As Double, Top As Double,
Width As Double, Height As Double, Text As String,
Options As Long) As Long
DLL
int QuickPDFFitTextBox(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 |
| Text | The text to display in the box |
| 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 |
Return values
| 0 | The Options specified were out of range |
| 1 | The text was drawn successfully |