Formatting PageTitle in export to PDF

7 posts, 0 answers
  1. Steve LaForge
    Steve LaForge avatar
    61 posts
    Member since:
    Feb 2005

    Posted 11 Aug 2010 Link to this post

    Good afternoon!  I have a question regarding exporting a grid to PDF...

    Is there any way to format the PageTitle?  I would like to show the report title on one line, and then on the second line show the current date and time followed by some empty space and then the user's name.  I've tried using string.format to plug values into an HTML string but it seemed to just ignore my HTML.  I didn't get any errors...just not the desired results either. :^(

    Thanks!
  2. Daniel
    Admin
    Daniel avatar
    4945 posts

    Posted 11 Aug 2010 Link to this post

    Hello Steve,

    I'm afraid this is not possible since the PageTitle is rendered as a standard HTML title element - it does not support formatting and new lines. However, you could insert custom text and/or image at the top of the (first) page using the PdfExporting event.

    Regards,
    Daniel
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. DroidSlave
    DroidSlave avatar
    5 posts
    Member since:
    Sep 2012

    Posted 09 Aug 2012 Link to this post

    Any changes to this?
    I need to increase the font size of the title element of the page, can I grab the html and modify it before it is rendered to the PDF?
  5. Steve LaForge
    Steve LaForge avatar
    61 posts
    Member since:
    Feb 2005

    Posted 09 Aug 2012 Link to this post

    Unfortunately I have not received any update from Telerik since this original response.
  6. DroidSlave
    DroidSlave avatar
    5 posts
    Member since:
    Sep 2012

    Posted 09 Aug 2012 Link to this post

    Were you able to figure out a way to add some custom item to the top of the page?
  7. Steve LaForge
    Steve LaForge avatar
    61 posts
    Member since:
    Feb 2005

    Posted 09 Aug 2012 Link to this post

    Only by hardcoding spaces, hypens, etc into the title, but that only allowed the title to have more info.  It still all uses the same format.

    I also tried to make it work where I could pass any sorting and filtering to a report created in Telerik Reporting, and then use the link to export to PDF to instead link to the report.  Unfortunately, Telerik doesn't support that either and didn't give my any help with trying to accomplish that goal.  Per the tech that responded to that request, the .NET controls and the Reporting tool are two separate products and don't have any integration.  That's a shame, because I had always respected the interaction of the Telerik components.  I submitted another request to see if they would look into it, but I didn't get a response to that one either.

    The only other thing that I have done is to give the user the ability to export data into Excel, which they can then format themselves.

    I love the Telerik .NET components, but this is the one area where I have found a weakness.

  8. Daniel
    Admin
    Daniel avatar
    4945 posts

    Posted 14 Aug 2012 Link to this post

    Hello Steve,

    Our developers are currently working on support for page headers and footers.
    As to the PageTitle property, it uses the Html title element so it won't recognize any formatting.
    Excuse us for any inconvenience caused.

    Best regards,
    Daniel
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017