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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Export to Pdf and Word Document Issue

Thread ID:

Created:

Updated:

Platform:

Replies:

142849 Feb 20,2019 12:11 PM UTC Feb 22,2019 10:36 AM UTC JavaScript 1
loading
Tags: ejGrid
ARMohan
Asked On February 20, 2019 12:11 PM UTC

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

Vignesh Natarajan [Syncfusion]
Replied On 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. 
 
 


CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;