0

I'm trying to take the results from an input form on an HTML page and have them pasted or printed onto a PDF contract upon submission.

I'm using wordpress cforms, but I'm not opposed to exploring non-wordpress solutions for this because I don't think there are any simple widgets to do this.

I've come across some mentions of using the Zend Framework to achieve this, but I was hoping for a different solution.

4

1 回答 1

2

使用tcpdf等工具,您可以通过第三方方法将当前的 html 输出输出为 PDF 格式。

这是一个关于 tcpdf 如何工作的 PHP 小代码片段

    require_once(dirname(__FILE__).'/html2pdf.class.php');
    $html2pdf = new HTML2PDF('P','A4','en');
    $html2pdf->WriteHTML($HTMLoutput);
    $html2pdf->Output('Report.pdf');
    die;

还有一些其他框架可以从插件中移动其他类型的输出,但我认为它并不完全符合您的要求,因为它基于帖子和页面

http://wordpress.org/plugins/post2pdf-converter/

http://wordpress.org/plugins/wp-post-to-pdf/

于 2013-06-05T14:42:55.560 回答