Solved

Printer Canvas Preview?

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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

This article explains how to create forms/units independent of other forms/units object names in a delphi project. Have you ever created a form for user input in a Delphi project and then had the need to have that same form in a other Delphi proj…
Introduction I have seen many questions in this Delphi topic area where queries in threads are needed or suggested. I know bumped into a similar need. This article will address some of the concepts when dealing with a multithreaded delphi database…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

743 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