Export Grid with many columns to pdf

15 posts, 0 answers
  1. Luca
    Luca avatar
    1 posts
    Member since:
    Dec 2010

    Posted 02 Mar 2011 Link to this post

    Hi,

    I'm trying to export a huge grid (20/25 columns more or less) to pdf, too large to fit within page width, so i was wondering if maybe i could split grid columns over two or more pages as needed. Up to now I have been using rad document and table object to accomplish the task, and then format provider class to export to pdf. I thought it would have been the best option and maybe it is in normal cases when the grid doesn't have too many columns. Unfortunately this approach doesn't work out when a great number of columns need to be exported to A4 paper. So my idea was to split columns over more then one page, but i could not find any way to do so.
    Any suggestions? is it also possible to render pdf over more then one page horizontally, always by using table class and RadDocument?
    if not, which other options are available?

    Thanks

    Luca 
  2. Ivailo Karamanolev
    Admin
    Ivailo Karamanolev avatar
    276 posts

    Posted 04 Mar 2011 Link to this post

    Hello Luca,

    Unfortunately, the PDF format provider does pagination using the RadDocument algorithm, which, just as MS Word, only supports vertical splitting. All you can do currently is change the page size, or if you really need A4, you can try using landscape. You can accomplish this by either setting the document section's orientation to landscape or simply settings the page size to 297x210mm instead of 210x297mm.
    Let us know if you have any other questions.

    All the best,
    Ivailo
    the Telerik team
    Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
  3. DevCraft banner
  4. Matt
    Matt avatar
    24 posts
    Member since:
    Sep 2009

    Posted 03 May 2012 Link to this post

    This seems to be a fairly significant limitation on the PDF implementation. When will this issue be resolved?
  5. Ivailo Karamanolev
    Admin
    Ivailo Karamanolev avatar
    276 posts

    Posted 08 May 2012 Link to this post

    Hello,

    This behavior is by design, as this format provider is used for exporting RadDocuments exclusively. RadDocument is a flow document format, so it cannot support both horizontal and vertical pagination of content. Unfortunately, this limitation cannot be overcome with the current solution stack.
    Several other options that will make this easy-to-trivial to accomplish are being developed as we speak, but they will appear in the beginning of 2013 at the earliest, so I'm not at liberty to discuss them.
    We're sorry we couldn't be of help. Let us know if we can assist you in any other way.

    Regards,
    Ivailo Karamanolev
    the Telerik team

    Explore the entire Telerik portfolio by downloading the Ultimate Collection trial package. Get it now >>

  6. Matt
    Matt avatar
    24 posts
    Member since:
    Sep 2009

    Posted 08 May 2012 Link to this post

    Thanks for your reply. That's good to hear, I suppose, but without reliable printing performance in Silverlight and without a usable PDF export, I'm strongly suspecting that HTML 5 may be a much better alternative than Silverlight even with Telerik components.
  7. F Beto
    F Beto avatar
    11 posts
    Member since:
    Nov 2012

    Posted 12 Jul 2013 Link to this post

    Hello Ivailo,

    I have a problem with PDF export. My problem is that I have a lot of columns, I mean the amount of RadGridView columns is created dinamically, for example I have the following data:

    Column1   Column2   Column3   Column4   Column5   Column6   Column7 ................ ColumnN
    data10       data20        data30       data40       data50       data60        data70    ................. dataN0
    data11       data21        data31       data41       data51       data61        data71    ................. dataN1
    data12       data22        data32       data42       data52       data62        data72    ................. dataN2
    data13       data23        data33       data43       data53       data63        data73    ................. dataN3

    At this point all the data are being set to the page. It's exporting something like this.

    C  C  C ...............................
    o   o  o
    l    l    l
    u  u   u
    m m  m
    n  n   n
    1  2   3


    All the data is being exporting in that way. So, I'd like to have this format.

    Column1   Column2   Column3    
    data10       data20        data30              
    data11       data21        data31                            Page1
    data12       data22        data32              
    data13       data23        data33             

    Column4   Column5   Column6
    data40       data50       data60
    data41       data51       data61                             Page2
    data42       data52       data62
    data43       data53       data63

    Column7 ................ ColumnN
    data70    ................. dataN0
    data71    ................. dataN1                                 Page3
    data72    ................. dataN2
    data73    ................. dataN3

    Is there any way that can do this operation automatically? do you have any suggestion or examples about this using DadDocument, and PdfFormatProvider?
    I tried to fix it modifying the page size but you know that's is not a good fix.

    Please! I need your help!!

    Note: I attached the report that was exported with my app.

    Thanks in advance!!
  8. Petya
    Admin
    Petya avatar
    975 posts

    Posted 17 Jul 2013 Link to this post

    Hello,

    Other than the solution you found yourself, you can try to modify the logic of the export to "break" the table into several smaller tables. My suggestion is to try measuring the columns of your RadGridView and basically create separate tables from small sets of columns (as demonstrated in your example below). What you should be aware in this regard is that RadDocument's model does not allow consecutive tables, so you should make sure to add at least one empty paragraph between them.

    I hope this is helpful! Let us know if you face any issues.
     
    Regards,
    Petya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  9. F Beto
    F Beto avatar
    11 posts
    Member since:
    Nov 2012

    Posted 17 Jul 2013 Link to this post

    Thank you for your replay!!!

    As you mentioned, my first approach in order to fix this issue was Set large PageSize as you can see in the attached document. So, now I am trying the second approach that is as you mentioned. I'm modifying the logic of the export.

    Thank you for your suggestion!!
  10. César
    César avatar
    2 posts
    Member since:
    Oct 2013

    Posted 24 Oct 2013 Link to this post

    Hi telerik team

    Please tell me if now there is a native solution to solve this problem.
    I need to have both vertical and horizontal pagination exporting to PDF.

    Best regards,
    César Faria
  11. Petya
    Admin
    Petya avatar
    975 posts

    Posted 29 Oct 2013 Link to this post

    Hello César,

    Horizontal pagination of RadDocument is not possible and it is not in our plans. The two solutions discussed in this thread are your only options at this time.

    We are currently considering exposing printing functionality for the RadSpreadsheet control which will allow splitting the document horizontally. Worksheets are not flow documents, so they can be paginated both vertically and horizontally. We will do our best to implement the functionality for the Q1 2014 release and exporting to PDF in the same manner should be available soon after that.

    Let us know if you have other questions.

    Regards,
    Petya
    Telerik
    TRY TELERIK'S NEWEST PRODUCT - EQATEC APPLICATION ANALYTICS for SILVERLIGHT.
    Learn what features your users use (or don't use) in your application. Know your audience. Target it better. Develop wisely.
    Sign up for Free application insights >>
  12. chandru
    chandru avatar
    3 posts
    Member since:
    Jun 2014

    Posted 17 Jun 2014 in reply to Petya Link to this post

    Hi Telerik Team,

    I am facing similar problem that F Beto has mentioned in this thread.
    Please let me know if there is a way to have both vertical and horizontal pagination for exporting data from a Radgrid to PDF.
    I am using the controls of Q1 2014 release.

    Thanks
    Chandru

  13. chandru
    chandru avatar
    3 posts
    Member since:
    Jun 2014

    Posted 18 Jun 2014 Link to this post

    Hi Telerik Team,

    I am facing similar problem that F Beto has mentioned in this thread.
    Please let me know if there is a way to have both vertical and horizontal pagination for exporting data from a Radgrid to PDF.
    I am using the controls of Q1 2014 release.

    Thanks
    Chandru
  14. Svetoslav
    Admin
    Svetoslav avatar
    55 posts

    Posted 20 Jun 2014 Link to this post

    Hello Chandru,

    Thank you for contacting us.

    With our release form  Q2 2014 we have released a new component RadSpreadProcessing which allows you to create, load and modify  documents to Xlsx, Csv, Tab-delimited file formats as well as export them to Pdf format without using 3rd party libraries. You can learn more about it following this link: RadSpreadProcessing documentation article.

    You may additionally see how to integrate RadGridView with RadSpreadProcessing and export it to Pdf in our online demo for Telerik UI for Silverlight..

    You can learn more about customizing how the content is split into pages both vertically and horizontally on this link for WorksheetPageSetup.

    I hope this helps. Don't hesitate to contact us again.

    Regards,
    Svetoslav
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
  15. chandru
    chandru avatar
    3 posts
    Member since:
    Jun 2014

    Posted 20 Jun 2014 in reply to Svetoslav Link to this post

    Hi Svetoslav,

    Thanks for your reply.

    I am using Q1 2014 release of Telerik UI for Asp.net AJAX. Please let me know if we have the same functionality that is used in Silverlight. It would be also helpful if I get to see a demo.

    Also, let me know when can i get the Q2 2014 on the latest internal builds ?

    Thanks and Regards,
    Chandru
  16. Kostadin
    Admin
    Kostadin avatar
    1713 posts

    Posted 25 Jun 2014 Link to this post

    Hi Chandru,

    Telerik UI for Asp.net AJAX provides a built-in export to PDF when using a RadGrid and RadTreeList. You could check out the following live example which demonstrates how to use the exporting feature.
    Grid - Export to PDF
    TreeList - Export Basics
    Additionally more information is available under Related Resources tabs of the demos.

    Regards,
    Kostadin
    Telerik
     
    Check out Telerik Analytics, the service which allows developers to discover app usage patterns, analyze user data, log exceptions, solve problems and profile application performance at run time. Watch the videos and start improving your app based on facts, not hunches.
     
Back to Top
DevCraft banner