THotPDF.RegisterNamedDestination

THotPDF

 

概要

Catalog /Names /Dests name tree (ISO 32000-1 §12.3.2.3) に symbolic destination を登録します。GoTo / GoToR actions と outline /Dest entries は、page numbers を hard-code する代わりに destination を name で参照できるため、page insertion / deletion / reorder の後でも cross-references が stable に保たれます

 

Delphi syntax:

procedure RegisterNamedDestination(const Name: AnsiString; PageIndex: Integer; FitMode: THPDFDestinationFitMode = dfmFit; Left, Top, Right, Bottom, Zoom: Single = 0);

 

パラメータ

Name は unique な name-tree key (case-sensitive) です。PageIndex は 0-based で、すでに作成済みの page を指す必要があります (BeginDoc は page 0 を作成し、AddPage は page 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 のゲートはありません – ナビゲーション補助は、すべての適合プロファイルで規格上許可されています。PDF 1.2 以上が必要で、StrictVersionLock が設定されていない限り、ドキュメントの Version は自動で引き上げられます

 

例

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.