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

Formatting PageTitle in export to PDF

6 Answers 63 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Steve LaForge
Top achievements
Rank 1
Steve LaForge asked on 11 Aug 2010, 09:44 PM
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!

6 Answers, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 11 Aug 2010, 09:59 PM
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
0
DroidSlave
Top achievements
Rank 2
answered on 09 Aug 2012, 01:46 PM
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?
0
Steve LaForge
Top achievements
Rank 1
answered on 09 Aug 2012, 01:51 PM
Unfortunately I have not received any update from Telerik since this original response.
0
DroidSlave
Top achievements
Rank 2
answered on 09 Aug 2012, 02:06 PM
Were you able to figure out a way to add some custom item to the top of the page?
0
Steve LaForge
Top achievements
Rank 1
answered on 09 Aug 2012, 02:46 PM
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.

0
Daniel
Telerik team
answered on 14 Aug 2012, 11:48 AM
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.
Tags
Grid
Asked by
Steve LaForge
Top achievements
Rank 1
Answers by
Daniel
Telerik team
DroidSlave
Top achievements
Rank 2
Steve LaForge
Top achievements
Rank 1
Share this question
or