在线文档转换API
在线文档转换API,提供word,excel,ppt等在线文件转pdf、png等
在线文档转换API文档:https://www.juhe.cn/docs/api/id/259
接口地址:http://v.juhe.cn/fileconvert/query
支持格式:json
请求方式:http get/post
请求示例:http://v.juhe.cn/fileconvert/query
接口备注:通过提交需要转换的源文件url,转换成对应的文档格式
请求参数说明:
名称 类型 必填 说明 key string 是 你申请的key url string 是 需要转换的文档在线url地址 type int 否 转换类型,默认1(1:office转pdf、2:office转swf、3:office转png、4:office转pdf拆单页、5:pdf转swf、6:pdf转png、7:word转txt),office支持:word,excel,ppt三种文档格式
返回参数说明:
名称 类型 说明 error_code int 返回码 reason string 返回说明 sourceurl string 提交的文件url mes_path string 转换后的文件下载地址(转换过后的文件,10分钟有效时间,请尽快下载)
JSON返回示例:
{
"reason": "转换成功",
"result": {
"sourceurl": "http://juheimg.oss-cn-hangzhou.aliyuncs.com/docs/juhe.doc",
"mes_path": "http://office.edu-paas.com/Resources/Anonymous/6059d8af-82d0-44f5-9c97-629dd26af4ff.pdf"
},
"error_code": 0
}