Non-interactive use of the server

WeOCR servers can be used non-interactively as well as via an HTML page. To do so, you just call the CGI program directly using a web tool such as cURL.

  $ curl -F userfile=@Image_File_Name \
         -F outputencoding="utf-8" \
         -F outputformat="txt" \
         http://Server_Address/cgi-bin/weocr/submit_e1.cgi >result.txt

You probably need to use --max-time and --connect-timeout options as well to avoid undesirable blockings of the process.

If you specify outputformat="txt", the first line of the output data is used as the status line. The first line will be blank upon successful recognition.

See WeOCR Server API document for details.

WeOCR Project Home