//Convert HTML to PDF file using EO.Pdf
if (pageOrientation == ImageOrientation.Landscape)
{
EO.Pdf.HtmlToPdf.Options.PageSize = new SizeF(11.0f, 8.5f);
EO.Pdf.HtmlToPdf.Options.OutputArea = new RectangleF(0.25f, 0.25f, 10.5f, 8.0f);
}
else
{
EO.Pdf.HtmlToPdf.Options.PageSize = new SizeF(8.5f, 11.0f);
EO.Pdf.HtmlToPdf.Options.OutputArea = new RectangleF(0.25f, 0.25f, 8.0f, 10.5f);
}
EO.Pdf.HtmlToPdf.Options.SSLVerificationMode = EO.Pdf.SSLVerificationMode.None;
EO.Pdf.HtmlToPdf.Options.AllowLocalAccess = true;
EO.Pdf.HtmlToPdf.Options.AutoFitX = EO.Pdf.HtmlToPdfAutoFitMode.ScaleToFit;
EO.Pdf.HtmlToPdf.Options.AutoFitY = EO.Pdf.HtmlToPdfAutoFitMode.ScaleToFit;
var result = EO.Pdf.HtmlToPdf.ConvertHtml(htmlContent, ms);
HTML Template (Note: Replacement variables are filled in at runtime):
<html>
<body style="margin:0;padding:0">
<table width="792" height="612" cellpadding="0" cellspacing="0">
<tr>
<td width="792" align="center" valign="top">
<img src="{ProductDocImages}/Chart-596-case_shiller_V25.jpg" alt="" width="792"/>
</td>
</tr>
<tr>
<td width="792" align="left" valign="bottom">
<div style="height:10px;font-size:6pt;{LargeDisclosure}"> </div>
<div style="margin:0 18px 0 18px">
<table width="746" cellpadding="0" cellspacing="0">
<tr>
<td width="20"> </td>
<td width="70" align="left" valign="top">
<img src="{MemberPrintPhoto}" border="0" alt="" style="{PhotoExists};width:70px"/>
</td>
<td width="20"> </td>
<td width="255" align="left" valign="top">
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 9pt; color: #333333; font-weight: bold;">{FullName}<br/>{Title} {Partner1} {Partner1Title}</span>
<div style="font-size:1px;line-height:1px;height:2px;"></div>
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 9pt; color: #333333;">{Phone1} {Phone2} {Phone3} {Email1} {Website}</span>
</td>
<td width="20"> </td>
<td width="234" align="left" valign="top">
<img src="{CompanyPrintLogo}" alt="" border="0" style="{CompanyLogoExists};{CompanyLogoLandscape}"/>
<div style="font-size:1px;line-height:1px;height:3px;"></div>
<span style="font-family: Arial, Helvetica, sans-serif; font-size: 9pt; color: #333333">{Address1}{Address2}<br/>{City} {State} {PostalCode}</span>
</td>
<td width="20"> </td>
<td width="107" align="right" valign="bottom">
{CompanyMark}
</td>
</tr>
</table>
<div style="height:9px;font-size:5pt;{ExLargeDisclosure}"> </div>
<div style="font-size: {DisclosureFontSize}; font-family: Arial, Helvetica, sans-serif; margin-top: 2px; text-align: justify">
The material provided is for informational and educational purposes only and should not be construed as investment and/or mortgage advice, or a commitment to lend.
Although the material is deemed to be accurate and reliable, there is no guarantee of its accuracy. The material does not represent the opinion of {CompanyName}.
© {Year} Media Center, LLC. All rights reserved. {CompanyDisclosure} {BranchDisclosure} {Disclosure}
</div>
</div>
</td>
</tr>
</table>
</body>
</html>