Agora Interactive Whiteboard supports file conversion from PPT and PPTX files into dynamic HTML web pages. The generated web pages can be accessed directly or presented on the whiteboard.
File conversion refers to converting PPT/PPTX files edited with Microsoft Office to HTML web pages. The generated file preserves animations in the source file.
Compared with the old version, the new file conversion adopts an engine developed by Agora and has the following advantages:
The new file conversion currently has several limitations, however:
When using the new version of file conversion, you need to pay attention to the following issues:
Converting WPS files is not yet supported. You may also encounter problems when using PPTX files converted from WPS files.
If a font is missing in a generated web page, you can either use the SDK to add a custom font or contact firstname.lastname@example.org.
A generated web page can be rendered into canvas pages via Fastboard SDK (coming soon), @netless/slide, or @netless/projector-plugin. The differences between these three rendering solutions are as follows:
Fastboard SDK is the rendering plan designed for multi-window scenarios in Agora Interactive Whiteboard. Fastboard SDK is coming soon.
@netless/slide is a stand-alone document conversion and rendering dependency that does not include such things as whiteboards or state synchronization. Adopting this solution requires you to write extra codes to synchronize states. It is designed for scenarios where PPT is used alone in whiteboard apps.
@netless/projector-plugin is a plug-in for Whiteboard SDK that supports state synchronization, but it only works in single-window scenarios.
Before using file conversion, ensure that you have completed the following steps:
You need to use an Amazon S3 cloud storage service to save files generated by file conversion.
Refer to 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 produces a URL address for the file. Make sure that the whiteboard service can access the file via this URL address.
File conversion 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 call the RESTful API to start a file-conversion task, pass in the URL address of the source file and other parameters. See Start file conversion.
- To query the progress of a file-conversion task, pass in the corresponding task UUID and Task Token. See Query file-conversion progress.
- Agora recommends that you design an algorithm to regularly query the conversion progress so that your data is up to date.