3

我正在尝试在生成的 pdf 文件中获取页脚。我正在使用这个库 https://github.com/andyhutch77/MvcRazorToPdf

有什么方法可以将我的一些内容放到页面底部?不幸的是 pdf 不响应position:absolute; bottom:0px;或边缘底部。

该页面在页面上显示了未知数量的记录,因此我无法静态执行。

4

1 回答 1

2

我找到了解决这个问题的方法。它不是很整洁,但我怀疑还有其他方法,因为 MvcRazorToPdf 不支持边距和位置样式。

<table id="wrapper" style="height:100%;">
    <tr>
        <td valign="top">
            Put your site content here.
        </td>
    </tr>
    <tr>
        <td valign="bottom">
            Put your footer here.
        </td>
    </tr>
</table>
于 2014-03-03T08:11:15.450 回答