I'm doing some label printing (a lot of textout to the printer canvas) and
I'd like to be able to preview the resulting page or possibly individual
labels. Looked through my Teixeira & Pacheco (among others) but I can't
find a good discussion of how to do it. Teixeira & Pacheco say to use a
TMetaFile but there aren't any implementation details.
Is there a good tutorial or example of this online somewhere?
Thanks,
bobD
if you can use the Delphi-Component Quick-Report then you have a preview
included.
I think a saw some examples on the homepage of http://www.qusoft.com/ (The
authof of Quickreport)
There is another ng which may help you further.
b.p.d.reporting-charting
Maybe it helps you.
Cheers
Carsten.
BobD schrieb:
I read that about TMetaFiles too. I had a quick go and almost managed it.
Read up about TMetaFile 'cause it is quite simple. It has a "canvas" and if
you write your label printing routine to write to the canvas of the
tmetafile instead of printer, open a form and "play" the metafile to it. I
seem to remember that I had to mess about with the co-ordinates. I had a
RichEdit and I was attempting to preview the doc, but if I remember
correctly it came out h-u-g-e.
Sorry -- can't find my code...
HTH
Stu.
BobD wrote in message <8aarjq$i0...@bornews.borland.com>...
Here you will find a component called 'Print Preview'. It comes with
full source.
_/_/_/_/_/ Robert _/_/_/_/_/
> Is there a good tutorial or example of this online somewhere?
There are a few "Print Preview" links at
http://www.efg2.com/Lab/Library/Delphi/Printing
Printer Demo #2 might also be useful since it shows how
to draw shapes and text to both the screen and the printer:
http://www.efg2.com/Lab/OtherProjects/PrinterDemo2.htm
--
efg
Earl F. Glynn E-Mail: Earl...@att.net
Overland Park, KS USA
efg's Computer Lab: http://www.efg2.com/Lab
thanks much. Excellent link.
bobD
What I think I need to do is
1. Create a metafile
2 Create a metafile canvas
3. Set metafile canvas extents/characteristics to match printer page
4 output data to metafile canvas
5 free metafile canvas
6 if PrintPreview.desired then
6a show preview
7 if preview/accepted or not preview.desired then
7a transfer metafile to printer
Is this about right?
I'd like to know I have the basic task outline right before I start
developing program structures, objects, etc. And I'm not too clear about how
to achieve 3, 6a, or 7a.
bobD
canvas
Carsten Bonde <bonde....@eae.com> wrote in message
news:38C8F270...@eae.com...
All I do is write my print routines so they paint on a canvas variable. Then
depending on the user selecting "Print" or "Print Preview", I'll set the
variable to either the printer canvas or to a blank form canvas, and call
refresh. You need to scale things but it works for me.
Simon