PageSetupLeftMargin Property

Returns or sets the distance (in points) between the left edge of the page and the left boundary of the body text.

Namespace:  Aspose.Words
Assembly:  Aspose.Words (in Aspose.Words.dll) Version: 20.3
Syntax
public double LeftMargin { get; set; }

Property Value

Type: Double
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