<PackageReference Include="System.Drawing.Common" Version="9.0.0-preview.2.24128.3" />

PrinterUnitConvert

public sealed class PrinterUnitConvert
Specifies a series of conversion methods that are useful when interoperating with the Win32 printing API. This class cannot be inherited.
public static double Convert(double value, PrinterUnit fromUnit, PrinterUnit toUnit)

Converts a double-precision floating-point number from one PrinterUnit type to another PrinterUnit type.

public static Point Convert(Point value, PrinterUnit fromUnit, PrinterUnit toUnit)

Converts a Point from one PrinterUnit type to another PrinterUnit type.

public static Margins Convert(Margins value, PrinterUnit fromUnit, PrinterUnit toUnit)

Converts a Margins from one PrinterUnit type to another PrinterUnit type.

public static Rectangle Convert(Rectangle value, PrinterUnit fromUnit, PrinterUnit toUnit)

Converts a Rectangle from one PrinterUnit type to another PrinterUnit type.

public static Size Convert(Size value, PrinterUnit fromUnit, PrinterUnit toUnit)

Converts a Size from one PrinterUnit type to another PrinterUnit type.

public static int Convert(int value, PrinterUnit fromUnit, PrinterUnit toUnit)

Converts a 32-bit signed integer from one PrinterUnit type to another PrinterUnit type.