前期准备工作
下载
Html2Rtf.dll,以管理员的身份运行cmd,进入Html2Rtf.dll所在目录--》输入Regsvr32 Html2Rtf.dll
核心代码:
<?php
$html2RTFCom = new COM("HTML2RTF.Converter");
$html2RTFCom->PreserveImages = true;
$html2RTFCom->PageNumbers = 1;
$html2RTFCom->PageNumbersAlignH = 1;
$html2RTFCom->PageNumbersAlignV = 5;
$htmlFile = "a.html";
$rtfFile = "a.rtf";
$result =$h