@ravina MS Word documents are flow by their nature, so there is no Page concept. You can use a separate section for the first page to specify different margins. For example see the following code:
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
builder.PageSetup.BottomMargin = 10;
builder.PageSetup.TopMargin = 10;
builder.PageSetup.LeftMargin = 20;
builder.PageSetup.RightMargin = 10;
builder.PageSetup.Orientation = Orientation.Portrait;
builder.Write("This is the first page");
// Insert section break.
builder.InsertBreak(BreakType.SectionBreakNewPage);
builder.PageSetup.BottomMargin = 50;
builder.PageSetup.TopMargin = 50;
builder.PageSetup.LeftMargin = 50;
builder.PageSetup.RightMargin = 50;
builder.PageSetup.Orientation = Orientation.Landscape;
builder.Write("This is the second page");
doc.Save(@"C:\Temp\out.docx");
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
Enables storage, such as cookies, related to analytics.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.
Sets consent for personalized advertising.
Cookie Notice
To provide you with the best experience, we use cookies for personalization, analytics, and ads. By using our site, you agree to our cookie policy.
More info
Enables storage, such as cookies, related to analytics.
Enables storage, such as cookies, related to advertising.
Sets consent for sending user data to Google for online advertising purposes.