Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ClassCastException AnonymousBlockBox cannot be cast to TableCellBox on TD: float-left #309

Closed
ghost opened this issue Dec 13, 2018 · 2 comments

Comments

@ghost
Copy link

ghost commented Dec 13, 2018

We see this exception:
java.lang.ClassCastException: com.openhtmltopdf.render.AnonymousBlockBox cannot be cast to com.openhtmltopdf.newtable.TableCellBox

With HTML
<table> <tr> <td style="float:left">something</td> <td>xx</td> </tr> </table>
Granted float:left on a td doesn't make sense but a warning to the log is preferable to an exception if possible.

@sandre1
Copy link

sandre1 commented May 5, 2019

The same thing happens when using Html :
<td><img src="/img/regular/address-card.svg" width="20" /></td>

danfickle added a commit that referenced this issue Dec 9, 2019
fixes issue #309, avoid adding AnonymousBlockBox on TableCells. Additionally build a TableCellBox instead of a BlockBox if it's a floating element
@danfickle
Copy link
Owner

Thanks again @syjer for fix. Closing for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants