Registriert seit: 28. Feb 2011
Ort: Mannheim
1.384 Beiträge
Delphi 10.4 Sydney
|
AW: Pixel zu Height bei Drucker Problem
8. Mär 2011, 13:19
so :
Delphi-Quellcode:
Function GetPageWidth: Integer;
Begin
Result := GetDeviceCaps(Printer.Handle, PHYSICALWIDTH);
End;
Function GetPageHeight: Integer;
Begin
Result := GetDeviceCaps(Printer.Handle, PHYSICALHEIGHT);
End;
Function GetPageOffsetLeft: Integer;
Begin
Result := GetDeviceCaps(Printer.Handle, PHYSICALOFFSETX);
End;
Function GetPageOffsetRight: Integer;
Begin
Result := GetPageWidth - GetPageOffsetLeft - GetDeviceCaps(Printer.Handle, HORZRES);
End;
Function GetPageOffsetTop: Integer;
Begin
Result := GetDeviceCaps(Printer.Handle, PHYSICALOFFSETY);
End;
Function GetPageOffsetBottom: Integer;
Begin
Result := GetPageHeight - GetPageOffsetTop - GetDeviceCaps(Printer.Handle, VERTRES);
End;
Function GetPixelsPerInchX: Integer;
Begin
Result := GetDeviceCaps(Printer.Handle, LOGPIXELSX);
End;
Function GetPixelsPerInchY: Integer;
Begin
Result := GetDeviceCaps(Printer.Handle, LOGPIXELSY);
End;
Function GetHorzRes: Integer;
Begin
Result := GetDeviceCaps(Printer.Handle, HorzRes);
End;
Function GetVertRes: Integer;
Begin
Result := GetDeviceCaps(Printer.Handle, VertRes);
End;
Function GetHorzSize: Integer;
Begin
Result := GetDeviceCaps(Printer.Handle, HorzSize);
End;
Function GetVertSize: Integer;
Begin
Result := GetDeviceCaps(Printer.Handle, VertSize);
End;
|
|
Zitat
|