As the Watson Document Conversion Service will be deprecated, I created a small application which returns plain text from a document, like doc, docx, HTML and pdf
mvn package
mvn package docker:build
docker run -p 8080:8080 -t elstarit/think-spring-boot
docker ps
docker stop
Url: /api/convert-to-plain-text
Method: POST
Consumes: File
Produces: JSON
{
"convertedText": "text",
"message": "information or error message"
}
Url: /api/convert-data-to-plain-text
Method: POST
Consumes: JSON
{
"mediaType": "text",
"data": "base64 encoded representation of text/file"
}
Produces: JSON
{
"convertedText": "text",
"message": "information or error message"
}
I have added Swagger to the application and can be reached via the url /swagger-ui.html
https://cloud.ibm.com/docs/cf-cli-plugin?topic=cf-cli-plugin-cf-cli-plugin
cf login -a https://api.us-south.cf.cloud.ibm.com cf push document-conversion-api-serverless