php生成word后虚框的问题在线结贴
沈逸 2012-11-22 02:25:06 我使用php生成了一个word文件
注意 没有使用任何第三方的类库 直接使用
ob_start();
echo '<html xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">'
....
header("Content-Type: application/msword");
header("Content-Disposition: attachment; filename=address.doc"); //指定文件名称
header("Pragma: no-cache");
header("Expires: 0");
这种方法, 因为网页里面有 table 因此生成在word里后 会显示table的虚框(在css已经把border设置为0)
在word里可以在菜单中点击“不显示虚框”来把虚框不显示。
想问一下 如何通过css 或者通过 非操作的方式 把虚框隐藏掉。
注意:客户很傻,完全不会操作word,我不可能让客户学习 如何把虚框隐藏掉