sbussinger wrote:My second problem was also related to GetPrinterPageBounds() routine. It returns values based on the physical size of the page rather than the logical size of the page. In my case that's an issue, but it may be better the way it is for everyone else. My problem arises because inkjets tend to have much larger bottom margins than laser printers and my output was getting cropped. I'd like to propose this change to GetPrinterPageBounds():
- Code: Select all
Replace
Result.Right := GetDeviceCaps(Printer.Handle, PHYSICALWIDTH);
Result.Bottom := GetDeviceCaps(Printer.Handle, PHYSICALHEIGHT);
with
Result.Right := GetDeviceCaps(Printer.Handle, HORZRES);
Result.Bottom := GetDeviceCaps(Printer.Handle, VERTRES);
This would mean that if UsePrinterOptions is true, that the page size is based on the printable area of the page rather than on the full size of the page in question. Any thoughts?
I don't have printer to try sbussinger's suggestion on the other kind of printers. Any help would be appreciated.
Greetings,
Kambiz