New to Telerik Document Processing? Start a free 30-day trial
Device Independent Pixels
Updated on Jun 5, 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.
Example 1 shows how to obtain row height as DIPs and convert it to points.
Example 1: Convert from DIP to Point
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:
Example 2 shows how to convert from point to DIP and set the row height.
Example 2: Convert from Point to DIP
csharp
double dips = UnitHelper.UnitToDip(60, UnitType.Point);
RowHeight newRowHeight = new RowHeight(dips, isCustom: true);
worksheet.Rows[0].SetHeight(newRowHeight);