/Subject 条目的值property Subject: WString; // read only
Subject 返回文档的 /Subject 信息字典
条目 — 对文档内容的简短自由格式描述。
该属性委托给
MetaText['Subject'],后者
为该键调用 PDFium 的 FPDF_GetMetaText。
该字段在 ISO 32000-1 § 14.3.3 中与
/Title、/Author 和 /Keywords 一起定义
当文档没有 /Subject 条目、尚未
加载或尾部的 /Info 引用完全缺失时,
该属性返回空的 WString。不抛出异常
概念上 /Subject 回答"这个文档是什么?"
而 /Title 回答"这个文档叫什么?"。
实际上许多生成器将 Subject 留空,
因此将其视为可选补充文本而非必填字段
True
才能获得有意义(非空)的结果;在未激活的组件上,
该属性返回空字符串而不抛出异常WString 包含可用的 Unicode,无论
底层字节形式如何dc: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;