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

Font of PageTitle of PDF

1 Answer 227 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Patrick
Top achievements
Rank 1
Patrick asked on 23 Apr 2014, 08:21 PM
Hi,

I am using RadGrid for ASP.NET. It contains a function to export data to PDF. I could achieve most of what I want but it seems it is not possible to change the font size and style of PageTitle.

Any help or comment is welcome.


The code snippet of the code-behind is shown below.

            radGrid.ExportSettings.Pdf.Title = "My Data"
            radGrid.ExportSettings.Pdf.Subject = "My Data";
            radGrid.ExportSettings.Pdf.PageTitle = "This is a page title"
            radGrid.ExportSettings.Pdf.PageWidth = Unit.Parse("297mm");
            radGrid.ExportSettings.Pdf.PageHeight = Unit.Parse("210mm");
            radGrid.ExportSettings.Pdf.PageLeftMargin = Unit.Pixel(15);
            radGrid.ExportSettings.Pdf.PageRightMargin = Unit.Pixel(15);
            radGrid.ExportSettings.Pdf.DefaultFontFamily = "Segoe UI";
            radGrid.ExportSettings.Pdf.AllowModify = false;
            radGrid.ExportSettings.Pdf.FontType = Telerik.Web.Apoc.Render.Pdf.FontType.Embed;
            radGrid.ExportSettings.Pdf.ForceTextWrap = true;
            radGrid.ExportSettings.UseItemStyles = true;



1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 24 Apr 2014, 08:34 AM
Hello Patrick,

Indeed, the PageTitle property is text-only. Actually it works in the same way as its HTML Title equivalent.
If you need to use styling you have to use the header and footer instead of the page title.
Please take a look at the "Header and Footer support" section in the following topic:
RadGrid PDF Export

Let me know if you need more information.

Regards,
Daniel
Telerik
 

Check out the Telerik Platform - the only platform that combines a rich set of UI tools with powerful cloud services to develop web, hybrid and native mobile apps.

 
Tags
Grid
Asked by
Patrick
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or