Generic image printing?
Hi there,
I am new to image printing with RB and need to do some generic image
printing, i.e., the user will select a random image from the hard drive and
then will print it out. Images are from a scanner (saved in JPEG format)
though resolution, dpi, etc. are unknown to me.
I was thinking on a blank TppReport with a single TppImage on the header,
top-left aligned. The user would then select an image from the HD and I will
assign it to my TppImage:
ppImage1.Picture.LoadFromFile('/path/to/my_image.jpg');
I wonder if this is possible though. Would the TppImage and TppHeaderBand
automatically resize to the width and height of every different image
selected by the user? If so, what properties should I set to accomplish
this?
I would appreciate any pointers.
Thanks in advance,
-Jorge
Using RB 7.03, Delphi 7.
I am new to image printing with RB and need to do some generic image
printing, i.e., the user will select a random image from the hard drive and
then will print it out. Images are from a scanner (saved in JPEG format)
though resolution, dpi, etc. are unknown to me.
I was thinking on a blank TppReport with a single TppImage on the header,
top-left aligned. The user would then select an image from the HD and I will
assign it to my TppImage:
ppImage1.Picture.LoadFromFile('/path/to/my_image.jpg');
I wonder if this is possible though. Would the TppImage and TppHeaderBand
automatically resize to the width and height of every different image
selected by the user? If so, what properties should I set to accomplish
this?
I would appreciate any pointers.
Thanks in advance,
-Jorge
Using RB 7.03, Delphi 7.
This discussion has been closed.
Comments
1. Be sure you have the TppImage.Stretch property set to True. This can be
done using the popup menu of the TppImage, using the Delphi Object Inspector
or in code at runtime.
2. Be sure you load the image no later than the HeaderBand.BeforePrint
event to ensure that the correct image is displayed.
That should be it! Let me know if you have any other questions.
--
Thanks for supporting ReportBuilder! Please vote for ReportBuilder in the
Delphi Informant Readers Choice awards!
http://www.delphizine.com/ballot2004/
Nico Cizik
Digital Metaphors
http://www.digital-metaphors.com