|
program FontEmbeddingExample; {$APPTYPE CONSOLE} uses SysUtils, Graphics, Classes, HPDFDoc;
var HPDF: THotPDF;
begin HPDF:= THotPDF.Create( nil ); try HPDF.AutoLaunch := true; // PDF 파일이 자동으로 표시됩니다 HPDF.FileName := 'FontEmbeddingExample.pdf'; HPDF.FontEmbedding := true; // Fonts will be embedded HPDF.StandardFontEmulation := false; // Use the actual installed font metrics HPDF.BeginDoc; // PDF 파일 생성 HPDF.CurrentPage.SetFont( 'Calibri', [], 12 ); // Select the target font HPDF.CurrentPage.TextOut(10, 10, 0, 'Embedded font output sample'); // 텍스트 인쇄 HPDF.EndDoc; // PDF 파일 닫기 finally HPDF.Free; end; end. |