program ShowText;

{$APPTYPE CONSOLE}

uses

   SysUtils, Graphics, Classes, HPDFDoc;

 

var

   HPDF: THotPDF;

 

begin

   HPDF := THotPDF.Create( nil );

   try

       HPDF.AutoLaunch := true;                  // Soubor PDF se zobrazí automaticky

       HPDF.FileName := 'ShowText.pdf';         

 

       HPDF.BeginDoc;                                 // Vytvořit soubor PDF

 

       HPDF.CurrentPage.SetFont( 'Times New Roman', [], 12 );  // Nastavit aktuální písmo

       HPDF.CurrentPage.BeginText;                              // Otevřít textový blok

       HPDF.CurrentPage.MoveTextPoint( 20, 20 );      // Přesunout textový bod na 20, 20

       HPDF.CurrentPage.ShowText( 'This' );                 // Zobrazit text

       HPDF.CurrentPage.SetTextRise( -5 );                  // Nastavit posun textu

       HPDF.CurrentPage.ShowText( 'text' );                  // Zobrazit text

       HPDF.CurrentPage.SetTextRise( 5 );                   // Nastavit posun textu

       HPDF.CurrentPage.ShowText( 'moves' );             // Zobrazit text

       HPDF.CurrentPage.SetTextRise( 0 );                   // Nastavit posun textu

       HPDF.CurrentPage.ShowText( 'around' );            // Zobrazit text

       HPDF.CurrentPage.EndText;                                // Zavřít textový blok

 

       HPDF.EndDoc;                                                 // Zavřít soubor PDF

   finally

       HPDF.Free;

   end;

end.