PHPExcel create/style/save PDF Documentation

浪尽此生 提交于 2019-12-23 19:14:45

问题


I'm using the PHPExcel library in a couple of project and love the functionality it provides. Currently I needed to save as a PDF and found that PHPExcel can do this but I'm finding it rather hard to track down some examples or documentation on the process.

Here are the links I have found:

  • http://phpexcel.codeplex.com/wikipage?title=News%20archive
  • http://www.devshed.com/c/a/PHP/PHP-Excel-Working-with-Workbook-and-PDF-Files/1/

Follow up question:

I need the PDF to look and function as a form, the ability to prefill data fields, and select different options. Would PHPExcel be the right choice for this? Currently I'm using pdftk on the command line and changing servers has caused the problem of needing to downgrade the version to an older one. This is fine but I think I'm looking to replace this and go with a PHP based approach.

Thoughts? Suggestions?


回答1:


PHPExcel uses the tcpdf library to render the PDF. If you look at the appropriate source code, you'll see it doesn't allow external access to the PDF object it creates. tcpdf does support form elements, so it appears your solution is to write your own Writer class for PHPExcel or just modify that code so you can get the results you're looking for.



来源:https://stackoverflow.com/questions/7678566/phpexcel-create-style-save-pdf-documentation

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!