<dependency>
<groupId>com.ibm.watson</groupId>
<artifactId>compare-comply</artifactId>
<version>9.3.0</version>
</dependency>'com.ibm.watson:compare-comply:9.3.0'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();