trichview.com

trichview.support




Re: screen <-> printer


Return to index


Author

Message

Frank Kroeger

Posted: 07/23/2003 18:37:40


Hi,


now I get it. I was under the impression you had to Init on the canvas you

would draw on. I didn't realize you could init on a different canvas then

you draw on.


This now works.


Thank you very much.


Frank Kroeger


"Sergey Tkachenko" <[email protected]> wrote:

>PrnCanvas is a full analog of Printer.Canvas.

>But it's impossible to get Printer.Canvas until you start printing. You

can

>create PrnCanvas at any time.

>

>Do not use PrnCanvas for drawing. Use it only in reporthelper.Init().

>Do not call reporthelper.Init() for other canvases, call it only one time

>per document, for PrnCanvas (since you call Init() only one time, you

>obviously cannot get different number of pages for screen and printer)

>When reporthelper is ready (Init and (multiple) FormatNextPage are called),

>you can draw onto other canvas. Do not draw on PrnCanvas - it does not make

>sense. Draw on Printing.Canvas (for printing), and on Canvas in

>OnPagePrepaint for previewing (it is possible to draw on TImage, but it

will

>require additional scaling image)

>

>Look again at that example. It can be compiled, and it works

>

>>

>> Hi Sergey,

>>

>> sorry to be a pain in the ass but I still don't get it.

>>

>> If I can't use the prncanvas to draw on, what use does it have?

>> The prncanvas has 600 dpi for my printer, using this to Initialize the

>reporthelper

>> and draw pages on it gives me the right results for my pagecount but I

>still

>> don't have a correct preview. If I use the event OnPagePrepair I get a

96

>> dpi canvas, which with I have my pagecount problem (more lines of text

fit

>> on the printer than on the monitor for a given area).

>>

>> I don't want to draw the page on the printer.canvas because this tells

my

>> printer to print. I just want a preview first. But drawing this on a

>TImage

>> or TPVPrintPreview gives me the wrong result (This is not just different

>> word wrap, it is different page counts).

>>

>> I'm puzzled.

>

>

>





Powered by ABC Amber Outlook Express Converter