|
Registers a symbolic destination in the Catalog /Names /Dests name tree (ISO 32000-1 §12.3.2.3). GoTo / GoToR actions and outline /Dest entries can then reference the destination by name instead of hard-coding page numbers, keeping cross-references stable across page insertion / deletion / reorder.
Delphi syntax:
procedure RegisterNamedDestination(const Name: AnsiString; PageIndex: Integer; FitMode: THPDFDestinationFitMode = dfmFit; Left, Top, Right, Bottom, Zoom: Single = 0);
Parameters
Name is the unique name-tree key (case-sensitive). PageIndex is 0-based and must point at a page that has already been created (BeginDoc creates page 0; AddPage adds 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
No PDF/A / PDF/X gate – navigation aids are spec-allowed across all conformance profiles. PDF 1.2 minimum; auto-bumps the document Version unless StrictVersionLock is set.
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.
|