THotPDF.RegisterNamedDestination

THotPDF

 

نظرة عامة

/Names /Dests (ISO 32000-1 §12.3.2.3). وإجراءات GoTo / GoToR وقيم المخطط /Destيسجل وجهة رمزية في Catalog /Names /Dests name tree (ISO 32000-1 §12.3.2.3). يمكن لأفعال GoTo / GoToR ومدخلات outline /Dest بعد ذلك الإشارة إلى الوجهة بالاسم بدل تثبيت أرقام الصفحات، مما يحافظ على cross-references مستقرة عند إدراج الصفحات أو حذفها أو إعادة ترتيبها

 

Delphi syntax:

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

 

المعلمات

Name هو مفتاح شجرة الأسماء الفريد (حساس لحالة الأحرف). أما PageIndexName هو مفتاح name-tree الفريد والحساس لحالة الأحرف. ‏PageIndex ذو أساس صفري ويجب أن يشير إلى صفحة أنشئت مسبقًا؛ 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

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.

 

مثال

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.