Hi,
hope i am not too late.
I would suggest you use the Writeln method with some formatting of your own.
of course you can change how the fonts look by saying for example
printer.Canvas.Font.Name := 'courier new';
printer.Canvas.Font.Size := 14;
printer.Canvas.Font.Style := [fsBold];
writeln(F,'Hello');
........etc
Next step..you want to print a header....
of course printing on first page wont be a problem, but printing on remaining pages will be.
so I would suggest you print a certain number of lines on each page and then say
PRINTER.NEWPAGE;
to force printing on a new page.
The last issue is printing a Logo.
here is the procedure
procedure Printlogo;
var
Info: PBitmapInfo;
InfoSize: DWORD;
Image: Pointer;
ImageSize: DWORD;
Bits: HBITMAP;
DIBWidth, DIBHeight: LongInt;
begin
Printer.BeginDoc;
try
Printer.Canvas.Lock;
try
{ Paint bitmap to the printer }
with Printer do
begin
Bits := MyBmp1.Handle;
GetDIBSizes(Bits, InfoSize, ImageSize);
Info := AllocMem(InfoSize);
try
Image := AllocMem(ImageSize);
try
GetDIB(Bits, 0, Info^, Image^);
with Info^.bmiHeader do
begin
DIBWidth := biWidth;
DIBHeight := biHeight;
end;
StretchDIBits(Canvas.Handle, 0, 0, DIBWidth*6, DIBHeight*6, 0, 0,
DIBWidth, DIBHeight, Image, Info^, DIB_RGB_COLORS, SRCCOPY);
finally
FreeMem(Image, ImageSize);
end;
finally
FreeMem(Info, InfoSize);
end;
end;
finally
Printer.Canvas.Unlock;
end;
finally
Printer.EndDoc;
end;
end;
Hope This helps...........