trichview.support
screen <-> printer |
Author |
Message |
Frank Kroeger |
Posted: 07/22/2003 4:35:47 Hi, I use TRVReportHelper to print multiple records of a report on one or more pages. TRVReportHelper draws the pages onto the printercanvas and as a preview to a TImage as in one of your demos. Of course it would be nice if the preview would look like the print. But this is not the case. If I e.g. draw on the printercanvas in a given region of lets say 15 cm the printer fits approx. 30 lines of text into this area. If I do the same with the TImage it only fits 27-28 lines of text in the same region of 15 cm. This can leed to different number of pages send to the printer, and created on the TImage as a preview. This can be pretty annoying. I calculate the width and height of my area in pixel with: function mmToPixel(mm:extended;dpi:integer):integer; begin Result := round( (mm / 25.4) * dpi ); end; Where for the TImage dpi = GetDeviceCaps(TImage.Canvas.Handle, LOGPIXELSX) and for the printer dpi = GetDeviceCaps(printer.Handle, LOGPIXELSX). I assume it might have something to do with the difference in resolution ( 96 dpi <-> 600 dpi ) but I'm not sure. Furthermore in the TImage more characters can be fit in one line. To make it short: A page drawn to a printercanvas does not look like a page drawn to an imagecanvas. Am I missing something or am I making something wrong? Perhaps you could enlighten me. Tia Frank Kroeger |
Powered by ABC Amber Outlook Express Converter