WordPress 插件生成 PDF 和 Xls 文档
我正在为需要打包在 WordPress 插件中的客户端编写一个 Web 应用程序。该应用程序构建在soap api 之上,它返回我需要输出到 pdf 和/或 excel 文档的结果数组。我使用两个第三方库来生成 pdf 和 excel 文件(tcpdf 和 phpexcel),但 Wordpress 不允许他们从插件内部修改标头以返回不同类型的内容。有谁知道如何从 WordPress 插件内部生成并返回 pdf/excel 文档?
I'm writing a web application for a client that needs to be packaged in a wordpress plugin. The application is built on top of a soap api that returns an array of results that I need to output to a pdf and/or excel document. I'm using two third party libraries to generate the pdf and excel files (tcpdf and phpexcel), but Wordpress won't allow them to modify the header from inside of the plugin to return different types of content. Does anyone know how I can generate and return a pdf/excel document from inside of a Wordpress plugin?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
请参阅以下 TCPDF exmaple 链接...这将向您展示如何使用 TCPDF 创建 pdf。
您还可以参考 post2pdf-converter WordPress 插件,它将向您展示如何将帖子转换为 pdf。
http://wordpress.org/extend/plugins/post2pdf-converter/
Please refer following TCPDF exmaple link...this will show you how to create pdf using TCPDF.
You can also refer post2pdf-converter wordpress plugin which will show you how to convert posts to pdf.
http://wordpress.org/extend/plugins/post2pdf-converter/