Board index » delphi » Printing Bitmaps etc.

Printing Bitmaps etc.

My application loads a Timage from a file and tries to print it.
I have added a second image on the form to see that my copyrects etc are ok.
Everything works fine except that the copyrects to the printer canvas don't
show anything. it it always blank !
 

Re:Printing Bitmaps etc.


Quote
"Ian MacKay" <i...@denmansoft.com> wrote in message

news:88vi85$5rt5@bornews.borland.com...

Quote
> My application loads a Timage from a file and tries to print it.
> I have added a second image on the form to see that my copyrects etc are
ok.
> Everything works fine except that the copyrects to the printer canvas
don't
> show anything. it it always blank !

You really don't want to use CopyRect, StretchDraw or Draw to print a bitmap
on  the Printer.Canvas.  The best free solution is to use StretchDIBits,
which is
described in Item #1 at
http://www.efg2.com/Lab/Library/Delphi/Printing

Also take a look at a comparison of these methods to print a bitmap at
http://www.efg2.com/Lab/OtherProjects/PrinterDemo1.htm

A better solution will cost you some bucks.  Take a look at Joe Hecht's
TExcellentImagePrinter at
http://home1.gte.net/joehecht/prndib.htm

--
efg

Earl F. Glynn     E-Mail:  EarlGl...@att.net
Overland Park, KS  USA

efg's Computer Lab:  http://www.efg2.com/Lab

Other Threads