Skip to content

Latest commit

 

History

History
30 lines (20 loc) · 680 Bytes

README.md

File metadata and controls

30 lines (20 loc) · 680 Bytes

tesseract4

Build Status

Usage

Run the container with the following command:

docker run --rm -d -p "8000:8000" sbneto/tesseract4:por

And connect to the container running python XMLRPC server to run remote calls.

from xmlrpc.client import ServerProxy

# Connect to the RPC server
proxy = ServerProxy("http://localhost:8000/", use_builtin_types=True)

# Read file data as bytes
with open('test.pdf', 'rb') as f:
    data = f.read()
    
# Perform the remote call
text = str(proxy.tesseract(data), 'utf-8')

# Check the results =]
print(text)