/Title entry from the PDF document information dictionaryproperty Title: WString; // read only
Title returns the document's declared title — the same string
that Acrobat shows in the application title bar when the
"Display document title in title bar" viewer preference is set
The value is fetched via MetaText['Title'],
which calls PDFium's FPDF_GetMetaText against the
/Title entry of the document information dictionary
(ISO 32000-1 § 14.3.3)
If the entry is missing or the component is inactive, the property
returns an empty WString. The title is intentionally
distinct from the file's basename: a freshly authored PDF saved as
quarterly-2026.pdf may legitimately advertise itself as
"Q1 2026 Financial Review" via the /Title entry
The property is read-only. Updating or synchronizing the document title is done
by writing an XMP metadata stream (dc:title) via
SaveAsWithXmpPacket or
NormalizePdfAMetadata
True for
a non-empty result. The property is safe to call when inactive and
simply returns an empty stringWString always contains correctly decoded text
regardless of the producer/Title and the XMP dc:title to agree
If you author PDF/A documents, set the title through both surfaces and
verify after a round-tripTitle = '' as "untitled" and fall back to the file
name in your UI
function EffectiveTitle(Pdf1: TPdf; const Fallback: string): string;
begin
if not Pdf1.Active then
Pdf1.Active := True;
Result := Trim(Pdf1.Title);
if Result = '' then
Result := Fallback;
end;
// Use the document's own title for the form caption
Caption := EffectiveTitle(Pdf1, ExtractFileName(Pdf1.FileName));