THPDFPage.TextOut Method

 

THPDFPage.TextOut

THPDFPage

 

Top  Previous  Next

Prints text using the currently selected font.

 

Delphi syntax:

procedure TextOut ( X, Y: Single; Angle: Extended; Text: AnsiString);

 

C++ syntax:

void __fastcall PrintText ( float X, float Y, Extended Angle, AnsiString Text);

 

Description:

This procedure prints a text line Text from point X, Y using orientation Angle in degrees.

 

For embedded Unicode-capable fonts, the current implementation resolves glyph IDs and widths from the active font before writing the PDF text operators. This improves consistency when the same document is viewed in different PDF readers.

 

If you are validating actual font output, call SetFont for the target face first and use THotPDF.FontEmbedding = true with THotPDF.StandardFontEmulation = false.

 

Code Example

HPDF.FontEmbedding := true;
HPDF.StandardFontEmulation := false;
HPDF.CurrentPage.SetFont( 'Calibri', [], 12 );
HPDF.CurrentPage.TextOut( 150, 200, 0, 'Using the TextOut method' );

 

See also: SetFont, UnicodeTextOut.