|
THotPDF.RegisterAcroFormFont THotPDF AcroForm
|
AddXFAPacket AcroForm 支援 SetFormUnicodeFontDict |
|
註冊額外的 Unicode (Type 0 / CID-keyed) font,以納入 AcroForm Default Resources (
Delphi 語法: FontResourceName - appearance stream /Tf operator 參照的 PDF Name。慣例:使用沒有 leading slash 的短且穩定 identifier(例如 'NotoSansArab'、'NotoSansCJK')。HotPDF 在序列化時會寫入 leading slash FontIndirectRef: THPDFObject);
說明 AcroForm widgets 會透過 AcroForm dict 上的 Default Resources (
v2.119.42 之後,呼叫端可用任意 resource names 註冊額外 Unicode fonts。每個 registered font 會在
Parameters
Typical workflow (multilingual form)
PDF.RegisterUnicodeTTF('NotoSansArab', 'NotoSansArabic-Regular.ttf'); PDF.RegisterUnicodeTTF('NotoSansJP' , 'NotoSansJP-Regular.otf'); ArabRef := PDF.CreateIndirectFontDict('NotoSansArab'); JPRef := PDF.CreateIndirectFontDict('NotoSansJP'); PDF.RegisterAcroFormFont('NotoSansArab', ArabRef); PDF.RegisterAcroFormFont('NotoSansJP' , JPRef);
現在 Arabic-content widgets 可使用
Coexistence with SetFormUnicodeFontDict 既有 single-font helper(SetFormUnicodeFontDict)仍可供只需要 AcroForm
請參閱: THotPDF.SetFormUnicodeFontDict, THotPDF.CreateIndirectFontDict, AcroForm 支援, THPDFPage.AddTextField |