18 października 2018 16:27:05

Table Style

Avatar
  • Wysłany: 6 months ago
Hi,

Many thanks for the pdf plugin.

I am looking to alter the table colour from the default black (border="1"). I have attempted the in-line css text (style="border: 1px solid red;") within the table and cells but cannot get this to render within the pdf.

Any guidance would be gratefully received.

Thanks.
0
Avatar
  • Wysłany: 6 months ago
  • Moderator
Hello Benjamin,
It is difficult to find proper solution, because you are setting code at the RichEditor which is transfered later to iTextSharp library. Some features do not work, some need some kind of trick.

What we have done, was that code:
<table style="border: thick solid red;" width="100%" bgcolor="red">
<tbody>
<tr>
<td>
<table bgcolor="white">
<tbody>
<tr>
<td width="50%"><strong>@T(HtmlPDFInvoice.BillingInformation):<br /></strong>{BillingAddress.Company}<br />{BillingAddress.FirstName} {BillingAddress.LastName}<br />{BillingAddress.Address1} {BillingAddress.Address2}<br />{BillingAddress.ZipPostalCode} {BillingAddress.City}<br />{BillingAddress.StateProvince} <br />{BillingAddress.Country}<strong><br /></strong></td>
<td width="50%"><strong>@T(HtmlPDFInvoice.ShippingInformation):</strong><br />{ShippingAddress.Company}<br />{ShippingAddress.FirstName} {ShippingAddress.LastName}<br />{ShippingAddress.Address1} {ShippingAddress.Address2}<br />{ShippingAddress.ZipPostalCode} {ShippingAddress.City}<br />{ShippingAddress.StateProvince} <br />{ShippingAddress.Country} </td>
</tr>
</tbody>
</table>
</td>
</tr>
</tbody>
</table>

This will give you result you are asking for.
0
Avatar
  • Wysłany: 6 months ago
Hi,

Many thanks for finding a solution to this issue. That work around works well.
0
back to top