Skip to content

Commit 2a65cf5

Browse files
Merge pull request #3 from ComPDFKit/releases1.0.0
add Requirements
2 parents f8ae6e4 + 495506b commit 2a65cf5

File tree

1 file changed

+17
-33
lines changed

1 file changed

+17
-33
lines changed

README.md

Lines changed: 17 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,14 @@
22

33
This is the compdfkit-pdf-api Java SDK for the [ComPDFKit](https://api.compdf.com/api/docs/introduction) API.
44

5+
## Requirements
6+
7+
JAVA JDK 1.8 and later.
8+
9+
Maven 3.6 and later.
10+
11+
Springboot 2.3.0.RELEASE and later.
12+
513
## Installation
614

715
Add the following dependency to your pom.xml:
@@ -34,11 +42,11 @@ A task ID is automatically generated for you based on the type of PDF tool you c
3442
// Create a client
3543
ComPdfKitClient client = new ComPdfKitClient(<publicKey>, <secretKey>);
3644

37-
// Create an example of a PDF TO EXCEL task
38-
CreateTaskResult result = client.createTask(PDFToOfficeEnum.PDF_TO_EXCEL.getValue());
45+
// Create an example of a PDF TO WORD task
46+
CreateTaskResult result = client.createTask(PDFToOfficeEnum.PDF_TO_WORD.getValue());
3947

4048
//Get a task id
41-
String jobId = result.getTaskId();
49+
String jobId = result.getTaskId();
4250
```
4351

4452
## Upload Files
@@ -52,21 +60,13 @@ Upload the original file and bind the file to the task ID. The field parameter i
5260
ComPdfKitClient client = new ComPdfKitClient(<publicKey>, <secretKey>);
5361

5462
// Create a task
55-
// Create an example of a PDF TO EXCEL task
56-
CreateTaskResult result = client.createTask(PDFToOfficeEnum.PDF_TO_EXCEL.getValue());
63+
// Create an example of a PDF TO WORD task
64+
CreateTaskResult result = client.createTask(PDFToOfficeEnum.PDF_TO_WORD.getValue());
5765

5866
// Get a task id
5967
String jobId = result.getTaskId();
6068

61-
// Upload files
62-
63-
// 1.Setting the file parameters
64-
65-
// The parameter field only sets the processing parameters for the currently supported functions. If no parameters are set, the default value is used. The JSON format and field explanation corresponding to different function types are shown in PDF file transfer tool guide.
66-
PDFToExcelParameter parameter = FileParameterFactory.getFileParameterByType(PDFToOfficeEnum.PDF_TO_EXCEL);
67-
parameter.setContentOptions("1");
68-
69-
// 2.Upload file
69+
// Upload file
7070
client.uploadFile(<convertFile>, jobId);
7171
```
7272

@@ -82,20 +82,12 @@ ComPdfKitClient client = new ComPdfKitClient(<publicKey>, <secretKey>);
8282

8383
// Create a task
8484
// Create an example of a PDF TO EXCEL task
85-
CreateTaskResult result = client.createTask(PDFToOfficeEnum.PDF_TO_EXCEL.getValue());
85+
CreateTaskResult result = client.createTask(PDFToOfficeEnum.PDF_TO_WORD.getValue());
8686

8787
// Get a task id
8888
String jobId = result.getTaskId();
8989

9090
// Upload files
91-
92-
// 1.Setting the file parameters
93-
94-
// The parameter field only sets the processing parameters for the currently supported functions. If no parameters are set, the default value is used. The JSON format and field explanation corresponding to different function types are shown in PDF file transfer tool guide.
95-
PDFToExcelParameter parameter = FileParameterFactory.getFileParameterByType(PDFToOfficeEnum.PDF_TO_EXCEL);
96-
parameter.setContentOptions("1");
97-
98-
// 2.Upload file
9991
client.uploadFile(<convertFile>, jobId);
10092

10193
// execute Task
@@ -111,21 +103,13 @@ Request task status and file-related metadata based on the task ID.
111103
ComPdfKitClient client = new ComPdfKitClient(<publicKey>, <secretKey>);
112104

113105
// Create a task
114-
// Create an example of a PDF TO EXCEL task
115-
CreateTaskResult result = client.createTask(PDFToOfficeEnum.PDF_TO_EXCEL.getValue());
106+
// Create an example of a PDF TO WORD task
107+
CreateTaskResult result = client.createTask(PDFToOfficeEnum.PDF_TO_WORD.getValue());
116108

117109
// Get a task id
118110
String jobId = result.getTaskId();
119111

120112
// Upload files
121-
122-
// 1.Setting the file parameters
123-
124-
// The parameter field only sets the processing parameters for the currently supported functions. If no parameters are set, the default value is used. The JSON format and field explanation corresponding to different function types are shown in PDF file transfer tool guide.
125-
PDFToExcelParameter parameter = FileParameterFactory.getFileParameterByType(PDFToOfficeEnum.PDF_TO_EXCEL);
126-
parameter.setContentOptions("1");
127-
128-
// 2.Upload file
129113
client.uploadFile(<convertFile>, jobId);
130114

131115
// execute Task

0 commit comments

Comments
 (0)