This is a migrated thread and some comments may be shown as answers.

[Solved] Data is clubbing in genareted PDF

1 Answer 72 Views
Grid
This is a migrated thread and some comments may be shown as answers.
satya
Top achievements
Rank 1
satya asked on 21 Oct 2009, 09:09 AM
Hi

I have a grid with 20 columns. I exported the grid data to PDF.

My requirement is, i want to show this generated PDF in landscape format by showing all 20 column's data.

I have set below code for landscape 
<Pdf PageWidth="297mm" PageHeight="210mm" />
now my issue is all the columns in the generated PDF is not properly aligned. Some of the columns are sitting on one other.

How to adjust to view all the columns because i need to print that pdf document for reporting purpose.


Regards,
Satya


1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 21 Oct 2009, 12:18 PM
Hello Satya,

You can try out the following code to get a lanscsape orientation on exporting RadGrid to pdf.
protected void Button1_Click(object sender, EventArgs e)  
{      
    RadGrid1.ExportSettings.OpenInNewWindow = true;  
      
    // to get landscape orientation set PageHeight and PageWidth as below 
    RadGrid1.ExportSettings.Pdf.PageHeight = Unit.Parse("162mm");  
    RadGrid1.ExportSettings.Pdf.PageWidth = Unit.Parse("600mm");  
 
    RadGrid1.MasterTableView.ExportToPdf();   
}  

You can also refer to the following link which may help:
Export To PDF to fit a page

-Princy.
Tags
Grid
Asked by
satya
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or