BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Image Print Size

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics)
View previous topic :: View next topic  
Author Message
Charles Samuels
Guest





PostPosted: Tue Jun 20, 2006 11:03 pm    Post subject: Image Print Size Reply with quote



I am trying to print an image and the printed copy is about 1 1/2 inches
square. Nothing I do seems to change this size. How can I change the
printed size? In the code below Image1 is about 950 X 950.

Graphics::TBitmap *Bitmap = new Graphics::TBitmap();
Bitmap->Assign(Image1->Picture);
Printer()->BeginDoc();
try
{
Printer()->Canvas->Draw(0, 0, Bitmap);
Printer()->EndDoc();
}
catch(const Exception &)
{
Printer()->Abort();
}
Back to top
Michel Leunen
Guest





PostPosted: Tue Jun 20, 2006 11:25 pm    Post subject: Re: Image Print Size Reply with quote



Charles Samuels wrote:
Quote:
I am trying to print an image and the printed copy is about 1 1/2 inches
square. Nothing I do seems to change this size. How can I change the
printed size? In the code below Image1 is about 950 X 950.

Printer()->Canvas->Draw(0, 0, Bitmap);

Use StretchDraw() instead.

Michel
--
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
http://www.leunen.com/
----------------------------------------
Back to top
JD
Guest





PostPosted: Thu Jun 22, 2006 1:29 am    Post subject: Re: Image Print Size Reply with quote



"Charles Samuels" <chuck (AT) fairweather (DOT) com> wrote:
Quote:

I am trying to print an image [...]

Be aware that many printer have issues with there drivers and
printing images. You might get away with StretchDraw on one
printer and it fails on another. That's because while most
modern drivers do indeed support Device Dependent Bitmaps,
MicroSoft does not require it for printer driver.

If you want it to print correctly across all printers, you
need to use a Device Independent Bitmap. For example:

http://groups.google.com/group/borland.public.cppbuilder.vcl.components.using/msg/d40f4280c78e39dd?hl=en&

Note that the sample will print it so that it appears the same
size as it does on screen and that it uses a pointer of type
TBitmap. If your TImage's image is indeed a bitmap, you can
use that (TImage::Bitmap). Otherwise, you'll need to convert
it. The rest you can figure out for yourself from the sample.

~ JD
Back to top
Ron Sawyer
Guest





PostPosted: Thu Jun 22, 2006 4:37 am    Post subject: Re: Image Print Size Reply with quote

If your budget can afford it, I strongly recommend Joe Hechts printer dll.

http://www.code4sale.com/joehecht/prndib.htm

"Charles Samuels" <chuck (AT) fairweather (DOT) com> wrote in message
news:44983871$1 (AT) newsgroups (DOT) borland.com...
Quote:
I am trying to print an image and the printed copy is about 1 1/2 inches
square. Nothing I do seems to change this size. How can I change the
printed size? In the code below Image1 is about 950 X 950.

Graphics::TBitmap *Bitmap = new Graphics::TBitmap();
Bitmap->Assign(Image1->Picture);
Printer()->BeginDoc();
try
{
Printer()->Canvas->Draw(0, 0, Bitmap);
Printer()->EndDoc();
}
catch(const Exception &)
{
Printer()->Abort();
}

Back to top
JD
Guest





PostPosted: Thu Jun 22, 2006 1:53 pm    Post subject: Re: Image Print Size Reply with quote

"Ron Sawyer" <XXXRSAWYER8128XQQXX (AT) aol (DOT) com> wrote:
Quote:

If your budget can afford it, I strongly recommend Joe Hechts printer dll.

Why pay for something when there is a solution that's free?

~ JD
Back to top
Charles Samuels
Guest





PostPosted: Thu Jun 22, 2006 10:28 pm    Post subject: Re: Image Print Size Reply with quote

Thanks, It took a little doing to scale properly, but it worked.

Chuck

"Michel Leunen" <nospam (AT) noreply (DOT) please> wrote in message
news:44983d67$1 (AT) newsgroups (DOT) borland.com...
Quote:
Charles Samuels wrote:
I am trying to print an image and the printed copy is about 1 1/2 inches
square. Nothing I do seems to change this size. How can I change the
printed size? In the code below Image1 is about 950 X 950.

Printer()->Canvas->Draw(0, 0, Bitmap);

Use StretchDraw() instead.

Michel
--
----------------------------------------
Michel Leunen
mailto: see my homepage.
C++Builder, BCC5.5.1 Web site:
http://www.leunen.com/
----------------------------------------
Back to top
Joe C. Hecht
Guest





PostPosted: Mon Jun 26, 2006 8:02 pm    Post subject: Re: Image Print Size Reply with quote

Quote:
If your budget can afford it, I strongly recommend Joe Hechts printer dll.

Why pay for something when there is a solution that's free?

Because the free solutions have a reasonbly high failure rate in the deployed world.

Most of our customers used the free solutions, and bought our image printing product
only after finding this out out the hard way (unhappy customers, refunds, and a lot
of time trying all the free solutions).

Our TExcellentImagePrinter product is the defacto standard if you need reliable image prinitng.

http://www.code4sale.com/joehecht/index.htm

Joe
--
Delphi, graphics, and printing specialist available - $35/hr
http://www.code4sale.com/codeit/index.htm
Joe Hecht Associates
121 Louise Drive
Crestview, FL 32536
Back to top
JD
Guest





PostPosted: Tue Jun 27, 2006 8:10 am    Post subject: Re: Image Print Size Reply with quote

"Joe C. Hecht" <joehecht (AT) code4sale (DOT) com> wrote:
Quote:
If your budget can afford it, I strongly recommend Joe Hechts printer dll.

Why pay for something when there is a solution that's free?

Because the free solutions have a reasonbly high failure
rate in the deployed world.

That may have been true 4 or 5 years ago but no longer. Our
code prints on thousands of different printers in all kinds
of environments and not one failure has been reported.

~ JD
Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Graphics) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.