欢迎来到 wabc.cc 官方网站!
Office文档/多张图(OCR)/网页/苹果等转换为PDF

Office文档/多张图(OCR)/网页/苹果等转换为PDF

API参数 转换查询GET文档转换GET多张图片转换POST 调用地址: http,https://pdfconvert.api.bdymkt.com/v1/query 请求方式: GET 支持格式: application/json;charset=UTF-8 调用工具: 去调试 请求参数(Headers) 请求参数(Query) 名称 类型 是否必须 示例值 描述 token

联系电话: 13983470003
产品详情
API参数 转换查询GET文档转换GET多张图片转换POST 调用地址: http,https://pdfconvert.api.bdymkt.com/v1/query 请求方式: GET 支持格式: application/json;charset=UTF-8 调用工具: 去调试 请求参数(Headers) 请求参数(Query)
  • 名称
  • 类型
  • 是否必须
  • 示例值
  • 描述
  • token
  • string
  • true
  • null
  • convert接口返回的token值
请求参数(Body) 请求参数(Path) 请求示例 javapythongocurlphpnodejs 示例代码使用, 需要使用Maven加入依赖
<dependency>
    <groupId>com.baidubce</groupId>
    <artifactId>api-explorer-sdk</artifactId>
    <version>1.0.0</version>
</dependency>
                                    
                                        
import com.baidubce.http.ApiExplorerClient;
import com.baidubce.http.AppSigner;
import com.baidubce.http.HttpMethodName;
import com.baidubce.model.ApiExplorerRequest;
import com.baidubce.model.ApiExplorerResponse;

// 转换查询GET Java示例代码
public class RequestDemo {
    public static void main(String[] args) {
        String path = "//v1/query";
        ApiExplorerRequest request = new ApiExplorerRequest(HttpMethodName.GET, path);
        request.setCredentials("您的 access key", "您的 secret key");

        request.addHeaderParameter("Content-Type", "application/json;charset=UTF-8");
        
        request.addQueryParameter("token", "");
        
        

        ApiExplorerClient client = new ApiExplorerClient(new AppSigner());

        try {
          ApiExplorerResponse response = client.sendRequest(request);
          // 返回结果格式为Json字符串
          System.out.println(response.getResult());
        } catch (Exception e) {
          e.printStackTrace();
        }
    }
}
                                    

                                    点击复制代码
                                
正常返回示例
                                    {
    "code": 10000,
    "msg": "",
    "result": {
        "count": 3,
        "pdfurl": "https://file.duhuitech.com/o/3345826c6ef2ebadd1db84daf0383d36/b61cba7b-10ed-4e92-8757-19fd0cac3015.pdf",
        "status": "Done"
    },
    "token":"3345826c6ef2ebadd1db84daf0383d36"
}
                                
失败返回示例
                                    {
    "code": 10000,
    "msg": "",
    "result": {
        "status": "Failed"
    }
}
                                
错误码定义
  • code
  • message
  • status
  • 描述
  • 40000
  • 通用错误
  • 200
  • --
  • 40001
  • 参数错误
  • 200
  • --
  • 40002
  • 参数不符合规范
  • 200
  • --
标签: {}
在线客服
微信联系
客服
扫码加微信(手机同号)
电话咨询
返回顶部