Home  >  Article  >  Backend Development  >  javascript - Is there a way to make HTML5 canvas display/preview word/excel/powerpoint documents?

javascript - Is there a way to make HTML5 canvas display/preview word/excel/powerpoint documents?

WBOY
WBOYOriginal
2016-07-06 13:52:091889browse

Currently, we want to implement online document preview similar to Baidu Wenku, but they generally use Flash, and HTML5 canvas can replace Flash in most cases. So is there a way to let canvas display/preview Office documents?
If you don’t use Flash, the only way at present is to use OpenOffice/LibreOffice or an online service (such as the document conversion service provided by a third party in Qiniu) to convert it to PDF, and then use Mozilla’s pdf.js to preview it online.

Reply content:

Currently, we want to implement online document preview similar to Baidu Wenku, but they generally use Flash, and HTML5 canvas can replace Flash in most cases. So is there a way to let canvas display/preview Office documents?
If you don’t use Flash, the only way at present is to use OpenOffice/LibreOffice or an online service (such as the document conversion service provided by a third party in Qiniu) to convert it to PDF, and then use Mozilla’s pdf.js to preview it online.

This kind of demand is mainly handled by a powerful backend.

I have looked for it before, you can check out this https://segmentfault.com/q/1010000004959795

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn