Agora Interactive Whiteboard supports file conversion from PPT, PPTX, DOC, DOCX, and PDF files into static images, as well as from PPTX files into dynamic HTML web pages. The generated images and web pages can be presented on the whiteboard.
The file-conversion feature supports:
Static-file conversion refers to converting PPT, PPTX, DOC, DOCX, and PDF files to static images in PNG, JPG/JPEG, and WEBP formats. The generated file does not preserve animations present in the source file.
When using static-file conversion, keep in mind the following helpful guidelines::
Dynamic-file conversion refers to converting PPTX files edited with Microsoft Office to HTML web pages. The generated file preserves animations present in the source file.
Currently, dynamic-file conversion does not support the following formats and features:
For all the limitations of dynamic file conversion, see What PowerPoint features are not supported by the dynamic file conversion function?
Before using the file-conversion feature, ensure that you have completed the following preparatory steps:
You need to use an Amazon S3 cloud storage service to save files generated by file conversion.
To enable the file-conversion feature, do the following steps:
Go to the Project Management page in Agora Console, find the project that has the whiteboard feature enabled, and click Edit.
On the Edit Project page, find Whiteboard, and click Config.
Under Services, select a data center, and click Config. The data center must be the same as the one you fill in the region
field when calling the Create a room API; otherwise, the service configurations do not take effect.
Click the arrowhead to the right of Storage, and select a previously configured storage space in the drop-down list.
Click Create to add a new storage space. You need to fill in the following information:
Name: (Required) The name of your storage space.
Vendor: (Required) The third-party cloud storage vendor.
Region: (Required) The location of the data center you specified when creating a bucket.
accessKey: (Required) The Access Key provided by the third-party cloud storage vendor, which is used by the vendor to identify visitors.
secretKey: (Required) The Secret Key provided by the third-party cloud storage vendor, which is used to authenticate signatures.
bucket: (Required) The name of the bucket.
Storage path: The path used to save the resources in the storage space. The default is the root directory.
Domain: The domain name used to access the third-party cloud storage service.
Before you launch a file-conversion task, you must upload the source file to a third-party cloud storage space or your Nginx server. This will produce a URL address for the file. Make sure that the whiteboard service can access the file via this URL address.
The file-conversion feature is implemented by Agora's server for the whiteboard service. When an app client requests to convert a file, your app server needs to call the Interactive Whiteboard RESTful API to send the request to the Agora server. The full process is illustrated in the following diagram:
- To start a file-conversion task, call the RESTful API by passing in the URL address of the source file, the task type, as well as other relevant parameters. See Start file conversion (POST).
- To query the progress of a conversion task, pass in the corresponding Task UUID and Task Token. See Query file-conversion progress (GET).
- To ensure that your data is up to date, Agora recommends that you design an algorithm to regularly query the conversion progress.