THPDFPage.TextOut

THPDFPage

 

Topo  Anterior  Próxima

Imprime texto usando a fonte atualmente selecionada.

 

Sintaxe Delphi:

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

procedure TextOut ( X, Y: Single; Angle: Extended; Text: PWORD; TextLength: Integer); overload;

 

Sintaxe C++:

void __fastcall TextOut ( float X, float Y, Extended Angle, WideString Text);

void __fastcall TextOut ( float X, float Y, Extended Angle, WORD *Text, int TextLength);

 

Description:

Este procedimento imprime uma linha de texto Text a partir do ponto X, Y usando a orientação Angle em graus. A sobrecarga PWORD imprime TextLength unidades de código UTF-16 a partir de Text.

 

Para fontes embutidas com capacidade Unicode, a implementação atual resolve IDs e larguras de glifos a partir da fonte ativa antes de gravar os operadores de texto PDF. Isso melhora a consistência quando o mesmo documento é visto em leitores PDF diferentes.

 

Se você estiver validando a saída real de fontes, chame SetFont para a face alvo primeiro e use THotPDF.FontEmbedding = true com THotPDF.StandardFontEmulation = false.

 

Exemplo de código

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.