You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+35-26Lines changed: 35 additions & 26 deletions
Original file line number
Diff line number
Diff line change
@@ -1,40 +1,48 @@
1
-
## compdfkit-pdf-api-java
1
+
## ComPDFKit API in Java
2
+
3
+
[ComPDFKit](https://api.compdf.com/api/docs/introduction) API provides a variety of Java API tools that allow you to create an efficient document processing workflow in a single API call. Try our various APIs for free — no credit card required.
4
+
2
5
3
-
This is the compdfkit-pdf-api Java SDK for the [ComPDFKit](https://api.compdf.com/api/docs/introduction) API.
4
6
5
7
## Requirements
6
8
7
-
JAVA JDK 1.8 and later.
9
+
Programming Environment: Java JDK 1.8 and higher.
10
+
11
+
Dependencies: Maven.
12
+
8
13
9
-
Maven.
10
14
11
15
## Installation
12
16
13
-
Add the following dependency to your pom.xml:
17
+
Add the following dependency to your ***"pom.xml"***:
14
18
15
19
```
16
20
<dependency>
17
21
<groupId>com.compdf</groupId>
18
-
<artifactId>compdfkit-pdf-api-java</artifactId>
19
-
<version>0.0.5</version>
22
+
<artifactId>compdfkit-api-java</artifactId>
23
+
<version>1.2.4</version>
20
24
</dependency>
21
25
```
22
26
27
+
28
+
23
29
## Create API Client
24
30
25
-
You can use your **publicKey** and **secretKey** to complete the authentication
31
+
You can use your **publicKey** and **secretKey** to complete the authentication. You need to [sign in](https://api.compdf.com/login) your ComPDFKit API account to get your **publicKey** and **secretKey** at the [dashboard](https://api-dashboard.compdf.com/api/keys). If you are new to ComPDFKit, click here to [sign up](https://api.compdf.com/signup) for a free trial.
26
32
27
-
Project public Key : You can find the public key in [Management Panel](https://api-dashboard.compdf.com/api/keys).
33
+
-Project public Key : You can find the public key in [Management Panel](https://api-dashboard.compdf.com/api/keys).
28
34
29
-
Project secret Key : You can find the secret Key in [Management Panel](https://api-dashboard.compdf.com/api/keys).
35
+
-Project secret Key : You can find the secret Key in [Management Panel](https://api-dashboard.compdf.com/api/keys).
A task ID is automatically generated for you based on the type of PDF tool you choose. You can provide the callback notification URL. After the task processing is completed, we will notify you of the task result through the callback interface. You can perform other operations according to the task result, such as downloading the result file.
45
+
A task ID is automatically generated for you based on the type of PDF tool you choose. You can provide the callback notification URL. After the task processing is completed, we will notify you of the task result through the callback interface. You can perform other operations according to the request result, such as checking the status of the task, uploading files, starting the task, or downloading the result file.
38
46
39
47
```java
40
48
// Create a client
@@ -46,20 +54,14 @@ CPDFCreateTaskResult result = client.createTask(CPDFConversionEnum.PDF_TO_WORD.g
46
54
47
55
// Get a task id
48
56
String taskId = result.getTaskId();
57
+
```
49
58
50
-
// Upload files
51
-
client.uploadFile(<convertFile>, taskId);
52
59
53
-
// execute Task
54
-
client.executeTask(taskId);
55
-
```
56
60
57
61
## Upload Files
58
62
59
63
Upload the original file and bind the file to the task ID. The field parameter is used to pass the JSON string to set the processing parameters for the file. Each file will generate automatically a unique filekey. Please note that a maximum of five files can be uploaded for a task ID and no files can be uploaded for that task after it has started.
0 commit comments