New to Telerik Document Processing? Start a free 30-day trial
Device Independent Pixels
Updated on Jul 15, 2026
Device Independent Pixels (DIPs) is a unit type used in the Document Processing libraries in the following cases:
- RadSpreadProcessing—setting the width of the columns and the height of the rows.
- RadPdfProcessing—setting the
FontSizeofTextFragmentorTextProperties. - RadWordsProcessing—setting the
FontSizeof aRun.
UnitHelper Class
The UnitHelper class provides several methods for converting from DIPs to other measurement units and vice versa (for example, points, picas, centimeters, and inches).
Convert from DIP to Unit
| Method | Description |
|---|---|
DipToPoint | Converts DIPs to points. |
DipToPointI | Converts DIPs to points. |
DipToPica | Converts DIPs to picas. |
DipToCm | Converts DIPs to centimeters. |
DipToMm | Converts DIPs to millimeters. |
DipToInch | Converts DIPs to inches. |
DipToTwip | Converts DIPs to twips. |
DipToEmu | Converts DIPs to EMUs. |
DipToTwipI | Converts DIPs to twips. |
DipToTwipF | Converts DIPs to twips. |
DipToUnit | Converts DIPs to units. |
Convert from Unit to DIP
| Method | Description |
|---|---|
PointToDip | Converts points to DIPs. |
PicaToDip | Converts picas to DIPs. |
EmuToDip | Converts EMUs to DIPs. |
CmToDip | Converts centimeters to DIPs. |
MmToDip | Converts millimeters to DIPs. |
InchToDip | Converts inches to DIPs. |
TwipToDip | Converts twips to DIPs. |
TwipToDipF | Converts twips to DIPs. |
TwipToDipI | Converts twips to DIPs. |
UnitToDip | Converts units to DIPs. |
Most of the methods follow the same pattern for converting units.
The following example shows how to obtain row height as DIPs and convert it to points.
Convert row height from DIPs to points
csharp
var rowHeightInDips = worksheet.Rows[0].GetHeight().Value.Value;
var rowHeightInPoints = UnitHelper.DipToPoint(rowHeightInDips);
The DipToUnit and UnitToDip methods accept not only the units but also the UnitType as a parameter:
The following example shows how to convert from points to DIPs and set the row height.
Convert points to DIPs and set the row height
csharp
double dips = UnitHelper.UnitToDip(60, UnitType.Point);
RowHeight newRowHeight = new RowHeight(dips, isCustom: true);
worksheet.Rows[0].SetHeight(newRowHeight);