Home > Backend Development > PHP Tutorial > PHP example sharing: convert html to rtf format_PHP tutorial

PHP example sharing: convert html to rtf format_PHP tutorial

WBOY
Release: 2016-07-13 10:29:07
Original
1212 people have browsed it

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

http: //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...
Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template