PDFium Delphi Component Docs

Title 속성

컴포넌트: TPdf  ·  유닛: PDFium
PDF document information dictionary의 /Title 항목 값을 반환합니다

Syntax

property Title: WString; // read only

Description

Title는 문서가 선언한 제목을 반환합니다 — "Display document title in title bar" viewer preference가 켜져 있을 때 Acrobat이 애플리케이션 제목 표시줄에 보여 주는 바로 그 문자열이고, 값은 MetaText['Title']로 가져오며, MetaText는 문서 정보 딕셔너리의 /Title 항목에 대해 PDFium의 FPDF_GetMetaText를 호출합니다 (ISO 32000-1 § 14.3.3)

항목이 없거나 컴포넌트가 비활성 상태면 이 프로퍼티는 빈 WString을 반환합니다. 제목은 의도적으로 파일 기본 이름과 구별됩니다. 새로 작성해 quarterly-2026.pdf로 저장한 PDF가 /Title 항목을 통해 정당하게 "Q1 2026 Financial Review"라고 자신을 광고할 수 있습니다

이 프로퍼티는 읽기 전용입니다. 생성 시점에 제목을 정하려면 Document 핸들로 PDFium의 FPDF_SetMetaText를 쓰거나 XMP 메타데이터 스트림(dc:title)을 기록하세요

Remarks

Example

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));

See Also

Author, Subject, Keywords, MetaText, CreationDate, Active