THPDFDocOutlineObject Class

InizioPrecedenteSuccessivo

THPDFDocOutlineObject fornisce un oggetto elemento outline per il documento PDF

Unità

HPDFDoc.pas

Descrizione

Usa THPDFDocOutlineObject come oggetto voce di outline per creare, gestire e spostare gli outline

Usa AddChild per accodare una voce di outline figlia, oppure AddChildFirst quando il nuovo figlio deve diventare la prima voce sotto il suo padre

Example d’uso:

program Outlines;

{$APPTYPE CONSOLE}

uses

SysUtils,

Graphics,

Classes,

HPDFDoc;

var

  HPDF: THotPDF;

  OutlineRoot: THPDFDocOutlineObject;

  CurrnetOutline: THPDFDocOutlineObject;

begin

  HPDF:= THotPDF.Create(nil);

try

   HPDF.AutoLaunch := true;             // PDF file will be shown automatically

   HPDF.FileName := 'Outlines.pdf';  

   HPDF.BeginDoc( true );                   // Create PDF file with outlines

   OutlineRoot := HPDF.OutlineRoot;      // Get Outlines Root

   CurrnetOutline := OutlineRoot.AddChild( 'Page ' + IntToStr(I - 1) );  // Aggiunge un blocco Outline collegato a 0,0 nella pagina corrente

   HPDF.EndDoc;                                                                  // Close PDF file

finally

     HPDF.Free;

end;

end.