跳到主要内容

PDF转Word

说明

  • 将pdf转换为支持Word(doc)格式

接口说明

请求地址

request_url 参考基础 > request_url

请求参数,POST请求

名称类型必须描述
methodStringpdf.pdfToDoc,固定值
tokenString可自行创建或更新,参考基础 > token
asyncString任务方式,默认0,代表同步;1代表异步,异步需要设置回调地址,或者主动查询结果
inputString输入文件,可访问互联网url,比如 https://static.easyyun.com/static/example/files/one_page.pdf

响应参数,类型为JSON

名称类型示例值描述
request_idStringxxx任务id
codeString200code说明
dataString{"file_url": "xxx"}json格式消息内容
code_msgString"成功"code描述

请求示例

curl -X POST 'https://test-rest-api.easyyun.com/v1/router/rest' \
-d 'method=pdf.pdfToDoc' \
-d 'token=395a25d6fa758bfb6c0d3da007a8b189' \
-d 'input=https://static.easyyun.com/static/example/files/one_page.pdf'

响应示例

{
"request_id": "xxx",
"code": "200",
"data": {
"file_url": "https://static.easyyun.com/static/example/out/one_page.doc"
},
"code_msg": "请求成功"
}