function GetPageWidth: Integer;
begin
Result := Screen.PixelsPerInch*GetDeviceCaps(Printer.Handle,
PHYSICALWIDTH) div GetPixelsPerInchX
end;
function GetPageHeight: Integer;
begin
Result := Screen.PixelsPerInch*GetDeviceCaps(Printer.Handle,
PHYSICALHEIGHT) div GetPixelsPerInchY
end;
function GetPixelsPerInchX: Integer;
begin
Result := GetDeviceCaps(Printer.Handle, LOGPIXELSX)
end;
function GetPixelsPerInchY: Integer;
begin
Result := GetDeviceCaps(Printer.Handle, LOGPIXELSY)
end;