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'); // Print text

HPDF.EndDoc;                                                       // بستن فایل PDF

finally

HPDF.Free;

end;

end.