|
Example - Header |
Top Previous Next |
|
Delphi:
procedure TForm1.Button1Click(Sender: TObject); begin with gtPDFEngine1 do begin Page.HeaderHeight := 1; Page.FooterHeight := 1; FileName := 'C:\Header'; BeginDoc; BeginHeader; //...Set Font and Brush as required TextOut(0, 0, 'This is a sample text in header'); //...Set image properties as required DrawImage(0, 0, Image1.Picture.Graphic); EndHeader; EndDoc; end; end;
C++Builder:
void __fastcall TForm1::Button1Click(TObject *Sender) { gtPDFEngine1->FileName = "C:\\Header"; gtPDFEngine1->Page->HeaderHeight = 1; gtPDFEngine1->BeginDoc(); gtPDFEngine1->BeginHeader(); //...Set Font and Brush as required gtPDFEngine1->TextOut(0, 0, "This is a sample text in header"); //...Set image properties as required gtPDFEngine1->DrawImage(0, 0.2, Image1->Picture->Graphic); gtPDFEngine1->EndHeader(); gtPDFEngine1->EndDoc(); } |