C# Rotativa-奇怪的标题输出

C# Rotativa-奇怪的标题输出,c#,asp.net-mvc-3,wkhtmltopdf,rotativa,C#,Asp.net Mvc 3,Wkhtmltopdf,Rotativa,我正在尝试修复一个问题,即HTML中的表标题在后续页面上无法正确呈现。关于如何解决这个问题有什么想法吗 标题 <thead> <tr> <th></th> <th>@Index.LastName</th> <th>@Index.FirstName</th&

我正在尝试修复一个问题,即HTML中的表标题在后续页面上无法正确呈现。关于如何解决这个问题有什么想法吗

标题

 <thead>
                <tr>
                    <th></th>
                    <th>@Index.LastName</th>
                    <th>@Index.FirstName</th>
                    <th>@Index.Contact</th>
                    <th>@Index.Division</th>
                    <th>@Index.ClubName</th>
                    <th>@Index.Position</th>
                </tr>
            </thead>
结果


这解决了这个问题,很明显,这是由wktohtml中的一个bug引起的

<style>
      tr { page-break-inside: avoid;}
</style>

tr{内部分页符:避免;}

有关更多信息,请参见…

正确的解决方案是使用
thead,tfoot{display:table row group}
@ashkulz:这也可以防止问题的发生,只是因为它会从除第一页以外的所有页面中删除标题。如果你想在每一页上保留页眉,那么Slinky的答案实际上是可行的。
<style>
      tr { page-break-inside: avoid;}
</style>