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
close icon

Export to Pdf and Word Document Issue

Hello,

I am using ejGrid and while Exporting to Pdf and Word, I have issue which i have attached in rar archive.
For Word Document:
--------------------------
I want all rows to be in single line. Is there a possibility to change 1). Document width and/or 2). Fit the Grid so each row in single line.

For PDF Document
------------------------
I have done page orientation=landscape. Still rows are split and print is showing in another page. I need each row to be in single line either 1). fit in pdf page size or 2). Posibility of increasing pdf Page width so all rows are in single line on a single page.

regards
A R Mohan
mram@amtpl.com


Attachment: Downloads_e537ae32.rar

1 Reply

VN Vignesh Natarajan Syncfusion Team February 22, 2019 10:36 AM UTC

 
Query:- For Pdf Document:-   1). fit in pdf page size or 2). Posibility of increasing pdf Page width so all rows are in single line on a single page. 
 
We have already achieved this requirement fit all the columns in single page in our syncfusion Knowledge base document by using isAutoFit property as false.  
 
 
Query#1:- For Word Document: 
 
Similarly for Word export, we can fit all the columns in single page by defining the Orientation as LandScape and PageSize as A3. And While exporting, disable the AutoFit as false.  Refer the below code example 
 
protected void FlatGrid_ServerWordExporting(object sender, Syncfusion.JavaScript.Web.GridEventArgs e) 
 
        { 
            WordDocument document = new WordDocument(); 
            IWSection section = document.AddSection(); 
            section.PageSetup.PageSize = PageSize.A3; 
            section.PageSetup.Orientation = PageOrientation.Landscape; 
            WordExport exp = new WordExport(); 
 
            exp.Export(FlatGrid.Model, (IEnumerable)FlatGrid.DataSource, "Export.docx", false, false, "flat-lime", false, document, "Grid"); 
 
        } 
 
Please get back to us if you have further queries.  
 
Regards, 
Vignesh Natarajan. 
 
 


Loader.
Live Chat Icon For mobile
Up arrow icon