|
מקצה THPDFDictionaryObject חדש וריק הרשום כאובייקט PDF indirect בטבלת IndirectObjects של המסמך. קוראים שבונים מילוני font / color / OCG / Function מותאמים ממלאים את המילון המוחזר ומעבירים אותו לכל API שמקבל THPDFDictionaryObject קיים
Delphi syntax:
function CreateIndirectFontDict: THPDFDictionaryObject;
C++ syntax:
THPDFDictionaryObject* CreateIndirectFontDict();
תיאור
המילון המוחזר מתחיל ריק, ללא entries. הקורא מוסיף entries דרך AddNameValue, AddStringValue, AddNumericValue, AddValue ועוד. המילון שייך למסמך; אין לשחרר אותו ידנית. אף שהמתודה נקראת FontDict, אין למילון semantics ייחודיות לפונט והוא יכול לשאת כל תוכן PDF dictionary שהקורא צריך
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
|