I cannot get a consistent rendering of the content within an HtmlTextBox from the WebReportViewer to Word and Excel exports
In HTML, the outer DIV height renders too short cropping the content.
In Word, one of the lines is not visible until you zoom in even though its the same as the next line
In Excel, the row is rendered to short and the bottom content is hidden.
Grabbing the rendered HTML from the WebForm ReportViewer it renders fine in Firefox, and Chrome but only appears to render correct in Internet Explorer when the Document Mode is set to Quirks or IE7, but this does not explain the Word and Excel issues.
The HtmlTextBox is set to 11pt because the Html Content is wrapped in a <font size=2> in order to target the desired height of 8pt.
Excel is rendering the content at 11pt as the HTML tags have been stripped, but the calculated size is not taken into account.
I assume that HTML do not like decimal font-sizes other then halves. IE 6.7pt => 6.5pt
<div style='font-size:8pt; width:713px;'>
<FONT size=2>
<FONT size=1>
I (We) certify that the information on this Balance Sheet is true and correct to the best of my (our) knowledge. I (We) have provided this information to xxxxxxxxxxx Bank to obtain or maintain a loan. I (We) understand that false statements made may be subject to prosecution. The xxxxxxxxxxx Bank is authorized to verify the statements contained herin and I (We) request and authorize all individuals or businesses to release information to xxxxxxxxxxx Bank regarding our business relationships. I (We) agree to all these conditions and terms of this application. <BR> <BR> <BR>Signature:________________________________________________________ Date: __________<BR> <BR> <BR> <BR>Signature: ________________________________________________________Date:__________
</FONT>
</FONT>
</div>
<br/>
<hr/>
<br/>
<style type="text/css">
div.htmlTextBox2 { line-height:110%; height:111px; top:535px; width:713px; font-family:Arial; font-size:11pt; margin:0; padding:0; }
div.htmlTextBox2 * { line-height:110%; }
.s67 { font-size: 9.79pt; padding: 0; }
.s68 { font-size: 6.6pt; padding:0; }
</style>
<div title="" class="htmlTextBox2 s64" style="overflow: visible; border:1px solid red;">
<DIV style="MARGIN-TOP: 0px" class=html-root>
<DIV class=s66 style='margin:0;padding:0;'>
<FONT class=s67>
<FONT class=s68>
I (We) certify that the information on this Balance Sheet is true and correct to the best of my (our) knowledge. I (We) have provided this information to xxxxxxxxxxx Bank to obtain or
</FONT>
</FONT>
<FONT class=s67>
<FONT class=s68>
maintain a loan. I (We) understand that false statements made may be subject to prosecution. The xxxxxxxxxxx Bank is authorized to verify the statements contained herin and I
</FONT>
</FONT>
<FONT class=s67>
<FONT class=s68>
(We) request and authorize all individuals or businesses to release information to xxxxxxxxxxx Bank regarding our business relationships. I (We) agree to all these conditions and
</FONT>
</FONT>
<FONT class=s67>
<FONT class=s68>
terms of this application. <BR>
</FONT>
</FONT>
<FONT class=s67>
<FONT class=s68>
<BR>
</FONT>
</FONT>
<FONT class=s67>
<FONT class=s68>
<BR>
</FONT>
</FONT>
<FONT class=s67>
<FONT class=s68>
Signature:________________________________________________________ Date: __________<BR>
</FONT>
</FONT>
<FONT class=s67>
<FONT class=s68>
<BR>
</FONT>
</FONT>
<FONT class=s67>
<FONT class=s68>
<BR>
</FONT>
</FONT>
<FONT class=s67>
<FONT class=s68>
<BR>
</FONT>
</FONT>
<FONT class=s67>
<FONT class=s68>
Signature: ________________________________________________________Date:__________
</FONT>
</FONT>
</DIV>
</DIV>
</DIV>