VertPixelsPerInch := GetDeviceCaps(Printer.Handle, LogPixelsX); HorzPixelsPerInch := GetDeviceCaps(Printer.Handle, LogPixelsY);