Solved

Problem with printing content of TImage-comp.!

Posted on 1997-08-23
2
148 Views
Last Modified: 2010-04-06
I have some problems with printing the content of my TImage-component to a printer!!
Like this:
With Printer do
BeginDoc;
Canvas.draw(20,20, Image1.Picture.Graphic);
EndDoc;

Why doesn´t it work? I get message 'Access violation' all the time!!(or something like it).
Sometimes the compiler seems to dislike the row containing :EndDoc;
Ps. I use Delphi Developer 2.0
Thanks!
Erik N
0
Comment
Question by:Erik N
2 Comments
 
LVL 3

Accepted Solution

by:
mirek071497 earned 100 total points
Comment Utility
i think so you'r canvas.draw ..... is for You'r form or other component where this function exest.

Try write

  Printer.BeginDoc;
  Printer.Canvas.Draw( 20, 20, Image1.Picture.Graphic );
  Printer.EndDoc;

I try this some minute before and all was ok.
{ of course you must have any graphic loaded to Image1 !}
0
 

Author Comment

by:Erik N
Comment Utility
Thank you Mirek for your Help!!
Erik N
0

Featured Post

Find Ransomware Secrets With All-Source Analysis

Ransomware has become a major concern for organizations; its prevalence has grown due to past successes achieved by threat actors. While each ransomware variant is different, we’ve seen some common tactics and trends used among the authors of the malware.

Join & Write a Comment

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction The parallel port is a very commonly known port, it was widely used to connect a printer to the PC, if you look at the back of your computer, for those who don't have newer computers, there will be a port with 25 pins and a small print…
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now