Solved

Printer Canvas Preview?

Posted on 2002-07-24
1
789 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Get HTML5 Certified

Want to be a web developer? You'll need to know HTML. Prepare for HTML5 certification by enrolling in July's Course of the Month! It's free for Premium Members, Team Accounts, and Qualified Experts.

Question has a verified solution.

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

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses
Course of the Month7 days, 3 hours left to enroll

623 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