PDFium Component Docs

Keywords 속성

이 API 항목은 식별자, 시그니처, 코드 블록, PDF 용어를 원래 형태로 유지합니다.
컴포넌트: TPdf  ·  유닛: PDFium
Author-supplied keyword list from the document Info dictionary.

구문

property Keywords: WString; // read only

설명

Keywords는 document Information dictionary의 /Keywords entry를 반환합니다 (PDF 1.7 spec section 14.3.3). 이 값은 authoring tool이 쓴 자유 형식 text string이며, 관례적으로 comma 또는 semicolon으로 구분된 tag 목록입니다 — 예: "invoice; 2024; payable; vendor-acme" PDF는 delimiter를 지정하지 않으므로 application은 producer가 쓴 형식(comma, semicolon, line break, space-separated)을 모두 받아들여야 합니다

반환값은 UTF-16으로 디코딩되므로 CJK와 다른 비 ASCII keywords도 올바르게 round-trip됩니다 ActiveFalse이거나, Info dictionary가 없거나, /Keywords가 지정되지 않았으면 문자열은 비어 있습니다. 많은 현대 authoring tool은 keywords를 pdf:Keywords 또는 dc:subject(RDF literal의 Bag) 아래의 XMP metadata에도 반영합니다. 둘 다 있으면 서로 일치해야 하지만 편집 후 달라질 수 있습니다

Keywords는 Windows Explorer, Spotlight, Adobe Bridge 같은 desktop search indexer와 대부분의 document-management system에 노출됩니다. PDFiumPas는 Info dictionary 사본만 노출합니다 — 같은 값은 PDFium의 generic metadata accessor를 통해 MetaText['Keywords']로 접근하세요

비고

예제

var Tags: TStringList;
Tags := TStringList.Create;
try
  Tags.Delimiter := ';';
  Tags.StrictDelimiter := True;
  Tags.DelimitedText := Pdf1.Keywords;
  ListBox1.Items.Assign(Tags);
finally
  Tags.Free;
end;

참고 항목

Subject, Title, Author, MetaText