```/**
* Created by wangweiguo on 18/12/14.
*/
import net.sf.json.JSONObject;
import java.util.HashMap;
import java.util.Map;
public class App {
public static void main(String[] args) {
//登陆接口:
String loginUrl = "https://dubbo.wellsign.cn/dandanqiantest/api/index.php/Conv/User/login";
String loginParam = "accessKey=test&accessSecret=test&clientId=zj1214&clientType=PC";
String loginSuccess = HttpRequest.sendPost(loginUrl, loginParam);
JSONObject jsonLogin = JSONObject.fromObject(loginSuccess);
System.out.print(jsonLogin);
//登陆成功后纪录token
String token = jsonLogin.getString("access_token");
//请生成签字链接
String signUrl = "https://dubbo.wellsign.cn/dandanqiantest/api/Conv/reportToPdf/http/v0.1";
//本地PDF文件地址,本地调试的话换成你自己的
String pdfPath1 = "/Users/wangweiguo/Desktop/a.pdf";
String pdfPath2 = "/Users/wangweiguo/Desktop/b.pdf";
Map<String, String> textMap = new HashMap<String, String>();
textMap.put("access_token", token);
textMap.put("element_info", "{\n" +
"\t\"labelElements\": [{\n" +
" \"labelName\": \"label-1-1\",\n" +
" \"content\": \"1-1\"\n" +
" }, {\n" +
" \"labelName\": \"label-2-1\",\n" +
" \"content\": \"2-1\"\n" +
" }, {\n" +
" \"labelName\": \"label-3-1\",\n" +
" \"content\": \"3-1\"\n" +
" }, {\n" +
" \"labelName\": \"label-4-1\",\n" +
" \"content\": \"4-1\"\n" +
" }, {\n" +
" \"labelName\": \"label-4-2\",\n" +
" \"content\": \"4-2\"\n" +
" }, {\n" +
" \"labelName\": \"label-4-3\",\n" +
" \"content\": \"4-3\"\n" +
" },{\n" +
" \"labelName\": \"label-5-1\",\n" +
" \"content\": \"5-1\"\n" +
" },{\n" +
" \"labelName\": \"label-5-2\",\n" +
" \"content\": \"5-2\"\n" +
" },{\n" +
" \"labelName\": \"label-5-3\",\n" +
" \"content\": \"5-3\"\n" +
" }]\n" +
" }");
Map<String, String> fileMap = new HashMap<String, String>();
fileMap.put("multipartFile", pdfPath1);
fileMap.put("multipartFile", pdfPath2);
String signSuccess = HttpRequest.sendPostFile(signUrl, textMap, fileMap);
JSONObject jsonSign = JSONObject.fromObject(signSuccess);
System.out.print(jsonSign);
String downloadUrl = jsonSign.getString("down_url");
System.out.print("合并文件地址:"+downloadUrl);
System.out.print("\n");
}
}```
- 产品说明和使用步骤
- 错误码
- 登录模块
- 阿里云模式
- 设置阿里云存储参数
- office转pdf并生成签字链接(同步方式)
- office转pdf并生成签字链接(异步方式)
- pdf生成签字链接(同步方式)
- pdf生成签字链接(异步方式)
- image转pdf并生成签字链接(同步方式)
- image转pdf并生成签字链接(异步方式)
- 直接上传文件模式
- office转pdf并生成签字链接(同步方式)
- pdf生成签字链接(同步方式)
- pdf生成签字链接(异步方式)
- image转pdf并生成签字链接(异步方式)
- 文件签完字后回调
- 自定义文本
- 自定义文本数据说明
- 删除文件
- 拷贝文件接口
- 文件签字查询
- 文件签字查询
- 文件签字查询0.1
- demo
- 前端demo
- java demo
- App.java
- HttpRequest.java
- 文件合成
- 模版与直传文件合成pdf(http方式)
- 模版与直传文件合成pdf(oss方式)
- html(含模板) demo
- http
- oss
- java(含模板) demo
- App.java
- HttpRequest.java
- 直传文件合成pdf(http方式)
- 直传文件合成pdf(oss方式)
- html demo
- http
- oss
- java demo
- App.java
- HttpRequest.java
- 模板element_info说明
- 元素json数据说明