我正在尝试在生成的 pdf 文件中获取页脚。我正在使用这个库 https://github.com/andyhutch77/MvcRazorToPdf
有什么方法可以让我的一些内容放到页面底部吗?不幸的是 pdf 没有响应 position:absolute; bottom:0px;
或 margin-bottom。
该页面在页面上显示了未知数量的记录,因此我无法静态地进行。
最佳答案
我找到了解决这个问题的方法。它不是很整洁,但我怀疑还有其他方法,因为 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>
关于asp.net-mvc - MvcRazorToPdf 将内容对齐到页面底部,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22096032/