THotPDF.CreateIndirectFontDict Method

 

THotPDF.CreateIndirectFontDict

THotPDF

 

Вгору

Allocates fresh empty THPDFDictionaryObject registered as indirect PDF object in document IndirectObjects table Callers building custom font, color, OCG or Function dicts fill returned dict and pass it to APIs accepting existing THPDFDictionaryObject

 

Delphi syntax:

function CreateIndirectFontDict: THPDFDictionaryObject;

 

C++ syntax:

THPDFDictionaryObject* CreateIndirectFontDict();

 

Опис

Returned dict starts empty Caller adds entries via AddNameValue, AddStringValue, AddNumericValue, AddValue and related helpers Dict owned by document; do not free manually Although method name mentions FontDict, returned dict can hold any PDF dictionary content

 

Return value: an empty indirect THPDFDictionaryObject.

 

Code Example

// Build a minimal Type 0 / CIDFontType2 + Identity-H font dict for
// AcroForm Tx widget AP rendering
var
  F0: THPDFDictionaryObject;
begin
  HPDF.BeginDoc;
  F0 := HPDF.CreateIndirectFontDict;
  F0.AddNameValue('Type', 'Font');
  F0.AddNameValue('Subtype', 'Type0');
  F0.AddNameValue('BaseFont', 'MyCJK');
  F0.AddNameValue('Encoding', 'Identity-H');
  // ... fill DescendantFonts / CIDSystemInfo / FontDescriptor /
  HPDF.SetFormUnicodeFontDict('F0', F0);
  HPDF.EndDoc;
end;

 

See Also

SetFormUnicodeFontDict