Hi Team,
I have tested the template syntaxes mentioned below in my template and am trying to render the attached HTML content using the LINQ reporting engine.
Tag and Expression:
<<html [HtmlContent]>>
Tag, Expression and switch:
<<html [HtmlContent] -sourceStyles>>
Expression and switch:
<<[HtmlContent] -html>>
HTML content:
<hr style="height: 4px; color: rgb(36,69,116);">
<table width="100%" style="background-color: rgb(237,237,237);">
<tr>
<td colspan="1" rowspan="1">
<table width="40%" cellspacing="0" cellpadding="0" style="color: rgb(38,68,116); font-size: 9px; font-family: Arial;">
<tr>
<th align="left" colspan="1" rowspan="1" width="50%">Service Plan</th>
<th align="center" colspan="1" rowspan="1" width="50%">4 Year</th>
</tr>
<tr>
<td colspan="1" rowspan="1">Multi-Year Discount</td>
<td colspan="1" rowspan="1" style="text-align: center;">10%</td>
</tr>
<tr>
<td colspan="1" rowspan="1">POS Discount</td>
<td colspan="1" rowspan="1" style="text-align: center;">10%</td>
</tr>
<tr>
<td colspan="1" rowspan="1">Total Savings</td>
<td colspan="1" rowspan="1" style="text-align: center;">$16,720.00</td>
</tr>
</table>
</td>
</tr>
</table>
<hr style="height: 4px; color: rgb(15,135,200);">
<table width="100%" style="background-color: rgb(237,237,237);">
<tr>
<td colspan="1" rowspan="1">
<table width="40%" style="color: rgb(15,135,200); font-size: 9px; font-family: Arial; background-color: rgb(237,237,237);">
<tr>
<td colspan="1" rowspan="1" width="50%"><b>Grand Total</b></td>
<td colspan="1" rowspan="1" style="text-align: center;" width="50%"><b>$71,280.00</b></td>
</tr>
</table>
</td>
</tr>
</table>
Issue:
Aspose.Words do not honour the inline styles of the hr tag, but it does honour the inline styles of the table tag.
Attached are the artefacts for your review. Please share your thoughts, and feel free to reach out if you need any clarification.
Input Template:
AsposeLinqTemplate.docx (15.2 KB)
Output Document:
MergedDocument.docx (23.8 KB)
Code:
DataMerger.zip (849 Bytes)
Thanks,
Hiren