手机
当前位置:查字典教程网 >编程开发 >php教程 >php实例分享之html转为rtf格式
php实例分享之html转为rtf格式
摘要:核心代码:复制代码代码如下:PreserveImages=true;$html2RTFCom->PageNumbers=1;$html2RT...

核心代码:

复制代码 代码如下:

<->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 的服务开启

【php实例分享之html转为rtf格式】相关文章:

php分页函数

PHP IDE phpstorm 常用快捷键

php实现的IMEI限制的短信验证码发送类

php数组合并与拆分实例分析

php实现简单的语法高亮函数实例分析

php中smarty变量修饰用法实例分析

php实现图片转换成ASCII码的方法

将数字格式的计算结果转为汉字格式

php注入实例

php基于curl扩展制作跨平台的restfule 接口

精品推荐
分类导航