3
Vote

PDF doesn't render tables or divs properly

description

If you have a table with tags within the td's, it doesn't render the contents of the inner tags. Also style="float:left" does not work on div or any other tags so there is currently no way to place 2 pieces of info next to each other while using styling.

E.g. in the following example, the contents of the <b> tag will not be rendered in the PDF. The HTML viewer contains the values, but when converted to PDF they disappear.
<table> <tr> <td> <b>Some Bold Text</b> Some Normal Text </td> </tr> </table>

file attachments

comments

playalien wrote Feb 6 at 3:59 PM

I ran into this issue today too. using "style=font-weight:bold;" will render the bolds. There's something wrong with the rendering engine. I used this sample html from the 00.Intro.htm file. Which renders the bolds correctly.
<td>
    Everything you see on this panel (see samples on the left) is <b>custom-painted</b>
    by the <b>HTML Renderer</b>, including tables, images, links and videos.<br />
    This project allows you to have the rich format power of HTML on your desktop applications
    without <b>WebBrowser</b> control or <b>MSHTML</b>.<br />
    The library is <b>100% managed code</b> without any external dependencies, the only 
    requirement is <b>.NET 2.0 or higher</b>, including support for Client Profile.
</td>

If you remove all the text before the first <b>, none of the first sentence will render. I banged my head on this for several hours, thought it was something I was doing wrong. Now I found this posting from 2015, describing the same issue.