THotPDF.GetLoadedFontNames Method
Gets the list of font names used on the specified page of the loaded PDF document
Declaration
function GetLoadedFontNames(PageIndex: Integer): THPDFAnsiStringArray;
Unit
HPDFDoc
Parameters
| Name | Purpose |
|---|---|
PageIndex | Zero-based page index, specifying the target page to query the font name |
Return value
返回 THPDFAnsiStringArray 类型的字符串数组,每个元素为该页面资源字典中引用的字体名称;若该页无字体资源则返回空数组
Usage notes
- 返回的字体名称为 PDF 内部资源名称,与操作系统字体名称可能存在差异,如子集嵌入字体会带有前缀标识
- 若需统计整个文档的字体总数,请使用
GetLoadedTotalFontCount方法 - The same font may appear repeatedly on multiple pages; the results must be deduplicated to obtain a document-level unique font list