property Keywords: WString; // read only
Keywords 傳回文件 Information dictionary 中的 /Keywords 條目
(PDF 1.7 規格第 14.3.3 節)。此值是由撰寫工具寫入的自由格式文字字串,
慣例上是以逗號或分號分隔的標籤清單 —
例如 "invoice; 2024; payable; vendor-acme"。PDF 未規範
分隔符號,因此應用程式必須接受產生器寫入的任何格式
(逗號、分號、換行或空格分隔)
傳回值已解碼為 UTF-16;
CJK 與其他非 ASCII 關鍵字可正確往返。當 Active 為 False、
Info dictionary 不存在,或未指定 /Keywords 時,字串為空。許多現代
撰寫工具也會把關鍵字鏡射到 XMP 中繼資料的 pdf:Keywords 或
dc:subject(RDF 字面值的 Bag);兩者並存時應該一致,
但編輯後可能產生分歧
關鍵字會由桌面搜尋索引器(Windows Explorer、Spotlight、Adobe Bridge)
與多數文件管理系統顯示。PDFium Delphi Component 僅公開 Info dictionary 的副本 —
如要透過 PDFium 的通用中繼資料存取子取得相同值,請存取
MetaText['Keywords']
var Tags: TStringList;
Tags := TStringList.Create;
try
Tags.Delimiter := ';';
Tags.StrictDelimiter := True;
Tags.DelimitedText := Pdf1.Keywords;
ListBox1.Items.Assign(Tags);
finally
Tags.Free;
end;