property Destination[Index: Integer]: TDestination; // read only
Adlandırılmış hedef, PDF document catalog'ında saklanan ve somut bir sayfa-konum-zoom üçlüsüne çözülen simgesel bir addır (örneğin "chap5.fig3"). Outline'lar, link annotation'ları ve harici dokümanlar bir hedefi sabit kodlanmış sayfa koordinatları yerine kararlı bir adla referans gösterir; böylece doküman, gelen bağlantıları bozmadan yeniden sayfalanabilir
PDFium Delphi Component flattens both legacy /Dests dictionaries and modern /Names /Dests name trees into a single zero-based list. Destination[Index] returns a TDestination record carrying the destination name, target page number (1-based), view coordinates (X, Y), zoom factor, and Boolean flags indicating whether each component was explicitly set by the author.
Use DestinationCount to obtain the total number of named destinations, iterate with Destination[I], and use DestinationByName when you already know the target name.
| Index | Integer. Zero-based position in the flattened named-destinations list. Must be in [0, DestinationCount - 1]. An out-of-range index returns a zero-filled record with Handle = nil. |
HasX, HasY ve HasZoom, "sayfaya sığdır" / "genişliğe sığdır" hedeflerini (bu bileşenlerin yokluğu) açık XYZ hedeflerinden ayırır. Yalnızca var olarak işaretlenmiş bileşenleri uygulayınViewMode, XYZ, Fit, FitH, FitV, FitR, FitB, FitBH ve FitBV hedeflerini ayırt eder; böylece çağıranların PDFium sabitlerini çözmesi gerekmezViewParameterCount, sabit dört öğeli ViewParameters dizisindeki geçerli girdilerin sayısını verirHandle'ı test edin
var
I: Integer;
Dest: TDestination;
begin
Pdf1.LoadFromFile('manual.pdf');
Memo1.Lines.Add(Format('%d named destinations:', [Pdf1.DestinationCount]));
for I := 0 to Pdf1.DestinationCount - 1 do
begin
Dest := Pdf1.Destination[I];
Memo1.Lines.Add(Format('%s -> page %d (X=%.1f Y=%.1f Zoom=%.2f)',
[Dest.Name, Dest.PageNumber, Dest.X, Dest.Y, Dest.Zoom]));
end;
// Navigate to the first destination
if Pdf1.DestinationCount > 0 then
Pdf1.PageNumber := Pdf1.Destination[0].PageNumber;
end;