简体   繁体   English

将HTML标记转换为Word文档可接受的格式

[英]Convert html tags to a word document acceptable format

Is there a function that converts html tags like <p></p> or <a href> to word document compatible tags? 是否有将<p></p><a href>类的html标签转换为Word文档兼容标签的功能?

I'm using Microsofts PHP word document creator and I'm putting html into it but it's just being passed to the word document as plain html. 我正在使用Microsoft的PHP Word文档创建者,并且将html放入其中,但是它只是作为纯html传递给Word文档的。 I have tried html_entities_decode too but no avail. 我也尝试过html_entities_decode,但无济于事。

PHPWord is not allowing you to use HTML in the free version. PHPWord不允许您使用免费版本的HTML。

You need to have a paid version to use the html tags insertion in the Word document. 您需要付费版本才能在Word文档中使用html标记插入。

EDIT: 编辑:

My mistake, PHPWord doesn't have paid version. 我的错,PHPWord没有付费版本。 I was refering to PHPDOCX There you can find an optioni inside the paid vesion that will allow you to insert html. 我指的是PHPDOCX,您可以在付费版本中找到一个optioni,它可以让您插入html。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM