We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Its width of the document page

Hello!
And somehow you can put your width of the docx document page. And do not use

section.PageSetup.PageSize = PageSize.A6;

1 Reply

VR Vijay Ramachandran Syncfusion Team March 27, 2017 07:28 AM UTC

Hi Slava,

Thank you for using Syncfusion products.

On analyzing further with the given details, we suspect your requirement is to specify the custom page size for a Word document instead of PageSize.A6. If this is your requirement, then you can achieve this by below highlighted code snippet:
 
      //Create Word document instance.
      WordDocument wordDocument = new WordDocument();
      wordDocument.EnsureMinimal();
     
//Set custom size (width, height) for the section.
      wordDocument.LastSection.PageSetup.PageSize = new SizeF(600, 800);
      //Add text to the paragraph.
      wordDocument.LastParagraph.AppendText("Word document created by DocIO with custom page size.");
     
//Save the Word document.
      wordDocument.Save(@"sample.docx");
     
//Close the Word document instance.
      wordDocument.Close(); 

If we misunderstood any of your requirement, then kindly elaborate the actual requirement with detailed description. Thereby we will analyze further on the mentioned case and will provided you appropriate solution

Regards,
Vijay R
 


Loader.
Up arrow icon