您对“TCPDF 之类”有何看法? PHP 生成 PDF 的解决方案?
您不认为 TCPDF 解决方案迫使您在布局渲染方面重新启动轮子吗?
我认为 TCPDF 不允许很好地分离关注点,并且当您尝试渲染动态表格或大部分文本时它的局限性太大。
我对 wkhtml2pdf 或 XSL-FOP,但我想要一些经验反馈。
提前致谢。
Don't you think the TCPDF solution force you to reivent the wheel, in term of layout rendering?
I think TCPDF doesn't allow a good separation of concerns, and is just too limited when you try to render dynamic tables, or wide portions of text.
I'm pretty interested in alternative solutions like wkhtml2pdf or XSL-FOP, but I would like some experience feedback.
Thanks in advance.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
过去几年我使用了 FOP 和 Jasper Reports。两者都是 Java 解决方案,但可以在 PHP 应用程序中轻松使用。为此,我使用 PHP/Java 桥(目前是来自 ZendServer CE 的桥,但 Sourceforge 上也有一个开源桥)
对我来说 JasperReports 效果更好。有一个用于创建模板的图形所见即所得编辑器 (iReport)。 FOP 也很棒,但是手工编写 XSL 既困难又冗长。
I used FOP and Jasper Reports over the last years. Both are Java-Solutions but can be easily used within a PHP application. For that I use a PHP/Java-Bridge (at the moment the one from the ZendServer CE, but there is also a Open-Source-Bridge at Sourceforge)
For me JasperReports works better. There is a graphical WYSIWYG-Editor (iReport) for creating the Templates. FOP is great too but writing the XSL by hand is difficult and lengtly.
我还没有尝试过你提到的两个 pdf 生成器,我会尝试一下......
我使用 TCPDF,它对我来说效果很好...它可以轻松地将 html 代码转换为 pdf 文件...
缺点是翻译并不总是完美的,特别是当您使用 css 样式时。
另一个缺点可能是图书馆的重量......
I haven't tried the two pdf generators that you mentioned, i'll give them a shoot...
I used TCPDF and it worked good for me... It allows easily to turn html code to a pdf file...
The drawbacks is that the translation is not always perfect, specially when you use css styles.
Another drawback could be the heavy weight of the library...