13

【C13】PPT转图片

PPT转为图片,每页一图。

价格

10000 元/100万页

约0.01元/页,自购买起有效期24个月

立即购买

API文档示例代码产品价格


接口描述

  • PPT转为图片,每页一图。

请求地址

https://api.docsdk.com/v3/convert


请求方式

  • POST, GET

请求格式

  • json, x-www-form-urlencoded

请求参数

名称 类型 是否必填
说明
apiKey String 九云图分配的 API KEY
timestamp Long 当前时间戳(毫秒数)
sign String 签名,见签名算法说明
message String 可选填,用一句话描述附加要求。
format String 输出格式:png或jpg。
dpi Integer 图片的DPI,表示输出图片的分辨率,默认为240。
document String PPT文件的URL或BASE64编码。
tag String 当前任务附带的标记信息,用于在回调中进行识别匹配
webHook String 任务完成后的回调地址

签名算法

sign = sha256(apiKey + apiSecret + timestamp)

用九云图分配的 apiKey、九云图分配的 apiSecret,当前时间戳 timestamp,按上述顺序拼接成字符串,再进行 sha256 哈希得到。如下:

String apiKey = "xyzxy2121zxyz"; String apiSecret = "efcefcef1121cefcefc1212121"; String timestamp = "1555378976238"; String str = apiKey + apiSecret + timestamp; String sign = sha256(str);

正确返回示例

{ "id": "abfc0c52a8ac40c3c658363426c31c701e548be0", //任务编号 "status": "finished", //任务状态 "percent": 100, //处理进度百分比 "result": "https://pss.docsdk.com/resource/e09fdb12f937d66574353c51bbf191df9ceae87c/6f85a0854d614a259bc8a11cf82cb4dd.png", //处理结果 "FileSize": 241879, //文件大小 "PageTotal": 8 //文件页数 }

错误返回示例

{ "id": "abfc0c52a8ac40c3c658363426c31c701e548be0", //任务编号 "status": "error", //任务状态 "percent": 39, //处理进度百分比 "message": "19302-Imports URL failure." //错误信息 }

返回字段说明

字段名 类型
说明
status String 处理状态,可能值为“processing”(正在处理)、“finished”(已完成)或“error”(出错)。
result Array 转换后的图片URL数组。
query_url String 用来查询处理状态的URL。
percent Integer 处理进度百分比,取值范围为0到100。
message String 服务端返回的备注信息,用于了解转换状态或错误信息。
id String 转换任务的唯一标识符,用于跟踪转换进度和结果。
ThumbURL String 缩略图。
PreviewURL String 在线预览链接,用于快速查看PPT文件内容。
PageTotal Integer PPT文件的总页数。

相关推荐

服务热线
13918951761