PHP Convert Word file to HTML without losing styling and images(PHP 在不丢失样式和图像的情况下将 Word 文件转换为 HTML)
问题描述
是否有将word文件转换为HTML而不丢失格式的API?
Is there an API for converting word files to HTML without losing the format?
谷歌文档 API 可以用于此吗?
Can the google documents API be used for this?
我尝试了 saaspose,但返回的结果始终是服务器错误.
I tried saaspose but the returning result is always a server error.
对我不起作用的解决方案:
Solutions that did not work for me:
- 在 php 中将 MS Word 文档转换为 html
推荐答案
我花了一些时间来研究这个问题,我发现的最佳解决方案是安装 unoconv 在服务器上,并使用 PHP 通过系统调用与其交互.
I've spent a bit of time loking into this, and the best solution that I've found was to install unoconv on the server, and using PHP to interface with it through system calls.
我很想为此找到一个很好的原生 PHP 解决方案,但不幸的是我找不到.
I would have loved to find a good native PHP solution for this, but unfortunately I couldn't.
编辑自从最初回答这个问题以来,我遇到了一个 Web 服务,它提供了一个用于转换文档的 API.我还没有对它进行非常彻底的测试,但它在将 Word 转换为 HTML 时似乎确实产生了不错的结果:CloudConvert.
Edit Since originally answering this, I've come across a web service which presents an API for converting documents. I haven't tested it very thoroughly but it does seem to produce decent results at converting Word to HTML: CloudConvert.
这篇关于PHP 在不丢失样式和图像的情况下将 Word 文件转换为 HTML的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:PHP 在不丢失样式和图像的情况下将 Word 文件转换为 HTML
基础教程推荐
- 如何替换eregi() 2022-01-01
- YouTube API v3 点赞视频,但计数器不增加 2022-01-01
- PHP PDO MySQL 查询 LIKE ->多个关键词 2021-01-01
- PHP 类:全局变量作为类中的属性 2021-01-01
- 学说 dbal querybuilder 作为准备好的语句 2022-01-01
- 在PHP中根据W3C规范Unicode 2022-01-01
- 有什么方法可以用编码 UTF-8 而不是 Unicode 返回 PHP`json_encode`? 2021-01-01
- 如何在 Laravel 中使用 React Router? 2022-01-01
- 如何在 Laravel 5.3 注册中添加动态下拉列表列? 2021-01-01
- Cron Jobs 调用带有变量的 PHP 脚本 2022-01-01
