|
program FontEmbeddingExample; {$APPTYPE CONSOLE} uses SysUtils, Graphics, Classes, HPDFDoc;
var HPDF: THotPDF;
begin HPDF:= THotPDF.Create( nil ); try HPDF.AutoLaunch := true; // O arquivo PDF será mostrado automaticamente HPDF.FileName := 'FontEmbeddingExample.pdf'; HPDF.FontEmbedding := true; // As fontes serão embutidas HPDF.StandardFontEmulation := false; // Usar as métricas da fonte instalada HPDF.BeginDoc; // Criar o arquivo PDF HPDF.CurrentPage.SetFont( 'Calibri', [], 12 ); // Selecionar a fonte de destino HPDF.CurrentPage.TextOut(10, 10, 0, 'Embedded font output sample'); // Imprimir o texto HPDF.EndDoc; // Fechar o arquivo PDF finally HPDF.Free; end; end. |