从 html 创建一个简单的 pdf 报告

发布于 2024-08-31 14:09:00 字数 519 浏览 3 评论 0 原文

我正在寻找一种从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

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

不知所踪 2024-09-07 14:09:00

查看TCPDF

查看示例

Take a look at TCPDF

Check out the examples.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文