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' ); // Arialia ei upoteta

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'); // Tulosta teksti

HPDF.EndDoc; // Close PDF file

finally

HPDF.Free;

end;

end