html shared by php instance converted to rtf format

  • 2021-06-28 11:41:08
  • OfStack

Core Code:


<!--?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 =$html2RTFCom->ConvertFile($htmlFile,$rtfFile, "head", "foot");
print($result);
unset($html2RTFCom);
echo "done";   
?>

Possible problems Fatal error: Class'COM'not found in×××
Terms of settlement:
President php_com_dotnet.dll is copied to the php root directory ext folder
< php.ini ensures this statement
[PHP_COM_DOTNET]
extension=php_com_dotnet.dll
< Ensure that COM + Event System services are turned on


Related articles: