Skip to content

Commit 4adb913

Browse files
committed
docs(Compare and Comply): Add README
1 parent f41b5d4 commit 4adb913

File tree

2 files changed

+35
-0
lines changed

2 files changed

+35
-0
lines changed

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ Java client library to use the [Watson APIs][wdc].
2222
* [API key](#api-key)
2323
* IBM Watson Services
2424
* [Assistant](assistant)
25+
* [Compare and Comply](compare-comply)
2526
* [Discovery](discovery)
2627
* [Language Translator](language-translator)
2728
* [Natural Language Classifier](natural-language-classifier)

compare-comply/README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# Compare and Comply
2+
3+
## Installation
4+
5+
##### Maven
6+
```xml
7+
<dependency>
8+
<groupId>com.ibm.watson.developer_cloud</groupId>
9+
<artifactId>compare-comply</artifactId>
10+
<version>6.9.1</version>
11+
</dependency>
12+
```
13+
14+
##### Gradle
15+
```gradle
16+
'com.ibm.watson.developer_cloud:compare-comply:6.9.1'
17+
```
18+
19+
## Usage
20+
Use the [Compare and Comply](https://cloud.ibm.com/docs/services/compare-comply/index.html#about) service to enable better and faster document understanding. Below is an example of converting a PDF file into HTML:
21+
```java
22+
IamOptions iamOptions = new IamOptions.Builder()
23+
.apiKey(apiKey)
24+
.build();
25+
CompareComply service = new CompareComply(VERSION, iamOptions);
26+
27+
ConvertToHtmlOptions convertToHtmlOptions = new ConvertToHtmlOptions.Builder()
28+
.file("~/path/to/file.pdf")
29+
.fileContentType(HttpMediaType.APPLICATION_PDF)
30+
.build();
31+
32+
// Response body with converted HTML
33+
HTMLReturn response = service.convertToHtml(convertToHtmlOptions).execute();
34+
```

0 commit comments

Comments
 (0)