How to render TPrinter.Canvas

Please discuss general Delphi programming topics here.

How to render TPrinter.Canvas

Postby Sezar » January 6th, 2009, 7:40 am

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.
Sezar
Sezar
Junior Member
Junior Member
 
Posts: 42
Joined: April 18th, 2007, 4:40 pm
Location: Mashhad,Iran

Re: How to render TPrinter.Canvas

Postby Kambiz » January 6th, 2009, 10:48 am

To copy a canvas to another canvas you can use CopyRect method of canvas. But it doesn't work for printer's canvas.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2424
Joined: March 7th, 2003, 7:10 pm

Re: How to render TPrinter.Canvas

Postby Sezar » January 9th, 2009, 4:06 am

Thanks for your answer,another solution?
Sezar
Sezar
Junior Member
Junior Member
 
Posts: 42
Joined: April 18th, 2007, 4:40 pm
Location: Mashhad,Iran

Re: How to render TPrinter.Canvas

Postby Kambiz » January 9th, 2009, 1:40 pm

First draw your print on the bitmap, and them print the bitmap.
Kambiz
User avatar
Kambiz
Administrator
Administrator
 
Posts: 2424
Joined: March 7th, 2003, 7:10 pm


Return to Delphi Programming

Who is online

Users browsing this forum: No registered users and 1 guest

cron