我正在寻找一种从html生成pdf文件的方法
为了制作简单的表格报告,我需要以下功能
- 表呈现
- 可变页面大小
- 在每个页面上重复页眉/页脚
- 计算页码/总页
- css支持会很好
我知道 stackoverflow 中有很多类似的问题,但我不知道是否有一个产品支持上述功能...
理想情况下,源代码将是一个带有 css 的简单且构建良好的 html,(我正在构建html 文件,这样我就可以适应产品的需求,也就是说,它不必渲染你可以扔到浏览器上的每一块 html 垃圾)并使用一些自定义标签来配置标题、页脚、页面大小等。 ..
然后我会运行命令行将其从 html 转换为 pdf。
我认为 http://www.allcolor.org/YaHPConverter/ 做了类似的事情
I'm looking for a way to generate pdf files from html
In order to make simple tabular reports I would need the following features
- table rendering
- variable page size
- repeating headers / footers on every page
- calculated page number / total page
- css support would be nice
I know there have been many similar questions in stackoverflow, but I don't know if there's a product that supports the aforementioned features...
Ideally, the source would be a plain and simple well built html with css, (I'm building the html files, so I can adapt to the products needs, that is, it won't have to render every piece of html crap you can throw at a browser) and with some custom tags to configure headings, footer, page size, etc...
then I would run a command line to convert it from html to pdf.
I think http://www.allcolor.org/YaHPConverter/ does something like that
发布评论
评论(1)
查看TCPDF
查看示例。
Take a look at TCPDF
Check out the examples.