trichview.support
Re: screen <-> printer |
Author |
Message |
Sergey Tkachenko |
Posted: 07/23/2003 17:13:08 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