Board index » delphi » printing canvas problem?

printing canvas problem?

Hallo,

assignprn(printfile);
rewrite(printfile);
try
printer.canvas.font.size:=12;
printer.canvas.font.name:='courier';
{something to print}
printer.canvas.font.size:=9;
printer.canvas.font.name:='courier new';
{something to print}
printer.canvas.font.size:=12;
printer.canvas.font.name:='courier new';
printer.canvas.font.style:=[fsbold] ;
{something to print}
finally
system.closefile(printfile);
end;

After this printing, and no exit the program,
and again printing then the layout style is
wrong. When exit the program, all is OK
for 1 page.
Then problem is fsbold !
Who can I set the canvas.style back to
original when I start the first time ??

Thanks for helping

herman....@glo.bemailTo  remove mailTo

 

Re:printing canvas problem?


This line will set your font style to normal.

           printer.canvas.font.style:=[] ;

Other Threads