Skip to content

Latest commit

 

History

History
 
 

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Compare and Comply

Installation

Maven
<dependency>
  <groupId>com.ibm.watson</groupId>
  <artifactId>compare-comply</artifactId>
  <version>9.3.0</version>
</dependency>
Gradle
'com.ibm.watson:compare-comply:9.3.0'

Usage

Use the Compare and Comply service to enable better and faster document understanding. Below is an example of converting a PDF file into HTML:

Authenticator authenticator = new IamAuthenticator("<iam_api_key>");
CompareComply service = new CompareComply("2018-10-15", authenticator);

ConvertToHtmlOptions convertToHtmlOptions = new ConvertToHtmlOptions.Builder()
  .file("~/path/to/file.pdf")
  .fileContentType(HttpMediaType.APPLICATION_PDF)
  .build();

// Response body with converted HTML
HTMLReturn response = service.convertToHtml(convertToHtmlOptions).execute().getResult();