Truncated export to pdf pb

7 posts, 0 answers
  1. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 18 Jun 2009 Link to this post

    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
  2. Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 18 Jun 2009 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 18 Jun 2009 Link to this post

    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
  5. Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 24 Jun 2009 Link to this post

    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.
  6. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 24 Jun 2009 Link to this post

    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
  7. Daniel
    Admin
    Daniel avatar
    4943 posts

    Posted 24 Jun 2009 Link to this post

    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.
  8. CSurieux
    CSurieux avatar
    465 posts
    Member since:
    Jan 2007

    Posted 24 Jun 2009 Link to this post

    Ok,
    Thanks for followup.
    CS
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017