/Subject entry from the PDF document information dictionary.property Subject: WString; // read only
Subject returns the document's /Subject info-dictionary
entry — a short, free-form description of what the document is
about. The property delegates to
MetaText['Subject'], which
invokes PDFium's FPDF_GetMetaText for that key.
The field is defined in ISO 32000-1 § 14.3.3 alongside
/Title, /Author, and /Keywords.
When the document has no /Subject entry, when it is not
yet loaded, or when the trailer's /Info reference is missing
altogether, the property returns an empty WString. No
exception is raised.
Conceptually /Subject answers "what is this
document?" while /Title answers "what is this
document named?". In practice many producers leave Subject blank,
so treat it as optional supplementary text rather than a required field.
True
for a meaningful (non-empty) result; on an inactive component the
property returns an empty string without raising.WString contains usable Unicode regardless of
the underlying byte form.dc:description property in the XMP
metadata stream. PDF/A documents are required to keep both
representations in sync.
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;