I'm printing a form several times, running a loop and a procedure that uses the printer.begindoc and printer.enddoc method. I paint on the canvas using the textout procedure.
Here is my question: what is the most efficient way of clearing the canvas in between pages? Attempting to free and recreate the canvas causes an access error.
Here's a code chunk: the procedure writes sundry things to the canvas:
if PrintDialog1.Execute then
with printer do
for i := 0 to 1 do begin
main.caption := 'Printing ' + datetostr(tempdate + i);
canvas.font.size := 12;
fillshift(tempdate + i,week,1 + i);