program NotEmbeddedFontsExample;

{$APPTYPE CONSOLE}

uses

SysUtils, Graphics, Classes, HPDFDoc;

 

var

  HPDF: THotPDF;

 

begin

HPDF:= THotPDF.Create( nil );

try

HPDF.AutoLaunch := true; // سيتم عرض ملف PDF تلقائيًا

   HPDF.FileName := 'NotEmbeddedFontsExample.pdf';           

HPDF.FontEmbedding := true; // دمج الخطوط افتراضيًا

HPDF.NotEmbeddedFonts.Add( 'Arial' ); // لن يتم دمج الخط Arial

HPDF.BeginDoc; // إنشاء ملف PDF

HPDF.CurrentPage.SetFont( 'Arial', [], 12 ); // يظل هذا الخط خارجيًا

HPDF.CurrentPage.TextOut(10, 10, 0, 'Arial is excluded from embedding'); // طباعة النص

HPDF.EndDoc; // إغلاق ملف PDF

finally

     HPDF.Free;

end;

end.