Unexpected printing behaviour
-
Hello all, I am running into a somewhat odd problem with printing from an MFC program. I am getting printouts just fine, but there seems to be a difference between the preview page and the printed page. The preview, in this case, prints 40 lines to a page, while the printed version prints 41. Since the overall printout is about 64-65 pages long, this is causing the last few pages to be very different between the two. I put in some TRACE statements to print the height of a line with each font type I am using, and this is what I got (the fonts are all Times New Roman, various point sizes): For the Preview version:
Preparing Page 2
Page 2
Report Hdr: 00155
Page Hdr: 00095
Table Caption: 00115
Column Hdr: 00115
Table Body: 00095
Table Total: 00095
Page Footer: 00075
Report Footer: 00075
Printing Page 2
Line Start 1110
Line Start 1225
Line Start 1340
Line Start 1455
Line Start 1570
Line Start 1685
Line Start 1800
...
Line Start 5020
Line Start 5135
Line Start 5250
Line Start 5365
Line Start 5480
Line Start 5595For the Print version:
Preparing Page 2
Page 2
Report Hdr: 00151
Page Hdr: 00094
Table Caption: 00114
Column Hdr: 00114
Table Body: 00094
Table Total: 00093
Page Footer: 00075
Report Footer: 00075
Printing Page 2
Line Start 1108
Line Start 1222
Line Start 1336
Line Start 1450
Line Start 1564
Line Start 1678
Line Start 1792
...
Line Start 4984
Line Start 5098
Line Start 5212
Line Start 5326
Line Start 5440
Line Start 5554
Line Start 5668As you can see, the font heights are a little different. This is causing an extra line per page. I did not think this was possible, since I am using the default printer definition in both cases. Is there any way to compensate for this? Thanks for any hint anyone can provide. Santanu