Convert Measurement Units IronDrawing provides an option for users who want to change the measurement unit used in Rectangle or RectangleF from pixels (px) to millimeters (mm) or vice versa. The default measurement unit used in Rectangle and RectangleF is pixels (px). After a new Rectangle with measurements specified has been instantiated, you can call the conversion method on the Rectangle. For example, use ConvertTo(MeasurementUnits.Millimeters, 20). This will convert the measurements of the Rectangle to millimeters based on the DPI set by the user. This same approach can also be applied to the RectangleF class. Related Docs Links View on Github Related Tutorial Related How-To Guide Class Documentation Download IronDrawing DLL Report an Issue on this page Ready to Get Started? Nuget Downloads 15,258,533 | Version: 2025.3 just released Start Free Trial Free NuGet Download Total downloads: 15,258,533 View Licenses Still Scrolling? Want proof fast? PM > Install-Package IronSoftware.System.Drawing run a sample watch your HTML become a PDF. Free NuGet Download Total downloads: 15,258,533 View Licenses
All your questions are answered to make sure you have all the information you need. (No commitment whatsoever.)