2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
Syncfusion Essential DocIO is a .NET Word library used to create, read, and edit Word documents programmatically without Microsoft Word or interop dependencies. Using this library, you can set page margins for Word document through MarginsF class. You can set the document page margin settings like margin’s left, right, top and bottom. Then its object is assigned to section.PageSetup.Margins API. Set page margins for Word document programmatically in C#C# // Setting document page margins. MarginsF pagemargins = new MarginsF(); pagemargins.Bottom = 100; pagemargins.Top = 100; pagemargins.Left = 75; pagemargins.Right = 75; // Assigning document page margins to the current section. section.PageSetup.Margins = pagemargins; VB ' Setting document page margins. Dim pagemargins As MarginsF = New MarginsF() pagemargins.Bottom = 100 pagemargins.Top = 100 pagemargins.Left = 75 pagemargins.Right = 75 ' Assigning document page margins to the current section. section.PageSetup.Margins = pagemargins A complete working example of how to set page margins for Word document in C# can be downloaded from Page-Margins_In-Word.zip Note: Starting with v16.2.0.x, if you reference Syncfusion assemblies from trial setup or from the NuGet feed, include a license key in your projects. Refer to link to learn about generating and registering Syncfusion license key in your application to use the components without trail message.
|
2X faster development
The ultimate WinForms UI toolkit to boost your development speed.
This page will automatically be redirected to the sign-in page in 10 seconds.