program NotEmbeddedFontsExample;

{$APPTYPE CONSOLE}

uses

SysUtils, Graphics, Classes, HPDFDoc;

 

var

  HPDF: THotPDF;

 

begin

HPDF:= THotPDF.Create( nil );

try

   HPDF.AutoLaunch := true;                                        // PDF file will be shown automatically

   HPDF.FileName := 'NotEmbeddedFontsExample.pdf';           

   HPDF.FontEmbedding := true;                                    // Embed fonts by default

   HPDF.NotEmbeddedFonts.Add( 'Arial' );                       // Arial will not be embedded

   HPDF.BeginDoc;                                                     // Create PDF file

   HPDF.CurrentPage.SetFont( 'Arial', [], 12 );                     // This font stays external

   HPDF.CurrentPage.TextOut(10, 10, 0, 'Arial is excluded from embedding'); // Print text

   HPDF.EndDoc;                                                       // Close PDF file

finally

     HPDF.Free;

end;

end.