You are not logged in.
Pages: 1
Hello,
first I found your PDF engine via forum search and .... it's great. You do a great job. Thank you.
Now my question:
Is it possible to place a picture into header or footer section?
Is there anywhere a piece of code?
Thanks
Josef
Offline
You may have made a quick search in this forum... this question was asked just a few days ago...
See http://synopse.info/forum/viewtopic.php?id=598
If you want it at the "raw" SynPDF level (not using TGdiPages class), you have to do it by hand, drawing it on every page.
Thanks for the interest!
Offline
Thanks for answer.
But till now I found no way to place my picture in the headsection.
Do you have some code for my click procedure to realize my picture.
Here my click procedure:
procedure TfUebersichtzuchtkalender.BTzuchtkaldruckClick(Sender: TObject);
var bmp:TBitmap;
begin
with TGDIPages.Create(self) do
try
bmp:=tBitmap.Create;
bmp.LoadFromFile('C:\Bauplan\auftrag.bmp');
// the title of the report
Caption := 'Zuchtkalender';
// now we add some content to the report
BeginDoc;
.....
thanks
Josef
Offline
You have to set OnStartPageHeader and OnEndPageHeader event handlers of the TGDIPages instance with your own methods.
procedure MyReportHeader(Sender: TObject);
var Report: TGdiPages;
begin
Report := Sender as TGdiPages;
Report.DrawBMP(....);
end;
......
with TGdiPages.Create(self) do
try
OnStartPageHeader := MyReportHeader;
....
Hope it helps.
Offline
Hello,
thanks for the example code. Now it works.
I have had problems with the correct sender declaration:
procedure MyReportHeader(Sender: TObject); //I thought the right one is TGdiPages
Thanks
Josef
Offline
Pages: 1