public interface IEasyPoiWpsConvertService extends IEasyPoiWpsService
| 限定符和类型 | 字段和说明 |
|---|---|
static String |
CONVERT_API |
static String |
QUERY_API |
| 限定符和类型 | 方法和说明 |
|---|---|
default boolean |
fileConvert(String taskId,
String srcUri,
String fileName,
String exportType,
String callback)
文件转换
WPS接口的文件转换
文档: https://open.wps.cn/docs/doc-format-conversion/access-know
文件原格式 转换后格式
word pdf、png
excel pdf、png
ppt pdf
pdf word、ppt、excel
|
default byte[] |
getConvertFile(String taskId)
检查WPS文件转换结果
调用WPS格式转换查询接口
可以在回调中执行,也可以用于异步查询结果
返回转换后的文件地址,地址是有时限的,所以需要及时使用或保存,建议保存到自己服务器中,以免因过期问题打开地址失败
|
getAppId, getAppSecretdefault boolean fileConvert(String taskId, String srcUri, String fileName, String exportType, String callback) throws Exception
taskId - 任务ID,需唯一srcUri - 原文件地址 需要转换的文件地址,保证可打开、下载fileName - 文件名 好象没什么用,转换后下载的文件名都不是这个的。exportType - 转换的格式,pdf、png等callback - 回调地址ExceptionCopyright © 2022. All rights reserved.