corelibraries-devexpress-dot-xtraprinting-d8c3f45a.md
Enables you to calculate the DPI values associated with specific units of measure (and vice versa).
Namespace : DevExpress.XtraPrinting
Assembly : DevExpress.Data.v25.2.dll
NuGet Package : DevExpress.Data
[JavaPartial]
public class GraphicsDpi
<JavaPartial>
Public Class GraphicsDpi
This example illustrates how to adjust the document margins from one DPI value (corresponding to tenths of a millimeter) to another (corresponding to device-independent pixels) by using the XRConvert.ConvertMargins method.
using DevExpress.XtraPrinting;
using DevExpress.XtraReports.UI;
// ...
void ConvertMargins(){
printableComponentLink.Margins = XRConvert.ConvertMargins(printableComponentLink.Margins,
GraphicsDpi.TenthsOfAMillimeter,
GraphicsDpi.DeviceIndependentPixel);
}
Imports DevExpress.XtraPrinting
Imports DevExpress.XtraReports.UI
' ...
Private Sub ConvertMargins()
printableComponentLink.Margins = XRConvert.ConvertMargins(printableComponentLink.Margins, _
GraphicsDpi.TenthsOfAMillimeter, _
GraphicsDpi.DeviceIndependentPixel)
End Sub
Object GraphicsDpi
See Also