Core code:
Copy code The code is as follows:
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";
Possible problems Fatal error: Class 'COM' not found in ×××
Solution:
·Copy php_com_dotnet.dll to the php root directory ext folder ·php. ini make sure there is this statement
[PHP_COM_DOTNET]
extension=php_com_dotnet.dll
·Make sure the COM+ Event System service is turned on
http://www.bkjia.com/PHPjc/779159.html
www.bkjia.com
truehttp: //www.bkjia.com/PHPjc/779159.htmlTechArticleCore code: Copy the code as follows: !--?php $html2RTFCom = new COM("HTML2RTF.Converter" ); $html2RTFCom---PreserveImages = true; $html2RTFCom-PageNumbers = 1; $html2RTFCom-Pa...
Statement:The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn