Page 1 of 1

How to render TPrinter.Canvas

PostPosted: January 6th, 2009, 7:40 am
by Sezar
Hello!
I want to save printer.canvas into an image file before print.
how can I render TPrinter.Canvas into a TBitmap?
I try assign method,but it raises an exception.

Re: How to render TPrinter.Canvas

PostPosted: January 6th, 2009, 10:48 am
by Kambiz
To copy a canvas to another canvas you can use CopyRect method of canvas. But it doesn't work for printer's canvas.

Re: How to render TPrinter.Canvas

PostPosted: January 9th, 2009, 4:06 am
by Sezar
Thanks for your answer,another solution?

Re: How to render TPrinter.Canvas

PostPosted: January 9th, 2009, 1:40 pm
by Kambiz
First draw your print on the bitmap, and them print the bitmap.