/Subject 項目的值property Subject: WString; // read only
Subject 傳回文件的 /Subject 資訊字典項目 — 也就是描述文件主題的簡短自由文字。此屬性委派給 MetaText['Subject'],後者會針對該鍵呼叫 PDFium 的 FPDF_GetMetaText。此欄位定義於 ISO 32000-1 § 14.3.3,與 /Title、/Author 和 /Keywords 並列
當文件沒有 /Subject 項目、文件尚未載入,或 trailer 的 /Info 參考整個缺失時,此屬性傳回空的 WString。不會引發例外
概念上,/Subject 回答的是「這份文件是關於什麼?」,而 /Title 回答的是「這份文件叫什麼名稱?」。實務上許多產生器會將 Subject 留白,因此請將它視為選用的補充文字,而非必要欄位
True;在未啟用的元件上,此屬性傳回空字串而不會引發例外WString 都包含可用的 Unicodedc:description 屬性。PDF/A 文件必須保持兩種表示同步
procedure TForm1.DumpMetadataToGrid;
begin
Pdf1.Active := True;
StringGrid1.Cells[0, 0] := 'Field';
StringGrid1.Cells[1, 0] := 'Value';
StringGrid1.Cells[0, 1] := 'Title';
StringGrid1.Cells[1, 1] := Pdf1.Title;
StringGrid1.Cells[0, 2] := 'Subject';
StringGrid1.Cells[1, 2] := Pdf1.Subject;
StringGrid1.Cells[0, 3] := 'Author';
StringGrid1.Cells[1, 3] := Pdf1.Author;
end;