|
Catalog의 /Names /Dests name tree(ISO 32000-1 §12.3.2.3)에 symbolic destination을 등록합니다. 그러면 GoTo / GoToR 액션과 아웃라인의 /Dest 항목이 페이지 번호를 하드코딩하지 않고 이름으로 destination을 참조할 수 있어, 페이지를 삽입·삭제·재정렬해도 상호 참조가 안정적으로 유지됩니다.
Delphi syntax:
procedure RegisterNamedDestination(const Name: AnsiString; PageIndex: Integer; FitMode: THPDFDestinationFitMode = dfmFit; Left, Top, Right, Bottom, Zoom: Single = 0);
Parameters
Name은 name tree에서 고유한 키입니다(대소문자 구분). PageIndex는 0 기반이며, 이미 생성된 페이지를 가리켜야 합니다(BeginDoc이 페이지 0을 만들고, AddPage가 페이지 N을 추가합니다).
FitMode selects the destination shape per Table 151:
dfmFit — [page /Fit] (whole page)
dfmFitH — [page /FitH top] (uses Top)
dfmFitV — [page /FitV left] (uses Left)
dfmFitR — [page /FitR llx lly urx ury] — HotPDF reorders parameters as Left, Bottom, Right, Top
dfmFitB — [page /FitB] (PDF 1.1, fit bounding box)
dfmFitBH — [page /FitBH top] (PDF 1.1)
dfmFitBV — [page /FitBV left] (PDF 1.1)
dfmXYZ — [page /XYZ left top zoom] (zero=inherit)
Compliance
PDF/A / PDF/X 게이트는 없습니다 – 내비게이션 보조 기능은 모든 conformance 프로필에서 사양상 허용됩니다. 최소 PDF 1.2가 필요하며, StrictVersionLock을 설정하지 않으면 문서 Version이 자동으로 상향됩니다.
Example
PDF := THotPDF.Create(nil);
PDF.FileName := 'manual.pdf';
PDF.BeginDoc;
PDF.AddPage;
PDF.AddPage;
PDF.RegisterNamedDestination('Chapter1', 0, dfmFit);
PDF.RegisterNamedDestination('Chapter2', 1, dfmFitH, 0, 500);
PDF.RegisterNamedDestination('FAQTop', 2, dfmXYZ, 100, 200, 0, 0, 1.5);
PDF.EndDoc;
Availability
HotPDF v2.119.17.
|