|
Καταχωρεί symbolic destination στο Catalog /Names /Dests name tree (ISO 32000-1 §12.3.2.3). GoTo / GoToR actions και outline /Dest entries μπορούν έπειτα να αναφέρονται στο destination με όνομα αντί για hard-coded page numbers, διατηρώντας σταθερά τα cross-references μετά από page insertion / deletion / reorder
Delphi syntax:
procedure RegisterNamedDestination(const Name: AnsiString; PageIndex: Integer; FitMode: THPDFDestinationFitMode = dfmFit; Left, Top, Right, Bottom, Zoom: Single = 0);
Παράμετροι
Το Name είναι το μοναδικό name-tree key (case-sensitive). Το PageIndex είναι 0-based και πρέπει να δείχνει σε σελίδα που έχει ήδη δημιουργηθεί (το BeginDoc δημιουργεί τη σελίδα 0, το AddPage προσθέτει τη σελίδα N)
Το FitMode επιλέγει το destination shape σύμφωνα με 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.
|