1

I'm trying to create a report which is showing tabular data. Whenever a page limit is reached (standard 8.5x11 paper) I need insert a page header for the next page (each page needs it's own header, the tabular data can't simply spill over without one), and then continue printing the tabular data.

Is there an easy way to do this? I would need the same thing for footers to just show page numbers. This is a small in-house company project, so it would only need to work in Chrome.

4

1 回答 1

2

HTML/CSS 不支持打印页眉/页脚作为标准。

我认为一个好的做法是使用第三方库来生成 PDF 文档。

一个好的是TCPDF(开源)。它可以转换 HTML 以生成 PDF 文件服务器端。

这是一个简单的页眉/页脚布局示例,这里是PHP 代码

于 2013-09-23T19:57:30.617 回答