|
Document의 IndirectObjects table에 indirect PDF object로 등록되는 fresh empty THPDFDictionaryObject를 allocate합니다. "N G R" indirect reference로 serialize되어야 하는 custom font / color / OCG / Function dict를 build하는 caller는 반환된 dict를 채우고 existing THPDFDictionaryObject를 받는 API에 전달합니다. 이는 오래된 protected CreateIndirectDictionary helper의 public-API form입니다
Delphi 구문:
function CreateIndirectFontDict: THPDFDictionaryObject;
C++ 구문:
THPDFDictionaryObject* CreateIndirectFontDict();
설명
반환된 dict는 empty 상태(no entries)로 시작합니다. Caller는 AddNameValue, AddStringValue, AddNumericValue, AddValue 등으로 entry를 추가합니다. Dict는 document가 소유하므로 수동으로 free하지 마십시오. 이 method는 SetFormUnicodeFontDict와 함께 쓰는 주 용도 때문에 FontDict라는 이름을 갖지만, 반환된 dict에는 font-specific semantic이 없으며 caller가 필요한 어떤 PDF dictionary content도 담을 수 있습니다
반환 값: 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
|