ConvertUtilInchToPoint Method

Converts inches to points.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public static double InchToPoint(
	double inches
)

Parameters

inches
Type: SystemDouble
The value to convert.

Return Value

Type: Double
Remarks
1 inch equals 72 points.
Examples
Specifies paper size, orientation, margins and other settings for a section.
DocumentBuilder builder = new DocumentBuilder();

PageSetup ps = builder.PageSetup;
ps.PaperSize = Aspose.Words.PaperSize.Legal;
ps.Orientation = Orientation.Landscape;
ps.TopMargin = ConvertUtil.InchToPoint(1.0);
ps.BottomMargin = ConvertUtil.InchToPoint(1.0);
ps.LeftMargin = ConvertUtil.InchToPoint(1.5);
ps.RightMargin = ConvertUtil.InchToPoint(1.5);
ps.HeaderDistance = ConvertUtil.InchToPoint(0.2);
ps.FooterDistance = ConvertUtil.InchToPoint(0.2);

builder.Writeln("Hello world.");

builder.Document.Save(ArtifactsDir + "PageSetup.PageMargins.doc");
See Also