One, foreword

Recently a lot of children asked me, “Preview function is good, if support watermark is perfect”. This is the most common voice I have heard since I developed a native Android plug-in based on Tencent X5 (cross-platform Document Online Preview solution (IV)). However, it not only supports watermarking, but also callback to return the total page number and current page number, and even online editing and other functions.

Ideal is beautiful, reality is cruel

In the field of document preview technology, after 2 years of continuous research. Starting recently with PDF.js (converting all documents to PDF and then front-end conversion via PDF.js), to offline preview with Microsoft Office Online, and then to OpenOffice, LibreOffice document conversion, Finally, Android and IOS native plug-ins (see the cross-platform Documentation Online Preview Solutions series) are leveraging the cloud to address growing user needs. The document is now previewed quite well. However, in case of complex needs such as collaborative office and online editing, the previous scheme is inadequate. Even small add watermark, anti – copy make mobile terminal slightly complicated.

Three, another village

As harsh as the reality is, it won’t last forever. Some Office manufacturers have been working hard for ten years and have made some achievements in the field of document preview and document editing products, such as Yongzhong Cloud service platform, Kingsoft WPS open platform, Tencent Document open API, etc. These platforms will solve the increasingly complex document collaboration needs. Today we will take a look at the document business capabilities of yongzhong Cloud service platform.

Iv. Yongzhong Cloud Service

Open theopen.yozocloud.cn/– > Register, log in — > BasedThe documentTo apply for a developer — > openManagement centerTo apply for applications (apply for cloud preview, cloud editing, and format conversion as required).

Next, the author integrates yongzhong cloud service based on my open source project uniapp-admin (project address: Github, Gitee), welcome to use and Star~

Cloud preview

Develop documents according to cloud preview, use the interface of uploading files and online preview files respectively.

  • Step 1: fork uniapp-admin (github, gitee)

  • Step 2: Configure appId and appKey of cloud preview application (here is just a front-end case, it is suggested to use JAVA SDK interface for production and hide key)

  • Step 3: Run

5.1 Service Process

Pages /yzcloud/index.vue — > Pages /file/file-upload.vue — > Pages /yzcloud/yz-preview-callback.vue

5.2 H5 Upload Components

This project adopts H5 to upload web pages (supporting H5 and APP cross-platform at the same time), or refer to the open source project Uniapp-file-upload (project address: Github, Gitee).

5.3 the effect

  • Preview the docx

  • Preview the PPTX

  • Preview the XLSX

  • Preview the PDF

Cloud editing

According to the cloud editing development document, after the application application is approved, configure the data callback interface for editing the callback after automatic saving.

Similar to cloud preview, first call the upload document interface — > then call the online edit file interface — > Auto save, call the callback interface.

6.1 the effect

  • Edit docx

  • Edit XLSX

  • Edit the PPTX

Format conversion

The same cloud editing, reference formatting development document, first call upload document interface — > then post call format online conversion file interface — > get conversion results.

7.1 Conversion Result

Eight, summary

Compared with the open source framework technology, Yongzhong Cloud service can better solve the document preview, add watermark, prevent replication, online editing and other complex requirements, bringing good news to the collaborative office field.