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

[Solved] PDF Export, Styling--Line spacing and spans

1 Answer 235 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Neal
Top achievements
Rank 1
Neal asked on 14 Aug 2009, 01:58 PM
Hi Guys,

I'm using markup from one of your examples, which uses the span element.

Anyway of formatting these such that i get greater spacing between each line.
I also ried using  a table  to sort the line spacing out , in the TemplateCol   (commented out in the attached markup), but anything in the table does not make it to PDF .

(My Detail Table is std BoundCols and using some c# code as per examples is fine thanks), just the Master is an issue

the code behind takes care of the necessary page size ,pageheight, and

   ExportSettings.IgnorePaging =

true;

 

   ExportSettings.OpenInNewWindow =

true;

 


TIA
Neal

<

 

MasterTableView

 

 

Width="100%"

 

 

DataKeyNames="RecId" CellSpacing="-1" pagesize="20">

 


 

<Columns>

 

 

<telerik:GridTemplateColumn>

 

 

<ItemTemplate>

 

 

<span style="font-weight:bold;font-family:Arial Black; text-align:center;width:100% ">

 

 

 

<asp:Image ID="EqArmsCoat" Width="200px" Height="150px"

 

 

ImageUrl="~/Images/Equistar logo spot 1 pic.jpg"

 

 

runat="server" AlternateText="Equistar 5 Star Insurance" />

 

 

</span>

 

<%

-- <table>

 

<tr>

<td width="100%" height="200px" valign="middle">

<asp:Image ID="EqArmsCoat" Width="200px" Height="150px"

ImageUrl="~/Images/Equistar logo spot 1 pic.jpg"

runat="server" AlternateText="Equistar 5 Star Insurance" />

</td>

</tr>

 

 

 

 <tr>

 

<td width="25%" height="40px" valign="middle">Schedule Date

</td>

<td width="75%" height="40px" valign="middle"><%# Eval("SchedDate")%>

</td>

</tr>

<tr>

<td width="25%" height="40px" valign="middle">Reference Number

</td>

<td width="75%" height="40px" valign="middle"><%# (Eval("Schedref_no"))%>

</td>

</tr>

 

</table>--

 

%>

 

 

<br />

 

 

<br />

 

 

<span style="font-weight:normal;height:45;width:100px">Schedule Date : </span>

 

<%

# Eval("SchedDate")%>

 

 

<br />

 

 

<br />

 

 

<span style="font-weight:normal;height:45;width:100px">Reference Number :</span>

 

<%

# (Eval("Schedref_no"))%>

 

 

<br />

 

 

<br />

 

 

<span style="font-weight:normal;height:45;width:100px">Annual Premium :</span>

 

<%

# (Eval("AnnualPremium"))%>

 

 

<br />

 

 

<br />

 

 

<span style="font-weight:normal;height:45;width:100px">Payment Option :</span>

 

<%

# (Eval("PayFreq"))%>

 

1 Answer, 1 is accepted

Sort by
0
Daniel
Telerik team
answered on 20 Aug 2009, 11:12 AM
Hello Neal,

Your tables will be exported properly if you include a colgroup element as shown below. The number of col elements should be equal to the number of the columns in the table.
 <table> 
        <colgroup> 
            <col /> 
            <col /> 
        </colgroup> 
        <tr> 
            <td width="100%" height="200px" valign="middle"
                <asp:Image ID="EqArmsCoat" Width="200px" Height="150px" ImageUrl="~/Images/Equistar logo spot 1 pic.jpg" 
                    runat="server" AlternateText="Equistar 5 Star Insurance" /> 
            </td> 
        </tr> 
   ... 
</table> 

Regards,
Daniel
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
Tags
Grid
Asked by
Neal
Top achievements
Rank 1
Answers by
Daniel
Telerik team
Share this question
or