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

Truncated export to pdf pb

6 Answers 51 Views
Grid
This is a migrated thread and some comments may be shown as answers.
CSurieux
Top achievements
Rank 2
CSurieux asked on 18 Jun 2009, 09:43 AM
Hello,

My grid is scrolling horizontally with dynamic autogenerated columns and when I use the export to pdf I get only the left part of the grid in the document.
Is there a way to say 'export and fit in page' ?

To challenge Telerik, I must say that I find the pdf export featured is not very well supported as it is a major featured reclamed by cutomers.

Here is my grid declaration

<div style="width: 100%;">  
    <Telerik:RadGrid ID="RadGrid1" runat="server" AllowFilteringByColumn="True" AllowPaging="True" 
        AllowSorting="True" ShowStatusBar="true" GridLines="None" ShowGroupPanel="True" > 
        <PagerStyle Mode="NextPrevAndNumeric" /> 
        <ClientSettings AllowColumnsReorder="True" AllowDragToGroup="True" ReorderColumnsOnClient="True">  
            <Resizing AllowColumnResize="True" EnableRealTimeResize="True" ResizeGridOnColumnResize="True" /> 
            <Scrolling AllowScroll="True" ScrollHeight='400px' UseStaticHeaders="True" SaveScrollPosition="True" /> 
            <Selecting AllowRowSelect="True" /> 
        </ClientSettings> 
        <MasterTableView Width="100%" TableLayout='Fixed' AllowMultiColumnSorting="true">  
            <ItemStyle Wrap='true'  /> 
            <HeaderStyle Width='100px' /> 
            <AlternatingItemStyle Wrap='true' /> 
        </MasterTableView> 
        <SortingSettings SortedBackColor="Azure" /> 
    </Telerik:RadGrid> 
</div> 
 

Some parameters are fix"ed or changed in codebehind.

Thanks for help.

CS

6 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 1
answered on 18 Jun 2009, 11:38 AM
Hello Christian,

You can try applying the PageSize while exporting to pdf such that the exported grid fits in the page:
c#:
protected void ExportButton_Click(object sender, EventArgs e) 
    { 
        RadGrid1.ExportSettings.ExportOnlyData = true
        RadGrid1.ExportSettings.OpenInNewWindow = true
        RadGrid1.ExportSettings.IgnorePaging = true
 
        RadGrid1.ExportSettings.Pdf.PageHeight = Unit.Parse("300mm"); 
        RadGrid1.ExportSettings.Pdf.PageWidth = Unit.Parse("600mm");   
 
        RadGrid1.MasterTableView.ExportToPdf();    
    } 

Thanks
Princy.
0
CSurieux
Top achievements
Rank 2
answered on 18 Jun 2009, 01:00 PM
Thanks Princy,

But it is not my request, what would do my en user with such a pdf ???
They need letter, so this the reason some 'fit in 1 page' option would be appreciated.

Have you joigned Telerik ?

CS
0
Daniel
Telerik team
answered on 24 Jun 2009, 06:12 AM
Hello Christian,

Unfortunately the RadGrid's PDF export engine don't support auto-sizing the contents. The possible options in this case are:
  • - use a bigger page format
  • - lower the font size
  • - adjust the width of your columns

Regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
CSurieux
Top achievements
Rank 2
answered on 24 Jun 2009, 06:28 AM
Hello Daniel,

Dommage, this seriously limit the usage of pdf export.

I will try your options.
But you could write this as a request: been able to do a fit in page pdf export from radgrid.

Regards
CS
0
Daniel
Telerik team
answered on 24 Jun 2009, 07:56 AM
Hello Christian,

Thank you for the feedback.

I passed your feature request to our developers for future consideration.

Let me know if you have any questions regarding my suggestions.

Regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
CSurieux
Top achievements
Rank 2
answered on 24 Jun 2009, 08:15 AM
Ok,
Thanks for followup.
CS
Tags
Grid
Asked by
CSurieux
Top achievements
Rank 2
Answers by
Princy
Top achievements
Rank 1
CSurieux
Top achievements
Rank 2
Daniel
Telerik team
Share this question
or