Placeholder for topic body

program Outlines;

{$APPTYPE CONSOLE}

uses

SysUtils,

Graphics,

Classes,

HPDFDoc;

 

var

I: Integer;

HPDF: THotPDF;

OutlineRoot: THPDFDocOutlineObject;

CurrnetOutline: THPDFDocOutlineObject;

 

begin

HPDF:= THotPDF.Create(nil);

try

HPDF.AutoLaunch := true;// PDF-fil vil blive vist automatisk

HPDF.FileName :='Outlines.pdf';                                    

HPDF.BeginDoc( true );// Opret PDF-fil med outlines

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

HPDF.CurrentPage.TextOut(0, 5, 0, ' Side 1 top');// Marker første side top

HPDF.CurrentPage.TextOut(0, 830, 0, ' Side 1 bund');// Marker første side bund

   forI := 2 to 100 do

  begin

CurrnetOutline := OutlineRoot.AddChild('Side '+ IntToStr(I - 1) );// Tilføj Outline-blok forbundet til 0,0 på aktuel side

      CurrnetOutline.Opened := true;// Denne outline er åbnet

CurrnetOutline.AddChild('Top ' );                                                         // Tilføj Outline forbundet til 0,0 på aktuel side

CurrnetOutline.AddChild('Bund ', 0, 800 );                                        // Tilføj Outline forbundet til 0,800 på aktuel side

HPDF.AddPage;// TILFØJ næste side

HPDF.CurrentPage.TextOut( 0, 5, 0,' Side ' + IntToStr(I) +' top' );         // Marker næste side top

HPDF.CurrentPage.TextOut( 0, 830, 0,' Side ' + IntToStr(I) +' bottom' ); // Marker næste side bund

  end;

CurrnetOutline := OutlineRoot.AddChild('Side 10 ' );  // TILFØJ sidste side

CurrnetOutline.AddChild( 'Top ' );                                // Tilføj Outline forbundet til 0,0 på sidste side

CurrnetOutline.AddChild('Bund ', 0, 830 );                // Tilføj Outline forbundet til 0,830 på sidste side

HPDF.EndDoc;// Luk PDF-fil

finally

HPDF.Free;

end;

end