Solved

Printer Canvas Preview?

Posted on 2002-07-24
1
775 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
In my programming career I have only very rarely run into situations where operator overloading would be of any use in my work.  Normally those situations involved math with either overly large numbers (hundreds of thousands of digits or accuracy re…
Email security requires an ever evolving service that stays up to date with counter-evolving threats. The Email Laundry perform Research and Development to ensure their email security service evolves faster than cyber criminals. We apply our Threat…
The Email Laundry PDF encryption service allows companies to send confidential encrypted  emails to anybody. The PDF document can also contain attachments that are embedded in the encrypted PDF. The password is randomly generated by The Email Laundr…

839 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