1

我想将我的 php 页面中的表格转换为 pdf .. 我将它通过一个表单元素并在其他页面上检索。我尝试使用许多 pdf 转换器,如 fpdf、dompdf 等,但遗憾的是没有一个有效。总是有一些错误。我也通过 mpdf 发现它工作正常,但不得不要求客户手动保存 pdf。

我尝试使用princexml 使用phpwrapper 文件(prince.php)。但我得到了弃用的错误。![][1]

我使用的代码如下

<body>
<?php 
include "prince.php";
$prince = new Prince('../../../Program Files (x86)/Prince/Engine/bin/prince.exe');
$prince->convert_file_to_file("license.txt","license.pdf",'inf');
$msg=array("hey","hello");
echo $prince->convert_string_to_file("Rahul","rahul.pdf",$msg[]);
?>
</body>`

我想要 echo $prince->convert_string_to_file("Rahul","rahul.pdf",$msg[]); 去工作。请帮助......坚持了很长时间!

4

0 回答 0