Solved

Printer Canvas Preview?

Posted on 2002-07-24
1
766 Views
Last Modified: 2010-04-04
Is there any possibility of previewing the printer canvas? It is annoying to print the whole canvas to the printer whenever you change something on it.

Tnx.
0
Comment
Question by:ssdjgru1
1 Comment
 
LVL 7

Accepted Solution

by:
Cynna earned 100 total points
ID: 7176002
I'm afraid not if you already have stuff on Printer.Canvas...
Printers Canvas is not the same as for example, Bitmaps Canvas - you could take it as a write-only canvas. So,
straightforward approach, ie. copy from printer to screen  won't work.
The way to resolve this could be to draw on bitmap first, and copy it to Printer.Canvas immediately before printing.
But this has some drawbacks, primarily because of low-quality scaling.
The best solution is drawing on metafile, and then copying it to printer.
This is explained in following article:

"Add Print Preview to your applications" : http://www.undu.com/Articles/000207f.html

As you can see, it's a bit of work...

Probably the best thing would be using some free component
for this. For example, http://www.radix.net/~bziegler/Delphi/pprev.zip

There is interesting approach using QRPrinter, and more info here:
http://www.efg2.com/Lab/Library/Delphi/Printing
(search for "Print Preview")
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
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…

895 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

13 Experts available now in Live!

Get 1:1 Help Now