PDFium Delphi Component Docs

Destination 속성

컴포넌트: TPdf  ·  유닛: PDFium
지정한 0 기반 index의 named destination에 대한 TDestination record를 반환합니다. named destination은 PDF 12.3.2절에서 설명하는 문서 catalog의 Dests / Names tree 아래에 정의된 간접 target입니다

Syntax

property Destination[Index: Integer]: TDestination; // read only

Description

named destination은 PDF 문서 catalog에 저장되어 구체적인 페이지-위치-확대 배율 조합으로 해석되는 상징적인 이름입니다(예: "chap5.fig3"). 아웃라인, 링크 주석, 외부 문서가 페이지 좌표를 하드코딩하는 대신 안정적인 이름으로 대상을 참조할 수 있게 해 주므로, 인바운드 링크를 깨뜨리지 않고도 문서를 재조판할 수 있습니다

PDFium Delphi Component는 예전 방식의 /Dests 딕셔너리와 최신 방식의 /Names /Dests 이름 트리를 하나의 0 기반 목록으로 펼칩니다. Destination[Index]는 destination 이름, 대상 페이지 번호(1 기반), 뷰 좌표(X, Y), 확대 배율, 그리고 각 구성 요소를 작성자가 명시적으로 설정했는지 알려 주는 Boolean 플래그를 담은 TDestination 레코드를 반환합니다

named destination 총 개수는 DestinationCount로 얻고 Destination[I]로 순회하며, 대상 이름을 이미 알고 있다면 DestinationByName을 사용하세요

Parameters

IndexInteger. 펼쳐진 named destination 목록에서의 0 기반 위치입니다. [0, DestinationCount - 1] 범위 안이어야 하며, 범위를 벗어난 인덱스는 Handle = nil인 0으로 채워진 레코드를 반환합니다

Remarks

Example

var
  I: Integer;
  Dest: TDestination;
begin
  Pdf1.LoadFromFile('manual.pdf');
  Memo1.Lines.Add(Format('%d named destinations:', [Pdf1.DestinationCount]));
  for I := 0 to Pdf1.DestinationCount - 1 do
  begin
    Dest := Pdf1.Destination[I];
    Memo1.Lines.Add(Format('%s -> page %d (X=%.1f Y=%.1f Zoom=%.2f)',
      [Dest.Name, Dest.PageNumber, Dest.X, Dest.Y, Dest.Zoom]));
  end;
  // Navigate to the first destination
  if Pdf1.DestinationCount > 0 then
    Pdf1.PageNumber := Pdf1.Destination[0].PageNumber;
end;

See Also

DestinationCount, DestinationByName, PageNumber, Bookmark, LinkAnnotation