preface

As we all know, there are many solutions for online preview of Word, Excel, PPT and PDF files, but most of them don’t have PPT animations or are very simple. This is not true. Recently, the product manager closed for three days and put forward the following requirements:

  • Listen for pages to turn and perform actions according to the page number
  • Document to image, each page into a picture
  • PPT animation and embedded video play online
  • PPT is played synchronously by multiple people
  • PPT drawing board function

Today, I will introduce you to several mainstream document preview programs, some free, some paid, I hope to help you.

Preview the plan

Microsoft Office Web Viewer

Call Microsoft Office online preview service, usage is also relatively simple:

http://view.officeapps.live.com/op/view.aspx?src= file addressCopy the code

The advantage is free, can achieve PPT animation playback; The downside is that there is no extensibility to achieve other functions.

  • The demo experience
  • The official sample

Baidu document service DOC

Baidu document service is to upload files to Baidu server, transcoding, transcoding success will get a docId, according to the docId preview of different files. Copy the following code and open it in your browser to preview.

<div id="reader"></div> <script src="http://static.bcedocument.com/reader/v2/doc_reader_v2.js"></script> <script type="text/javascript"> (function () { var option = { docId: "doc-mfmeihwtsi7ymas", token: "TOKEN", host: "BCEDOC", width: 800, // Document container width pn: 2, // to which page, optional: Function (handler) {// setFontSize and color, background color (can set day/night mode) handler.setFontSize(1); handler.setBackgroundColor("#000"); handler.setFontColor("#fff"); }, flip: function (data) {console.log(data.pn); }, fontSize: "big", toolbarConf: {page: true, // turn the page up and down arrow icon pagenum: true, // how many pages full: false, // whether to display the full screen icon, click on the full screen copy: Position: "center" // Sets the position of the page turning and zooming ICONS in the Toolbar (values are left/center)} // Top toolbar configuration object, mandatory}; new Document("reader", option); }) (); </script>Copy the code

You can see the configuration of Baidu documents or a lot of documents to turn pictures, monitoring page is not a problem, but the disadvantage is PPT animation can not play.

  • The official website

Yongzhong DCS document preview

Yongzhong function is still very powerful, divided into private cloud and public cloud, private cloud is deployed on its own server, public cloud is to use yongzhong server. The public cloud has a free version that provides basic preview functionality. Private clouds support customization, and most of the above functions can be implemented.

There are many examples on the website, and you can also upload your own files to preview and experience them.

  • The demo experience
  • The official sample

Office Web 365

Office Web 365 is similar to DCS in that it has both deployed and online versions, but both are powerful enough to satisfy all your fantasies about document previews.

There is also a free version of Office Web 365, which is very simple to use. First register an account, then add the domain name of the file download address to the background, the background will generate a website ID based on the domain name, and then use the preview address below.

Preview the address

http://ow365.cn/?i= your website ID&furl= Office file download address to previewCopy the code

If the file download address starts with HTTPS, add an SSL =1 parameter

http://ow365.cn/?ssl=1&i= your website ID&furl= Office file download address to previewCopy the code
  • The demo experience
  • The official sample

conclusion

The above is the most popular document preview scheme, if the product manager asks you to develop these features, know how to do it. As long as there is money, there is no function can not be realized 😋 to make a small summary:

function Microsoft Office Web Viewer Baidu document service DOC Yongzhong DCS document preview Office Web 365
Listen for pages to turn ✘ ✔ ✔ ✔
Document to picture ✘ ✔ ✔ ✔
Powerpoint animation ✔ ✘ ✔ ✔
PPT synchronous playback ✘ ✘ ✘ ✔
PPT sketchpad ✘ ✘ ✔ ✔

I spent a lot of time researching and experimenting with this, so don’t forget to give it a thumbs up if it helps you

If you have any questions, please leave them in the comments section