您好,欢迎访问一九零五行业门户网

php 实现html转为rtf格式_PHP教程

前期准备工作 下载html2rtf.dll,以管理员的身份运行cmd,进入html2rtf.dll所在目录--》输入regsvr32 html2rtf.dll
核心代码:
preserveimages = true;
$html2rtfcom->pagenumbers = 1;
$html2rtfcom->pagenumbersalignh = 1;
$html2rtfcom->pagenumbersalignv = 5;
$htmlfile = a.html;
$rtffile = a.rtf;
$result =$html2rtfcom->convertfile($htmlfile,$rtffile, head, foot);
print($result);
unset($html2rtfcom);
echo done;
?>
可能遇到的问题 fatal error: class 'com' not found in ×××
解决办法:
·将php_com_dotnet.dll复制到php根目录ext文件夹下
·php.ini 确保有此语句
[php_com_dotnet]
extension=php_com_dotnet.dll
·确保 com+ event system 的服务开启
http://www.bkjia.com/phpjc/814675.htmlwww.bkjia.comtruehttp://www.bkjia.com/phpjc/814675.htmltecharticle前期准备工作 下载html2rtf.dll,以管理员的身份运行cmd,进入html2rtf.dll所在目录--》输入regsvr32 html2rtf.dll 核心代码: preserveimages = true; $html...
其它类似信息

推荐信息