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

Export to PDF loses span styles

2 Answers 71 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Kim
Top achievements
Rank 1
Kim asked on 17 Sep 2008, 07:34 PM
In this telerik demo they use span styles to format the labels bold and arial font (http://demos.telerik.com/ASPNET/Prometheus/Grid/Examples/GeneralFeatures/PdfExport/DefaultCS.aspx).

I am doing something similar, but when I export to pdf it seems to ignore these spans.  Any ideas?  Note: I cannot use the iem template styles because I want several different styles within the template.

Thanks!

2 Answers, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 18 Sep 2008, 03:55 AM
Hi Kim,

Here is a help article which explains how to export styles in pdf. Go through it and see if is helps.
Exporting styles in PDF

Thanks
Shinu.
0
Kim
Top achievements
Rank 1
answered on 18 Sep 2008, 01:48 PM
Thanks Shinu, but I already looked at this document before posting.  I am not using a typical grid structure with header and cells that I can apply styles to.  I am actually exporting just a single course completion certificate to pdf, so all my styles are spans within the item template.  It is very similar to the telerik demo I mentioned except I only have one page.  The example seems to be maintaing the arial/bold span they use so I don't understand why mine is not.  Here is a snipet of code:

<MasterTableView>

<Columns>

<telerik:GridTemplateColumn>

<ItemTemplate>

<span style="font-weight:bold;font-family:'Script MT Bold'; font-size: xx-large; text-align: center;">

<%# Eval("certificate_name", "{0:C2}")%><

</span>

</p>

<p align="center">

<span style="font-weight:bold;font-family:Garamond; font-size: large;">

Has successfully completed

</span>

</p>

<p align="center">

<span style="font-weight:bold;font-family:Garamond; font-size: x-large">

<%

# Eval("name", "")%> </span></p>

<p align="center"><span style="font-weight:bold;font-family:Garamond; font-size:small;">

Certificate Number:

<u><%# Eval("key", "")%></u></span></p>

<p align="left"><span style="font-weight:bold;font-family:Garamond; font-size:small;">

Date Completed:

<u><%# Eval("complete_date","{0 :MM/dd/yyyy}")%></u></span></p>

</ItemTemplate>

</telerik:GridTemplateColumn>

</Columns>

</MasterTableView>

Tags
Grid
Asked by
Kim
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Kim
Top achievements
Rank 1
Share this question
or