|
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. |