/Title entry from the PDF document information dictionary.property Title: WString; // read only
Title は文書で宣言されたタイトルを返します — Acrobat がアプリケーションタイトルバーに表示するものと同じ文字列です。"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
/Titledocument information dictionary のエントリです (ISO 32000-1 § 14.3.3)
エントリが欠落している場合、またはコンポーネントが非アクティブな場合、このプロパティは空のWStringを返します。タイトルは意図的にファイルのベース名とは区別されます。新しく作成された PDF をquarterly-2026.pdf may legitimately advertise itself as
"Q1 2026 Financial Review" via the /Title entry.
このプロパティは読み取り専用です。作成時にタイトルを設定するには PDFium のFPDF_SetMetaText using the
Document handle, or by writing an XMP
metadata stream (dc:title).
Trueで空でない結果を確認してください。このプロパティは非アクティブ時にも安全に呼び出せ、単に空文字列を返しますWString 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-trip.Title = ''を「無題」として扱い、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));