I need export radgrid to pdf with custom header and tile

4 posts, 1 answers
  1. Reinier
    Reinier avatar
    4 posts
    Member since:
    May 2014

    Posted 01 Jul 2014 Link to this post

    Hi, I need to export radgrid to pdf format, but a need to put to raddocument my custom title and other header with specific information. Fro example

                                                                                                   Title of my Document

               Something                                  Something                                Something                                    Something                            Something

    and then the radgrid information

    Column1 Column2  Column3  Column4  Column5  Column6  Column7  Column8  Column9  Column10  Column11  Column12  Column13  Column14  Column15 
  2. Answer
    Petya
    Admin
    Petya avatar
    975 posts

    Posted 03 Jul 2014 Link to this post

    Hello Reinier,

    You can add any content you want to the document containing the exported RadGridView. For example, you can place the wanted information prior the first block in the document.
    RadDocument document = CreateDocument(grid, settings);

    Paragraph p = new Paragraph() { TextAlignment = RadTextAlignment.Center };
    p.Inlines.Add(new Span("Title of my Document"));
    document.Sections.First.Blocks.AddBefore(document.Sections.First.Blocks.First, p);

    If you want the information to be visible on each page you can put it in the header of the section by creating a separate RadDocument and assigning it as Body of the header.

    I hope this helps. Let us know if you have any additional comments or questions.

    Regards,
    Petya
    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.
     
  3. DevCraft banner
  4. Reinier
    Reinier avatar
    4 posts
    Member since:
    May 2014

    Posted 26 Jul 2014 Link to this post

    Hi Petya, thanks for you fast answer, I have other problem I need export one raddocument to pdf file, I do this but when I change the font family of raddocument the pdf file don't have the same font family always is the same font for pdf. I can export the raddocument font family to the pdf file.
    Thanks
  5. Petya
    Admin
    Petya avatar
    975 posts

    Posted 30 Jul 2014 Link to this post

    Hi Reinier,

    Like I said in the other thread you started on the matter, this is most likely related to a Silverlight runtime limitation which prevents the embedding of fonts in a document. You could try using the assemblies from the Telerik UI for WPF suite to export the document to PDF and you should not experience such behavior.

    Regards,
    Petya
    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