less than hero
Good news, everyone!
The next version of the sandwich engine is ready. All planned features are available . Although there is a need to do some refactoring on logging and error handling. So be careful.
The art of calling the sandwich engine has changed.
- where is no need to pass -c textonly_pdf":"1" in config_vars anymore.
- sandwich engine can be asked to return a combinepdf, ocrlayeronly and txt all three as base64
- result_optimize only has effect in combination with combinedpdf.
- sandwich engine can handle TIFF and PDF on its input
The valid way to call it is now:
curl -X POST -d '{"img_url":"http://localhost:8000/test.pdf","engine":"sandwich","engine_args":{"lang":"eng", "ocr_type":"txt","result_optimize":true}}' http://localhost:8080/ocr -H "Content-Type:application/json"
curl -X POST -d '{"img_url":"http://localhost:8000/test.pdf","engine":"sandwich","engine_args":{"lang":"eng", "ocr_type":"combinedpdf","result_optimize":true}}' http://localhost:8080/ocr -H "Content-Type:application/json"
curl -X POST -d '{"img_url":"http://localhost:8000/test.pdf","engine":"sandwich","engine_args":{"lang":"eng", "ocr_type":"oclayeronly","result_optimize":true}}' http://localhost:8080/ocr -H "Content-Type:application/json"
Have fun!