PHP 4.3.2 中的 PDF 生成:(
不幸的是,我面临着必须在运行 php 4.3.2 的服务器上生成一些相当基本的 PDF 的问题。
因此,这几乎使得大多数事情变得不可能,例如谷歌的 domPDF 等。PDFlib 没有编译,所以我也不能使用其中任何一个。
有人有什么建议吗?
谢谢!
I'm faced with having to generate some fairly basic PDFs on a server which is running php 4.3.2 unfortunately.
So that pretty much renders most things impossible such as google's domPDF etc.. PDFlib is not compiled in so I can't use any of that either.
Does anyone have any suggestions?
Thanks!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
使用此 R&OS PDF 类 来完成此任务。这是相当简单且轻量级的类并且不需要在服务器上安装模块等。
use this R&OS PDF Class to achieve this task.. This is fairly simple and light weight class and requires no module etc to be installed on the server.
您可以尝试 DocRaptor.com,这是一个网络服务,可让您将 html 转换为 pdf。
You could try out DocRaptor.com, which is a webservice that will let you convert html to pdf.
我最终使用了旧版本的 fpdf 和 HTML2PDF(来自下面的链接)。这当然不理想,但是 7 年前的 php 版本也不是理想的。
http://www.macronimous.com/resources/Converting_HTML2PDF_using_PHP.asp
I ended up using an older version of fpdf and HTML2PDF (from the link below.) It's certainly not ideal, but then neither is a 7 year old version of php.
http://www.macronimous.com/resources/Converting_HTML2PDF_using_PHP.asp
您没有提到您是从头开始还是从现有 PDF 数据生成这些内容。 pdftk 是一个方便的 PDF 操作库。您可以从 PHP 中获取它。
You didn't mention if you were generating these from scratch or from existing PDF data. pdftk is a handy PDF manipulation library. You can shell out to it from PHP.