/Subject 条目的值property Subject: WString; // read only
Subject 返回文档信息字典中的 /Subject 条目,也就是一段简短的、自由格式的说明,用来描述文档在讲什么。此属性会委托给 MetaText['Subject'],后者会针对该键调用 PDFium 的 FPDF_GetMetaText。该字段与 /Title、/Author 和 /Keywords 一起定义在 ISO 32000-1 § 14.3.3 中
当文档没有 /Subject 条目、尚未加载,或者尾部的 /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;